• EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Update the home page

You can't just hit the edit button docs.newrelic.com to make edits to the home page. The page that opens is index.js, the file that manages the parts of the home page, but not the content. It's rare that you'll need to make changes to this file. Most home page changes will be to add a new tile or section to the page, or update links. These types of changes are handled in two files:

  • src/data/homepage.yml - contains home page section titles, section descriptions, and the URLs for tiles.
  • src/i18n/translations/en/translation.json - contains tile info, including the title and short description of tiles.

Change or add new links using homepage.yml.

  1. In homepage.yml, search for the link you want to change.
  2. Edit the URL, save, commit, and PR the change.

Add a new tile to the home page

You'll make changes to both homepage.yml and translations.json

  1. On the translations.json doc, find the spot where you want to add the new tile (which section, and in what order you want it to appear), and add a new entry with this format:

    "t#": {
    "title": "tile name",
    "description": "Short description."
    },

    Make sure you update the number on the tile. If you want to insert it in the middle of a group, update all the subsequent tile numbers as well.

  2. Save the file.

  3. Open homepage.yml, find the spot where the new tile will be, and add a new line with the relative link for the new tile. For example, - /docs/new-relic-one/use-new-relic-one/workloads/workloads-isolate-resolve-incidents-faster

  4. Save and check that your new tile builds properly on a local build.

  5. Commit, push, PR when you're ready.

Add a new section to the home page

  1. On the translations.json page, add a new section modeled in the spot where you want the new section to appear. Include at least one title. For example, here's the TDP entry, with one tile:

    "errors-inbox": {
    "title": "Errors Inbox",
    "description": "A single place to proactively detect, triage, and take action on all the errors before they impact customers.",
    "t1": {
    "title": "Introduction to Errors Inbox",
    "description": "How to manage all your monitoring in one place."
    },
  2. When you're done creating the info, save the file.

  3. In the homepage.yml page, find the corresponding location for the new section, and add the short name you provided in the translation.json file, title, description, and tile URLs. For example, here's the corresponding TDP section on homepage.yml.

    errors-inbox:
    title: Errors Inbox
    description: A single place to proactively detect, triage, and take action on all the errors before they impact customers.
    tiles:
    - /docs/errors-inbox/errors-inbox
  4. Save, build locally, commit, PR.

Edit the home page left nav

The left nav of the home page is controlled by src/nav/root.yml. This is a basic yml file, similar to our taxonomy files. Each link on the left nav needs a title and a path:

- title: Welcome to New Relic
path: /docs/using-new-relic
- title: New Relic platform
path: /docs/new-relic-one/use-new-relic-one
- title: Guides and best practices
path: /docs/new-relic-solutions
- title: section-break
- title: Alerts
path: /docs/alerts-applied-intelligence

You can add a new link by following the pattern above or delete a link by removing the corresponding title and path. Section breaks are added by including a - title: section-break line. The left nav reflects the exact order of root.yml, so it's easy to organize it as needed.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.