You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Updating the navigation](#updating-the-navigation)
5
6
6
7
# Guidelines for contributing
7
8
@@ -13,5 +14,53 @@ Note that our [code of conduct](./CODE_OF_CONDUCT.md) applies to all platforms a
13
14
14
15
If you wish to make ducmentation edits, create a guide, or add new documentation, follow our documentation contribution guidelines below. **TODO**
15
16
16
-
If you'd like to make code contributions, follow the code [style guide](STYLE_GUIDE.md).
17
+
If you'd like to make code contributions, follow the code [style guide](https://github.com/newrelic/developer-website/blob/develop/STYLE_GUIDE.md).
17
18
19
+
# Updating the navigation
20
+
21
+
Navigation for [docs.newrelic.com](https://docs.newrelic.com) is stored in `YAML` files located in the [`src/nav`](https://github.com/newrelic/docs-website/tree/develop/src/nav) directory. Each top-level navigation should have it's own configuration file. For example, here is a snippet of the [`src/nav/insights.yml`](https://github.com/newrelic/docs-website/blob/develop/src/nav/insights.yml) configuration:
| `title` | yes | The text that is shown in the navigation. |
47
+
| `path` | no | The URL path to the page. |
48
+
| `children` | no | Any sub-navigation "nodes". |
49
+
50
+
When the user goes to a page, we determine which section of the site they are on and load the appropriate `.yml` file to populate the sidebar navigation. The navigation for the homepage is an aggregate of all the top-level pages.
51
+
52
+
## Adding a new page
53
+
54
+
1. Determine which section of the navigation you would like the page to belong to (i.e. _Full Stack Observability_).
55
+
2. Find the configuration file for that section (i.e. [`src/nav/full-stack-observability.yml`](https://github.com/newrelic/docs-website/blob/develop/src/nav/full-stack-observability.yml)).
56
+
3. Find the parent page you would like the new page to live under.
57
+
4. Add a "node" for the page under the parent page's `children`.
58
+
59
+
If you intend on adding an entirely new section to the navigation, create a new file in the [`src/nav`](https://github.com/newrelic/docs-website/tree/develop/src/nav) directory using the same format as outlined above.
60
+
61
+
## Moving a page to a new location
62
+
63
+
1. Determine which section of the navigation the page.
64
+
2. Find the configuration file for that section.
65
+
3. Find the page within the configuration file and delete that entry.
66
+
4. Follow the steps above to add the page to a new location.
0 commit comments