Skip to content

Commit

Permalink
Frontmatter style guide fixes (#17394)
Browse files Browse the repository at this point in the history
* chore(style guide): Rename frontmatter doc

* feat(style guide): Doc undocced frontmatter fields

* feat(style guide): Define all "content types"

* feat(style guide): Explain translate field

* chore(style guide): Fix wrong `translate` info

* chore(style guide): Remove deprecated contentType

* chore(style guide): Remove topics, templates from frontmatter

* mayhaps some fixes?

* fix(style guide): Fixed a typo

---------

Co-authored-by: alexa <akristensen@newrelic.com>
Co-authored-by: nbaenam <nbaena@newrelic.com>
  • Loading branch information
3 people committed May 22, 2024
1 parent 3a5029c commit 7c556b0
Show file tree
Hide file tree
Showing 35 changed files with 184 additions and 329 deletions.
5 changes: 0 additions & 5 deletions src/content/docs/style-guide/formatting/hyperlinks.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Link guidelines
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- /docs/nronly/hyperlinks
- /docs/new-relic-only/style-guide/writing-guidelines/hyperlinks
Expand Down
5 changes: 0 additions & 5 deletions src/content/docs/style-guide/images/image-annotations.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Best practices for using image annotations
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
---


Expand Down
5 changes: 0 additions & 5 deletions src/content/docs/style-guide/images/screenshots-images.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Screenshots and images
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- /docs/style-guide/writing-guidelines/screenshots-images
---
Expand Down
5 changes: 0 additions & 5 deletions src/content/docs/style-guide/structure/levels-headings.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Levels of headings
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- /docs/nronly/levels-of-headings
- /docs/new-relic-only/style-guide/writing-guidelines/levels-headings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: How to write NerdGraph docs
contentType: page
template: basicDoc
---

This resource contains style guide recommendations and guidelines for writing about New Relic's NerdGraph API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: 'Pricing/billing-related guidelines'
contentType: page
template: basicDoc
redirects:
- /docs/style-guide/writing-guidelines/pricing-language-guidelines
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: 'Users/roles-related language guidelines'
contentType: page
template: basicDoc
redirects:
- /docs/style-guide/writing-guidelines/user-related-language-guidelines
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ subject: Agent release notes template
releaseDate: '2021-01-31'
version: 1.2.3
downloadLink: 'https://example.com'
type: releaseNote
redirects:
- /docs/new-relic-only/style-guide/miscellaneous/release-notes-template-123
- /docs/new-relic-only/advanced-style-guide/article-templates/release-notes-template-123
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Agent API method pages
type: apiDoc
shortDescription: 'Briefly describe the call. Ideally, one line or less.'
tags:
- Tech writer style guide
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: 'Prometheus integration template'
topics:
- New Relic only
- Basic style guide
- Writing guidelines
- Prometheus writing guidelines
---

**This document is a template for a Prometheus integration document**: Please skim the entire template first to understand the expected structure for this type of doc. Delete all content up to **Introduction (this heading won't be visible)**.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: "Tech writer tasks for What's New posts"
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
---

Technical writers play an important role in the publication of "What's new" posts. While our contributors follow [Instructions to create What's New posts](/docs/style-guide/writing-docs/article-templates/whats-new-template/), you will take some additional steps to help contributors finalize their work.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: "Instructions to create What's New posts"
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- /docs/style-guide/writing-docs/article-templates/whats-new-style-guidelines
---
Expand Down
11 changes: 4 additions & 7 deletions src/content/docs/style-guide/writing-docs/docs-translation.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Docs translation
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- >-
/docs/new-relic-only/drupal-configuration/page-components/manage-translated-docs
Expand All @@ -18,14 +13,16 @@ New Relic documentation exists on these sites:
* [**docs.newrelic.com**](https://docs.newrelic.com): English
* [**docs.newrelic.com/jp/**](https://docs.newrelic.com/jp/): Japanese
* [**docs.newrelic.com/kr/**](https://docs.newrelic.com/kr/): Korean
* [**docs.newrelic.com/es/**](https://docs.newrelic.com/es/): Spanish
* [**docs.newrelic.com/pt/**](https://docs.newrelic.com/pt/): Portuguese

You can toggle between languages with a button in the top menu bar.

## View translation status [#translation-status]

Every doc's frontmatter includes its translation status.
Every doc's frontmatter includes its human translation status.

If there is no `translate:` element in the frontmatter, the doc has not been translated into any other languages.
If there is no `translate:` element in the frontmatter, the doc is not human-translated into any languages. It will still be automatically translated into all our machine-translated languages.

If the `translate:` element has a language abbreviation, such as `jp`, then the doc has been translated, will be translated, or is under consideration for translation. For example:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
---
title: Create content for the preview docs site
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
---

The preview docs site hosts docs for upcoming features that we share with customers. Unlike the public docs site, the preview docs site isn't publicly editable and doesn't appear in search engine results. Users can't navigate from one preview doc to another, because the site isn't indexed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
---
title: Create release notes
contentType: page
template: basicDoc
topics:
- Basic style guide
- Writing guidelines
redirects:
- /docs/new-relic-only/basic-style-guide/writing-guidelines/create-release-notes
- /docs/style-guide/article-templates/create-release-notes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
title: Frontmatter and page templates
tags:
- Tech writer style guide
- Processes and procedures
redirects:
- /docs/new-relic-only/style-guide/processes-and-procedures/using-content-editors
- /docs/new-relic-only/style-guide/processes-procedures/using-content-editors
- /docs/new-relic-only/advanced-style-guide/processes-procedures/using-content-editors
- /docs/new-relic-only/tech-writer-style-guide/processes-procedures/using-content-editors
- /docs/style-guide/processes-procedures/use-content-types-text-formats
- /docs/style-guide/writing-docs/processes-procedures/use-content-types-text-formats
---

This style guide page describes the standard frontmatter for docs, and also outlines the various types of content we maintain on the site.

## Docs frontmatter and metadata [#meta-fields]

The top of every doc begins with a set of metadata. Read on for more about this metadata content:

<table>
<thead>
<tr>
<th width={150}>
**Meta content field**
</th>

<th>
**Description**
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
`title`
</td>

<td>
The primay title of the doc, which will show up at the top of the doc as an `<h1>` HTML header, in the browser page title, and in search engine meta fields.

Whenever possible, provide an action-oriented or task-oriented title; for example, "AJAX page: Identify time-consuming calls." In general, use sentence case. Capitalize only the first word. Do not capitalize any other word in the title unless it's a proper noun, such as a specific product name, or it follows a colon `:`.

If you're looking for ideas on how to choose a title, browse the titles of similar docs.

The title used in the sidebar (left navigation pane) is set in [the nav file](/docs/style-guide/processes-procedures/update-left-navigation-pane).
</td>
</tr>

<tr>
<td>
`tags`
</td>

<td>
Deprecated. Historically, tags were used to help search engines and AI find the right content. Modern engines are sophisticated enough to infer that context without tags, so this tag is no longer needed.
</td>
</tr>

<tr>
<td>
`translate`
</td>

<td>
Indicates which languages this page is human-translated into. This field doesn't govern machine translation; generally speaking, all "standard" docs on the site are machine-translated into all languages. For more, see [Docs translation](/docs/style-guide/writing-docs/docs-translation/).
</td>
</tr>

<tr>
<td>
`metaDescription`
</td>

<td>
A short description of the doc. Search engines rely on this field to understand what a doc is about, and they'll often show the meta description right in the search results. Should be under 160 characters. For more on why meta descriptions matter to search, see [Control your snippets in search results](https://developers.google.com/search/docs/appearance/snippet) in Google's documentation.
</td>
</tr>

<tr>
<td>
`redirects`
</td>

<td>
Redirects **to** this doc from old URLs. One redirect per line. Use a relative path and don't include a trailing slash `/`.
</td>
</tr>

<tr>
<td>
`freshnessValidatedDate`
</td>

<td>
The last time a writer made significant updates to this doc and verified its accuracy.

The default is `never`. When you make a significant update to a doc, add today's date in this format: `YYYY-MM-DD`.
</td>
</tr>
</tbody>
</table>

## Page templates

The docs site doesn't have strict page templates—since we have a "docs as code" approach, writers can use a variety of components to structure docs however they think best. However, we do have several unique types of content that behave differently than our standard `.mdx` docs.

<table>
<thead>
<tr>
<th width={150}>
**Content type**
</th>

<th>
**Description**
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
"Standard" docs
</td>

<td>
A standard `.mdx` file, living in the `/src/content/docs/` subdirectory. This content type is used for the majority of content on the site.
</td>
</tr>

<tr>
<td>
Attribute definition
</td>

<td>
This format is for defining attributes and event types. These definitions live in their own GitHub Enterprise repo, then they're published to the docs site and NerdGraph via the data dictionary service. For more, see [Work with attribute definition content type](/docs/style-guide/article-templates/attribute-definition-template).
</td>
</tr>

<tr>
<td>
Branching install docs
</td>

<td>
This format is for interactive installation docs. Branching install docs consist of multiple components in individual `.mdx` files that live together in a subdirectory, with the logic that defines which pieces to show when defined in a separate `.yaml` file. Branching install content lives in the `/src/install/` subdirectory.

For more, see [Get started with the branched install component](/docs/style-guide/writing-docs/article-templates/intro-branch-install-doc/).
</td>
</tr>

<tr>
<td>
Release notes
</td>

<td>
This format includes unique frontmatter fields. Release notes live in `/src/content/docs/release-notes/`, and they are generally authored by product teams rather than writers.

Users rely on release notes to keep up with smaller changes in the product, particularly for downloadable software like the agents. For more, see [Create release notes](/docs/style-guide/article-templates/create-release-notes/).
</td>
</tr>

<tr>
<td>
What's New posts
</td>

<td>
This format includes unique frontmatter fields. What's New posts are created by PMM for larger announcements. Unlike most content, they live in `/src/content/whats-new/` rather than in the `/docs/` subdirectory.

They're available in the docs site, but they're also visible in the New Relic UI. For more, see [What's New style guidelines](/docs/style-guide/article-templates/whats-new-style-guidelines/).
</td>
</tr>
</tbody>
</table>
Loading

0 comments on commit 7c556b0

Please sign in to comment.