# Contributing
Contributing new or updated documentation to Hermes is very easy.
# Editing Existing Content
- Use the bottom-of-page link or clone the repo and make adjustments to the existing file.
- Create a Merge Request for the changes to enter the
masterbranch. - Once merges, the pipeline will auto-generate and publish the new docs.
# Adding a New Page
# Using an Existing Sidebar
If your page can be categorized under an existing sidebar entry follow these steps. In the examples we'll add a new page under /aws/ about security groups.
- Create a new
.mdfile with the URL-friendly path name of your desired page within the appropriate/docs/sidebar directory (e.g./docs/aws/security-groups.md):
touch docs/aws/security-groups.md
- Add content to the
.mdfile:
---
title: Security Groups
---
# Security Groups
- TODO: This page should contain information about developer-specific AWS Security Groups.
- Open
/docs/.vuepress/config.js. - Add a new entry in the
themeConfig.sidebar[{title: 'aws'}].childrenarray that matches the URL path of the new page (excluding the.mdextension):
module.exports = {
// ...
themeConfig: {
// ...
sidebar: [
// ...
{
// ...
children: [
// ...
'/aws/security-groups'
]
}
]
}
}
- Run
yarn devto rebuild and check your new page displays in the appropriate sidebar and can be viewed.
# With a New Sidebar
If your page requires a new sidebar entry, follow these initial steps. To illustrate, we'll be creating a new page about this Hermes project that should be available at the URL /projects/hermes and be displayed under a new Projects sidebar menu.
- Create a new directory under
/docs/to match the desired URL path (e.g.projects):
mkdir docs/projects
- Create a new
.mdfile with the URL-friendly path name of your desired page (e.g.hermes.md):
touch docs/projects/hermes.md
- Add content to the
.mdfile:
---
title: Project: Hermes
---
# Project: Hermes
This is a new page about the Hermes project.
- Add a new object to the
themeConfig.sidebararray. Thetitleis the string sidebar name, and thechildrenarray should be the full path to the new page(s) you want to link to:
module.exports = {
// ...
themeConfig: {
// ...
sidebar: [
// ...
{
title: 'Projects',
collapsable: false,
sidebarDepth: 2,
children: [
'/projects/hermes'
]
}
]
}
}
- Run
yarn devto rebuild and test the changes.
# Adding Sidebar Index Pages
- If you need a new page to be the index page of a sidebar path just name it
index.md. - Ensure the
themeConfig.sidebarobject has apathproperty, which will automatically point to theindex.mdfound in that directory. Here's the sidebar configuration of this very/docs/contributing/index.mdfile, to illustrate:
module.exports = {
// ...
themeConfig: {
// ...
sidebar: [
// ...
{
title: 'Contributing',
path: '/contributing/',
collapsable: false,
sidebarDepth: 2
}
]
}
}
# Additional Help
See the VuePress official documentation for information on Markdown syntax, page/theme modifications, and much more.