-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Refactor config file for legibiltiy - Write new menu logic to pick manual menu from config file - Replace spaces with dashes in folder names
- Loading branch information
1 parent
a474765
commit dbe0a93
Showing
15 changed files
with
209 additions
and
125 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{{/* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{/* 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 }} |