Skip to content

File conventions

Our docs have a few conventions around files.

Naming

When creating new files, follow specific conventions for your naming.

Filenames should:

  • Semantically communicate the purpose of the file
  • Be lowercased
  • Use dashes between words
Acceptable file names
/src/content/docs/fundamentals/concepts/what-is-cloudflare.mdx
/src/assets/images/api-shield/api-shield-call-sequence.png
Unacceptable file names
/src/content/docs/fundamentals/concepts/What is Cloudflare.mdx
/src/content/docs/fundamentals/concepts/What-is-Cloudflare.mdx
/src/assets/images/api-shield/API_Image_1.png

These conventions are important for user readibility, SEO conventions, and making sure our GitHub actions do not break.

Folders

Each folder should have a file named index.mdx.

/src/content/docs/fundamentals/concepts/index.mdx

The content at /src/content/docs/fundamentals/concepts/index.mdx will be rendered at https://developers.cloudflare.com/fundamentals/concepts/.

Content files

Add regular content files to the /src/content/docs/{product_folder}/ directory.

/src/content/docs/fundamentals/concepts/what-is-cloudflare.mdx

Image files

Add image files to the /src/assets/images/{product_folder}/ directory.

/src/assets/images/api-shield/api-shield-call-sequence.png