Writing Docs
This document contains guidelines for contributing changes to the Ent documentation website.
The Ent documentation website is generated from the project’s main GitHub repo.
Follow this short guide to contribute documentation improvements and additions:
Setting Up
The documentation site uses Docusaurus. To run it you will need Node.js installed.
Install the dependencies:
cd doc/website && npm install
- Run the website in development mode:
cd doc/website && npm start
- Open you browser at http://localhost:3000.
General Guidelines
- Documentation files are located in
doc/md
, they are Markdown-formatted with “front-matter” style annotations at the top. Read more about Docusaurus’s document format. - Ent uses Golang CommitMessage formats to keep the repository’s history nice and readable. As such, please use a commit message such as:
doc/md: adding a guide on contribution of docs to ent
Adding New Documents
Add a new Markdown file in the
doc/md
directory, for exampledoc/md/writing-docs.md
.The file should be formatted as such:
---
id: writing-docs
title: Writing Docs
---
...
Where id
should be a unique identifier for the document, should be the same as the filename without the .md
suffix, and title
is the title of the document as it will appear in the page itself and any navigation element on the site.
- If you want the page to appear in the documentation website’s sidebar, add its
id
towebsite/sidebars.js
, for example:
{
type: 'category',
label: 'Misc',
items: [
'templates',
'graphql',
'sql-integration',
'testing',
'faq',
'generating-ent-schemas',
'feature-flags',
'translations',
'contributors',
+ 'writing-docs',
'slack'
],
collapsed: false,
},