Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] SEO fixes #2937

Merged
merged 7 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions site/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,13 @@
target = "archetypes"

ignoreFiles = [ "\\.ttf$", "\\.woff$", "\\.woff2$", "\\.eot$" ]

[permalinks]
"/" = "/docs/:section/:title/"
"faqs" = "/docs/:section/:title/"
"glossaries" = "/docs/:section/:title/"
"how_tos" = "/docs/:section/:title/"
"integrations" = "/docs/:section/:title/"
"m3coordinators" = "/docs/:section/:title/"
"m3dbs" = "/docs/:section/:title/"
"m3querys" = "/docs/:section/:title/"
"operational_guides" = "/docs/:section/:title/"
"overviews" = "/docs/:section/:title/"
"quickstarts" = "/docs/:section/:title/"
"troubleshootings" = "/docs/:section/:title/"

enableRobotsTXT = true
metaDataFormat = "yaml"
# theme = "docs-theme"
# baseURL = "/"
languageCode = "en-US"
defaultContentLanguage = "en"
# staticDir = ["static"]

title = "M3DB Documentation"
metaDataFormat = "yaml"
defaultContentLanguageInSubdir= true

# Highlighting config.
Expand All @@ -65,9 +49,22 @@ pygmentsUseClassic = false
#pygmentsOptions = "linenos=table"
# See https://help.farbox.com/pygments.html
# pygmentsStyle = "vs"

enableGitInfo = true

[permalinks]
"/" = "/docs/:section/:filename/"
"faqs" = "/docs/:section/:filename/"
"glossaries" = "/docs/:section/:filename/"
"how_tos" = "/docs/:section/:filename/"
"integrations" = "/docs/:section/:filename/"
"m3coordinators" = "/docs/:section/:filename/"
"m3dbs" = "/docs/:section/:filename/"
"m3querys" = "/docs/:section/:filename/"
"operational_guides" = "/docs/:section/:filename/"
"overviews" = "/docs/:section/:filename/"
"quickstarts" = "/docs/:section/:filename/"
"troubleshootings" = "/docs/:section/:filename/"

[frontmatter]
# date = ["date", ":filename", "publishDate", "lastmod"]

Expand Down Expand Up @@ -99,16 +96,17 @@ githubWebsiteRaw = "raw.githubusercontent.com/m3db/m3"
offlineSearch = false

[params]
title = "M3 Documentation"
# Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page.
# Useful to give opportunity to people to create merge request for your doc.
# See the config.toml file from this documentation site to have an example.
# TODO: pattern to branch?
# TODO: bring back
# editURL = "https://github.com/m3db/m3/tree/master/site/content/"
# Author of the site, will be used in meta information
author = "m3"
author = "The M3 team and community"
# Description of the site, will be used in meta information
description = "m3documentation"
description = "M3 is a Prometheus compatible, easy to adopt metrics engine that provides visibility for some of the world’s largest brands."
# Shows a checkmark for visited pages on the menu
showVisitedLinks = false
# Disable search function. It will hide search bar
Expand Down
5 changes: 0 additions & 5 deletions site/config/development/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ languageCode = "en-US"
defaultContentLanguage = "en"
# staticDir = ["static"]

title = "M3DB Documentation"
metaDataFormat = "yaml"
defaultContentLanguageInSubdir= true

Expand Down Expand Up @@ -105,10 +104,6 @@ offlineSearch = false
# TODO: pattern to branch?
# TODO: bring back
# editURL = "https://github.com/m3db/m3/tree/master/site/content/"
# Author of the site, will be used in meta information
author = "m3"
# Description of the site, will be used in meta information
description = "m3documentation"
# Shows a checkmark for visited pages on the menu
showVisitedLinks = false
# Disable search function. It will hide search bar
Expand Down
5 changes: 0 additions & 5 deletions site/config/production/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ languageCode = "en-US"
defaultContentLanguage = "en"
# staticDir = ["static"]

title = "M3DB Documentation"
metaDataFormat = "yaml"
defaultContentLanguageInSubdir= true

Expand Down Expand Up @@ -105,10 +104,6 @@ offlineSearch = false
# TODO: pattern to branch?
# TODO: bring back
# editURL = "https://github.com/m3db/m3/tree/master/site/content/"
# Author of the site, will be used in meta information
author = "m3"
# Description of the site, will be used in meta information
description = "m3documentation"
# Shows a checkmark for visited pages on the menu
showVisitedLinks = false
# Disable search function. It will hide search bar
Expand Down
42 changes: 0 additions & 42 deletions site/content/index.md

This file was deleted.

5 changes: 2 additions & 3 deletions site/content/quickstart/docker.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
title: "Docker"
linkTitle: "Docker"
title: Creating a Single Node M3DB Cluster with Docker
weight: 1
---

<!-- TODO: Fix dates. Cross-platform date generation is a pain, so maybe use Docker locally? See what Netlify supports, or maybe there is a Hugo variable, or create a shortcode -->

## Creating a Single Node M3DB Cluster with Docker

This guide shows how to install and configure M3DB, create a single-node cluster, and read and write metrics to it.

{{% notice warning %}}
Expand Down
11 changes: 5 additions & 6 deletions site/content/quickstart/kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
title: "Kubernetes"
linkTitle: "Kubernetes"
title: Create a M3DB Cluster on Kubernetes
weight: 2
---

## Create a M3DB Cluster on Kubernetes

