Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 2.8 KB

how_to_contribute_to_docs.md

File metadata and controls

78 lines (59 loc) · 2.8 KB

How to Contribute to Docs

Website Documentation Guidelines

If you haven't build website locally yet, run following commands inside theupdateframework directory (use your forked repository)

 $ yarn install
 $ hugo server

This will run website locally on http://localhost:1313 by default.

The content directory is used as a source for Markdown files (Docs), which Hugo uses to generate the TUF website resources.

Add Menu on Website


The starting step is to add a route to render your Markdown file.

Navigate to the config.toml file.

Create Menu with Submenu options

When the Menu contains SubMenu options:

  • Use the following format:
[[menu.main]]
name = "<Menu>"
identifier ="<Menu_Identifier>"
weight = <order>
  • Place the Menu at the relevent position in config.toml based on its weight.
  • Restart the Hugo server to see changes.

Create Menu without SubMenu options

When the Menu does not contain any Submenu options:

  • Use the following format:
[[menu.main]]
name = "<Menu>"
url = "/<route>/"
weight = <order>
  • Place the section at the relevant position according to its weight in config.toml.
  • Restart the Hugo server to see changes.

Add SubMenu options to Parent Menu


  • Use the following format:
[[menu.main]]
name = "<SubMenu_Heading>"
parent = "<Menu>"
url = "/<route>"  #This should be in lowercase, relates to SubMenu heading, and should not conflict with other routes
weight = <order>
  • Position the SubMenu at the relevant place according to its weight in config.toml.
  • Restart the Hugo server to see changes.

Markdown Files for Menu or SubMenu options


  • The Markdown file name should be <route>.md for consistency.
  • Front Matter is essential on top of every Markdown. In Hugo, the title is defined like this:
---
title: <title>
---

Content can be written according to Markdown rules subject to Hugo Markdown Support.

Need Help?

If you have any question, please reach out to us here.