提交 dbe0a935 编写于 作者: G Geri Ochoa 提交者: tekton-robot

Rework left-hand nav order

- Refactor config file for legibiltiy
- Write new menu logic to pick manual menu from config file
- Replace spaces with dashes in folder names
上级 a4747657
baseURL = "/"
title = "Tekton"
enableRobotsTXT = true
# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
# Will give values to .Lastmod etc.
enableGitInfo = true
# Language settings
contentDir = "content/en"
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false
# Useful when translating.
enableMissingTranslationPlaceholders = true
disableKinds = ["taxonomy", "taxonomyTerm"]
# Highlighting config
pygmentsCodeFences = true
pygmentsUseClasses = false
# Use the new Chroma Go highlighter in Hugo.
pygmentsUseClassic = false
pygmentsStyle = "manni"
# Enables emoji
enableEmoji = true
# Ignore vendor files
ignoreFiles = ['vendor/.*']
# Enable rss
rss_sections = ["blog"]
# Configure how URLs look like per section.
[permalinks]
blog = "/:section/:year/:month/:day/:slug/"
[markup]
defaultMarkdownHandler = "goldmark"
## Configuration for goldmark markdown parser: https://gohugo.io/getting-started/configuration-markup/#goldmark
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
# Image processing configuration.
[imaging]
resampleFilter = "CatmullRom"
quality = 75
anchor = "smart"
[services]
[services.googleAnalytics]
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
id = "UA-154682132-1"
# Language configuration
[languages]
[languages.en]
title = "Tekton"
description = "Cloud Native CI/CD"
languageName ="English"
# Weight used for sorting.
weight = 1
# Everything below this are Site Params
[params]
# First one is picked as the Twitter card image if not set on page.
# images = ["images/project-illustration.png"]
# Menu title if your navbar has a versions selector to access old versions of your site.
# This menu appears only if you have at least one [params.versions] set.
version_menu = "Releases"
# Repository configuration (URLs for in-page links to opening issues and suggesting changes)
github_repo = "https://github.com/tektoncd/website"
# Specify a value here if your content directory is not in your repo's root directory
# github_subdir = ""
# Google Custom Search Engine ID. Remove or comment out to disable search.
gcs_engine_id = "013756393218025596041:6eajntqsa6c"
# User interface configuration
[params.ui]
# Enable to show the side bar menu in its compact state.
sidebar_menu_compact = true
# Add fold animation to sidebar
sidebar_menu_foldable = true
# Set to true to disable breadcrumb navigation.
breadcrumb_disable = false
# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled)
sidebar_search_disable = false
# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar
navbar_logo = true
# Set to true to disable the About link in the site footer
footer_about_disable = false
# Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events.
# This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set.
# If you want this feature, but occasionally need to remove the "Feedback" section from a single page,
# add "hide_feedback: true" to the page's front matter.
[params.ui.feedback]
enable = true
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
yes = 'Thanks! <a href="https://github.com/tektoncd/website/issues/new">Tell us how we can further improve</a>.'
no = 'Sorry about that. <a href="https://github.com/tektoncd/website/issues/new">Tell us how we can further improve</a>.'
[params.links]
# Developer relevant links. These will show up on right side of footer and in the community page if you have one.
[[params.links.developer]]
name = "GitHub"
url = "https://github.com/tektoncd"
icon = "fab fa-github"
desc = "GitHub organization for the Tekton project"
baseURL: /
title: Tekton
enableRobotsTXT: true
theme:
- github.com/google/docsy
- github.com/google/docsy/dependencies
enableGitInfo: true
contentDir: content/en
defaultContentLanguage: en
defaultContentLanguageInSubdir: false
enableMissingTranslationPlaceholders: true
disableKinds:
- taxonomy
- taxonomyTerm
pygmentsCodeFences: true
pygmentsUseClasses: false
pygmentsUseClassic: false
pygmentsStyle: manni
enableEmoji: true
ignoreFiles:
- vendor/.*
rss_sections:
- blog
permalinks:
blog: /:section/:year/:month/:day/:slug/
markup:
defaultMarkdownHandler: goldmark
goldmark:
renderer:
unsafe: true
imaging:
resampleFilter: CatmullRom
quality: 75
anchor: smart
services:
googleAnalytics:
id: UA-154682132-1
languages:
en:
title: Tekton
description: Cloud Native CI/CD
languageName: English
weight: 1
params:
version_menu: Releases
github_repo: https://github.com/tektoncd/website
gcs_engine_id: 013756393218025596041:6eajntqsa6c
ui:
sidebar_menu_compact: false
sidebar_menu_foldable: true
breadcrumb_disable: false
sidebar_search_disable: false
navbar_logo: true
footer_about_disable: false
feedback:
enable: true
yes:
Thanks! <a href="https://github.com/tektoncd/website/issues/new">Tell us
how we can further improve</a>.
no: Sorry about that. <a
href="https://github.com/tektoncd/website/issues/new">Tell us how we can
further improve</a>.
links:
developer:
- name: GitHub
url: https://github.com/tektoncd
icon: fab fa-github
desc: GitHub organization for the Tekton project
sectionPagesMenu: "docs"
menu:
docs:
- name: "Getting Started"
url: "/docs/getting-started/"
weight: 1
- name: "Installation"
url: "/docs/installation/"
weight: 2
- name: "Concepts"
url: "/docs/concepts/"
weight: 3
- name: "How-to Guides"
url: "/docs/how-to-guides/"
weight: 4
- name: "Tasks and Pipelines"
url: "/docs/pipelines/"
weight: 5
- name: "Triggers and EventListeners"
url: "/docs/triggers/"
weight: 6
- name: "Command-Line Interface"
url: "/docs/cli/"
weight: 7
- name: "Supply Chain Security"
url: "/docs/chains/"
weight: 8
- name: "Operator"
url: "/docs/operator/"
weight: 9
- name: "Dashboard"
url: "/docs/dashboard/"
weight: 10
- name: "Results"
url: "/docs/results/"
weight: 11
- name: "Contribute"
url: "/docs/contribute/"
weight: 100
<!--
---
title: "Concepts"
linkTitle: "Concepts"
......@@ -5,6 +6,7 @@ weight: 3
description: >
Conceptual and technical information about Tekton
---
-->
This section presents an overview of what the Tekton project is and how some of
its building blocks work.
......
......@@ -2,7 +2,7 @@
---
title: "Contribute to Documentation"
linkTitle: "Contribute to Documentation"
weight: 11
weight: 0
description: >
Contribution guidelines
---
......
<!--
---
title: "Installation"
linkTitle: "Installation"
......@@ -5,6 +6,7 @@ weight: 2
description: >
Installation instructions for Tekton components
---
-->
This section contains guides to install the latest version of the Tekton
components. For other versions, select the component and version from the
......
---
title: "Welcome to Tekton"
linkTitle: "Documentation"
weight: 20
weight: 1
menu:
main:
weight: 20
weight: 1
---
Tekton is a cloud-native solution for building CI/CD systems. It consists of
......
{{/* Render documentation nav from definition in config file */}}
<div id="td-sidebar-menu" class="td-sidebar__inner">
{{ if not .Site.Params.ui.sidebar_search_disable -}}
<form class="td-sidebar__search d-flex align-items-center">
{{ partial "search-input.html" . }}
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-section-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
{{ else -}}
<div id="content-mobile">
<form class="td-sidebar__search d-flex align-items-center">
{{ partial "search-input.html" . }}
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-section-nav" aria-expanded="false" aria-label="Toggle section navigation">
</button>
</form>
</div>
<div id="content-desktop"></div>
{{ end -}}
<nav class="collapse td-sidebar-nav foldable-nav" id="td-section-nav" >
{{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type "docs")) .Site.Home .FirstSection -}}
{{ $mid := printf "m-%s" (.RelPermalink | anchorize) -}}
{{ $activePath := true }}
<ul class="td-sidebar-nav__section pr-md-3 ul-0">
<li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child active-path" id="{{ $mid }}-li">
<a href="/docs/" class="align-left tree-root pl-0 active td-sidebar-link tid-sidebar-link__section" id=" {{ $mid }}"><span class="td-sidebar-nav-active-item">Documentation</span></a>
<ul class="ul-1">
{{- $active := false -}}
{{ $currentPage := . -}}
{{- range .Site.Menus.docs -}}
{{- $mid = printf "m-%s" (.URL | anchorize) -}}
{{- $activePath = false -}}
{{- $docMenu := . -}}
{{- $inMain := false -}}
{{- range $navRoot.Site.Menus.main -}}
{{if eq .Name $docMenu.Name }}
{{ $inMain = true }}
{{ end }}
{{- end -}}
{{- if not $inMain }}
{{ $active = eq $currentPage.RelPermalink .URL }}
{{ $activePath = (strings.Contains $currentPage.RelPermalink .URL) }}
<li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child{{ if $activePath }} active-path{{ end }}" id="{{ $mid }}-li">
<input type="checkbox" id="{{ $mid }}-check"{{ if $activePath}} checked{{ end }}/>
<label for="{{ $mid }}-check"><a href="{{ .URL }}" class="align-left pl-0{{ if $active }} active{{ end }} td-sidebar-link td-sidebar-link__section" id="{{ $mid }}" title="{{ .Title }}"><span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}"> {{ .Name }}</span></a></label>
{{ $p := $navRoot.Site.GetPage .URL }}
<ul class="ul-2 foldable">
{{ range $p.Pages -}}
{{- $mid = printf "m-%s" (.RelPermalink | anchorize) -}}
{{- $active = eq $currentPage.RelPermalink .RelPermalink -}}
<li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child{{ if $active }} active-path{{ end }}" id="{{ $mid }}-li">
<input type="checkbox" id="{{ $mid }}-check"{{ if $active}} checked{{ end }}/>
<label for="{{ $mid }}-check"><a class="align-left pl-0 {{ if $active}} active{{ end }} td-sidebar-link td-sidebar-link__page" id="{{ $mid }}" href="{{ .RelPermalink }}"><span class="{{ if $active }}td-sidebar-nav-active-item{{ end }}"> {{ .LinkTitle }}</span></a></label>
</li>
</li>
{{- end -}}
</ul>
{{ end -}}
{{ end -}}
</ul>
</li>
</ul>
</nav>
</div>
{{/* The "active" toggle here may delay rendering, so we only cache this side bar menu for bigger sites.
*/}}{{ $sidebarCacheLimit := cond (isset .Site.Params.ui "sidebar_cache_limit") .Site.Params.ui.sidebar_cache_limit 2000 -}}
{{ $shouldCache := ge (len .Site.Pages) $sidebarCacheLimit -}}
{{ $sidebarCacheTypeRoot := cond (isset .Site.Params.ui "sidebar_cache_type_root") .Site.Params.ui.sidebar_cache_type_root false -}}
{{ $isDocs := (strings.Contains .RelPermalink "docs/") }}
{{ if $shouldCache -}}
{{ $mid := printf "m-%s" (.RelPermalink | anchorize) }}
<script>
$(function() {
$("#td-section-nav a").removeClass("active");
$("#td-section-nav #{{ $mid }}").addClass("active");
$("#td-section-nav #{{ $mid }}-li span").addClass("td-sidebar-nav-active-item");
$("#td-section-nav #{{ $mid }}").parents("li").addClass("active-path");
$("#td-section-nav li.active-path").addClass("show");
$("#td-section-nav li.active-path").children("input").prop('checked', true);
$("#td-section-nav #{{ $mid }}-li").siblings("li").addClass("show");
$("#td-section-nav #{{ $mid }}-li").children("ul").children("li").addClass("show");
$("#td-sidebar-menu").toggleClass("d-none");
});
</script>
{{ partialCached "sidebar-tree.html" . .FirstSection.RelPermalink }}
{{ else -}}
{{ if $isDocs -}}
{{ partial "sidebar-tree-docs.html" . }}
{{- else -}}
{{ partial "sidebar-tree.html" . }}
{{- end }}
{{- end }}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册