1. Meet the M3DB Kubernetes operator [requirements guide](/docs/operator/getting_started/requirements).
2. Follow the M3DB Kubernetes operator [installation guide](/docs/operator/getting_started/installation).
3. Read the M3DB Kubernetes operator [configuration guide](/docs/operator/configuration/configuring_m3db) and configure [namespaces](/docs/operator/configuration/namespaces).
1. Meet the M3DB Kubernetes operator [requirements guide](/docs/operator/getting_started/requirements).
2. Follow the M3DB Kubernetes operator [installation guide](/docs/operator/getting_started/installation).
3. Read the M3DB Kubernetes operator [configuration guide](/docs/operator/configuration/configuring_m3db) and configure [namespaces](/docs/operator/configuration/namespaces).
5 changes: 1 addition & 4 deletions site/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ module m3-site

go 1.15

require (
github.com/chronosphereio/docs-theme v0.0.0-20201022162748-0ed11ce73f36 // indirect
github.com/chronosphereio/victor v0.0.0-20201122114854-310af010cab1 // indirect
)
require github.com/chronosphereio/victor v0.0.0-20201122114854-310af010cab1 // indirect
112 changes: 57 additions & 55 deletions site/layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,70 @@
{{- define "section-tree-nav" }}
{{- $showvisitedlinks := .showvisitedlinks }}
{{- $currentNode := .currentnode }}
{{- with .sect}}
{{- if and .IsSection (or (not .Params.hidden) $.showhidden)}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{- safeHTML .Params.head}}
<li data-nav-id="{{.Permalink}}" class="dd-item
{{- with .sect}}
{{- if and .IsSection (or (not .Params.hidden) $.showhidden)}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{- safeHTML .Params.head}}
<li data-nav-id="{{.Permalink}}" class="dd-item
{{- if .IsAncestor $currentNode}} parent{{end}}
{{- if eq .Permalink $currentNode.Permalink}} active{{end}}
{{- if .Params.alwaysopen}} alwaysopen{{end -}}
{{- if ne $numberOfPages 0 }} haschildren{{end}}
">
<div class="card-header bg-blue-medium-light c-px-5 c-py-2">
<a href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{.Title}}{{safeHTML .Params.Post}}</a>

{{- if ne $numberOfPages 0 }}
{{- if or (.IsAncestor $currentNode) (.Params.alwaysopen) }}
<i class="fa fa-angle-down fa-lg category-icon"></i>
{{- else -}}
<i class="fa fa-angle-right fa-lg category-icon"></i>
{{- end}}
{{- end}}
<div class="card-header bg-blue-medium-light c-px-5 c-py-2">
<a href="{{ .RelPermalink}}">
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
</a>

{{- if $showvisitedlinks}}<i class="fa fa-circle-thin read-icon"></i>{{end}}
</div>
{{- if ne $numberOfPages 0 }}
<ul>
{{- .Scratch.Set "pages" .Pages }}
{{- if .Sections}}
{{- .Scratch.Set "pages" (.Pages | union .Sections) }}
{{- end}}
{{- $pages := (.Scratch.Get "pages") }}
{{- if ne $numberOfPages 0 }}
{{- if or (.IsAncestor $currentNode) (.Params.alwaysopen) }}
<i class="fa fa-angle-down fa-lg category-icon"></i>
{{- else -}}
<i class="fa fa-angle-right fa-lg category-icon"></i>
{{- end}}
{{- end}}

{{- if eq .Site.Params.ordersectionsby "title"}}
{{- range $pages.ByTitle }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
{{- end}}
{{- end}}
{{- else}}
{{- range $pages.ByWeight }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
{{- end}}
{{- end}}
{{- end}}
</ul>
{{- end}}
</li>
{{- else}}
{{- if not .Params.Hidden }}
<li data-nav-id="{{.Permalink}}" class="dd-item
{{- if $showvisitedlinks}}<i class="fa fa-circle-thin read-icon"></i>{{end}}
</div>
{{- if ne $numberOfPages 0 }}
<ul>
{{- .Scratch.Set "pages" .Pages }}
{{- if .Sections}}
{{- .Scratch.Set "pages" (.Pages | union .Sections) }}
{{- end}}
{{- $pages := (.Scratch.Get "pages") }}

{{- if eq .Site.Params.ordersectionsby "title"}}
{{- range $pages.ByTitle }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
{{- end}}
{{- end}}
{{- else}}
{{- range $pages.ByWeight }}
{{- if and .Params.hidden (not $.showhidden) }}
{{- else}}
{{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "showvisitedlinks" $showvisitedlinks }}
{{- end}}
{{- end}}
{{- end}}
</ul>
{{- end}}
</li>
{{- else}}
{{- if not .Params.Hidden }}
<li data-nav-id="{{.Permalink}}" class="dd-item
{{- if eq .Permalink $currentNode.Permalink}} active{{end -}}
">
<div class="card-header bg-blue-medium-light c-px-5 c-py-2">
<a href="{{ .RelPermalink}}">
{{safeHTML .Params.Pre}}{{.LinkTitle}}{{safeHTML .Params.Post}}
</a>
{{- if $showvisitedlinks}}<i class="fa fa-circle-thin read-icon"></i>{{end}}
</div>
</li>
{{- end}}
{{- end}}
{{- end}}
<div class="card-header bg-blue-medium-light c-px-5 c-py-2">
<a href="{{ .RelPermalink}}">
{{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}}
</a>
{{- if $showvisitedlinks}}<i class="fa fa-circle-thin read-icon"></i>{{end}}
</div>
</li>
{{- end}}
{{- end}}
{{- end}}
{{- end}}