LucyBot's SEO tools allow you to control how your documentation appears in
search results. You can set the <meta>
and <title>
tags for any page in your
docs. You can also generate a sitemap for the entire site.
If you don't manually set these tags, LucyBot will use your API specification and markdown to auto-generate them.
Each page specified in the routes
section of LucyBot.yml
can have its own
meta tags:
routes:
/docs:
ui: documentation
meta:
title: "ACME API Documentation"
description: "Documentation for using the ACME API"
keywords:
- ACME API
- ACME Documentation
Search engines will then usually show the following in search results:
Documentation for using the ACME API
You can also set additional meta info for sub-pages within each route. The sub-page's title will still include the top-level title. For example:
routes:
/docs:
ui: documentation
meta:
title: "ACME API Documentation"
description: "Documentation for using the ACME API"
navigation
- title: Introduction
markdownFile: ./Introduction.md
meta:
title: "Getting Started"
This will make the <title>
for the Introduction page "Getting Started - ACME API Documentation".
Had we not specified the meta
section for the Introduction item, the title would have been
"Introduction - ACME API Documentation".
To generate a sitemap, add the following to LucyBot.yml:
sitemap:
hostname: https://docs.acme.com
replacing docs.acme.com
with your hostname.