diff --git a/docsy.dev/content/en/docs/adding-content/_index.md b/docsy.dev/content/en/docs/adding-content/_index.md index 987330fd4b..ebc59cb78b 100644 --- a/docsy.dev/content/en/docs/adding-content/_index.md +++ b/docsy.dev/content/en/docs/adding-content/_index.md @@ -2,5 +2,5 @@ title: Content and Customization weight: 3 description: How to add content to and customize your Docsy site. -sidebar_root_for: children +sidebar_root_for: self --- diff --git a/docsy.dev/content/en/docs/best-practices/_index.md b/docsy.dev/content/en/docs/best-practices/_index.md index fb1ee788d6..cd8c0e6455 100644 --- a/docsy.dev/content/en/docs/best-practices/_index.md +++ b/docsy.dev/content/en/docs/best-practices/_index.md @@ -3,6 +3,7 @@ title: "Best Practices" weight: 9 description: > Optional guidance and recommendations about organizing, authoring, and managing your technical documentation. +sidebar_root_for: children --- Use this section to learn about some of the best practices around creating technical documentation with Docsy. diff --git a/docsy.dev/content/en/docs/get-started/_index.md b/docsy.dev/content/en/docs/get-started/_index.md index afae0e03fe..738cc67a32 100644 --- a/docsy.dev/content/en/docs/get-started/_index.md +++ b/docsy.dev/content/en/docs/get-started/_index.md @@ -7,6 +7,7 @@ date: 2018-07-30 description: Learn how to get started with Docsy, including the available options for installing and using the Docsy theme. +sidebar_root_for: self --- As you saw in our introduction, Docsy is a [Hugo](https://gohugo.io) theme, which means that if you want to use Docsy, you need to set up your website source so that the Hugo static site generator can find and use the Docsy theme files when building your site. The simplest way to do this is to copy and edit our example site, though we also provide instructions for adding the Docsy theme manually to new or existing sites. diff --git a/docsy.dev/package.json b/docsy.dev/package.json index 0e157f1db5..a3598bfd56 100644 --- a/docsy.dev/package.json +++ b/docsy.dev/package.json @@ -20,6 +20,7 @@ "check:links": "npm run _check:links", "clean": "rm -Rf public", "fix:format": "npm run _check:format -- --write", + "fix": "npm run fix:format && npm run _refcache:prune", "make:public": "git init -b main public", "postbuild:preview": "npm run _check:links--warn", "postbuild:production": "npm run _check:links--warn", diff --git a/layouts/_partials/sidebar-tree.html b/layouts/_partials/sidebar-tree.html index e309fd10cb..ddd6d8ba33 100644 --- a/layouts/_partials/sidebar-tree.html +++ b/layouts/_partials/sidebar-tree.html @@ -110,6 +110,11 @@ $s.Params.manualLinkTitle $s.Title -}} + {{ if and $treeRoot (eq $s.Params.sidebar_root_for "self") -}} + {{ with $s.Parent -}} + {{ $manualLink = .RelPermalink -}} + {{ end -}} + {{ end -}}