Adding an Astro + X guide
The src/content/docs/en/guides/
directory in the docs has subdirectories for established guide categories for connecting to or integrating with third-party services:
cms/
backend/
deploy/
migrate-to-astro/
media/
If you’d like to add a new guide to using Astro with a third-party CMS, backend service, deploy host, etc., the first step is to create a new “stub” page.
Creating a stub page involves adding a logo and creating a short page of content using a template. New stubs do not require much editing effort and can often be merged into docs quickly.
We recommend first creating a stub and linking to other guides (official guides, starter templates and tutorials, as well as community blog posts or videos) so that the new page will be available as soon as possible.
Then, additional content can be added incrementally until you are ready to write a full guide that requires testing and editing from our Docs team.
Submissions for full guides without first creating a stub page may be refused.
Creating a Stub page
The following example will walk through the process of creating a stub page for Keystatic CMS.
-
Upload an SVG logo optimized with SVGOMG to the
public/logos/
folder named for your servicekeystatic.svg
-
Add an entry for your service in the
src/data/logos.ts
data file of the form:keystatic: { file: 'keystatic.svg', padding: '0' },
-
Create a new MDX page named for your service in the CMS guides content folder
src/content/docs/en/guides/cms/keystatic.mdx
-
Use an existing guide as a reference, and the following frontmatter values in your
.mdx
file: -
Write a single line description of your service including a link to your main page. This should be factual, and not marketing-speak:
-
Use only the following
##
(<h2>
) headings in the body of the file as needed, and add any appropriate content.
You can use this past PR for CaisyCMS as a model: https://github.com/withastro/docs/pull/3749/files
Please wait until your page has been published before extending your stub into a full-guide.
Adding content to an existing stub
If you don’t have a full guide yet, you can expand a stub, even if it’s only an incremental addition.
Add new links
The third-party guides all have sections for external links. You can add a new official or community link by editing the page and making a PR.
Writing a new guide
The best way to start writing a new guide for these sections is to choose an existing one as an example.
-
Find a comparable guide in one of the subdirectories. Choose a guide whose service is similar to yours.
-
Copy the frontmatter contents of an existing file, and be sure the
title
anddescription
in the frontmatter are accurate and follow the established pattern. -
Copy the headings of the body content as appropriate. This should match the structure of other guides of that type. For example, a deployment guide should have a step-by-step “How to Deploy” section. A migration guide should have “Key Similarities” and “Key Differences” sections.
-
Add your own content and instructions, following the style of existing guides. Please consult our writing and style guide for more guidance.