Merge pull request #23227 from kbhawkey/kb-docsy-toc-config
use docsy page edit/issue setup
This commit is contained in:
		
						commit
						11d13b84b6
					
				|  | @ -11,3 +11,5 @@ Add styles or override variables from the theme here. */ | ||||||
| @import "base"; | @import "base"; | ||||||
| @import "tablet"; | @import "tablet"; | ||||||
| @import "desktop"; | @import "desktop"; | ||||||
|  | 
 | ||||||
|  | $primary: #3371e3; | ||||||
|  | @ -112,6 +112,8 @@ copyright_linux =  "Copyright © 2020 The Linux Foundation ®." | ||||||
| version_menu = "Versions" | version_menu = "Versions" | ||||||
| 
 | 
 | ||||||
| time_format_blog = "Monday, January 02, 2006" | time_format_blog = "Monday, January 02, 2006" | ||||||
|  | time_format_default = "January 02, 2006 at 3:04 PM PST" | ||||||
|  | 
 | ||||||
| description = "Production-Grade Container Orchestration" | description = "Production-Grade Container Orchestration" | ||||||
| showedit = true | showedit = true | ||||||
| 
 | 
 | ||||||
|  | @ -124,9 +126,13 @@ docsbranch = "master" | ||||||
| deprecated = false | deprecated = false | ||||||
| currentUrl = "https://kubernetes.io/docs/home/" | currentUrl = "https://kubernetes.io/docs/home/" | ||||||
| nextUrl = "https://kubernetes-io-vnext-staging.netlify.com/" | nextUrl = "https://kubernetes-io-vnext-staging.netlify.com/" | ||||||
| githubWebsiteRepo = "github.com/kubernetes/website" | 
 | ||||||
|  | # See codenew shortcode | ||||||
| githubWebsiteRaw = "raw.githubusercontent.com/kubernetes/website" | githubWebsiteRaw = "raw.githubusercontent.com/kubernetes/website" | ||||||
| 
 | 
 | ||||||
|  | # GitHub repository link for editing a page and opening issues. | ||||||
|  | github_repo = "https://github.com/kubernetes/website" | ||||||
|  | 
 | ||||||
| # param for displaying an announcement block on every page. | # param for displaying an announcement block on every page. | ||||||
| # See /i18n/en.toml for message text and title. | # See /i18n/en.toml for message text and title. | ||||||
| announcement = true | announcement = true | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								i18n/en.toml
								
								
								
								
							
							
						
						
									
										10
									
								
								i18n/en.toml
								
								
								
								
							|  | @ -150,12 +150,6 @@ other = """The Linux Foundation ®. All rights reserved. The Linux Foundation | ||||||
| [main_documentation_license] | [main_documentation_license] | ||||||
| other = """The Kubernetes Authors | Documentation Distributed under <a href="https://git.k8s.io/website/LICENSE" class="light-text">CC BY 4.0</a>""" | other = """The Kubernetes Authors | Documentation Distributed under <a href="https://git.k8s.io/website/LICENSE" class="light-text">CC BY 4.0</a>""" | ||||||
| 
 | 
 | ||||||
| [main_edit_this_page] |  | ||||||
| other = "Edit This Page" |  | ||||||
| 
 |  | ||||||
| [main_github_create_an_issue] |  | ||||||
| other = "Create an Issue" |  | ||||||
| 
 |  | ||||||
| [main_github_invite] | [main_github_invite] | ||||||
| other = "Interested in hacking on the core Kubernetes code base?" | other = "Interested in hacking on the core Kubernetes code base?" | ||||||
| 
 | 
 | ||||||
|  | @ -195,6 +189,9 @@ other = "Objectives" | ||||||
| [options_heading] | [options_heading] | ||||||
| other = "Options" | other = "Options" | ||||||
| 
 | 
 | ||||||
|  | [post_create_issue] | ||||||
|  | other = "Create an issue" | ||||||
|  | 
 | ||||||
| [prerequisites_heading] | [prerequisites_heading] | ||||||
| other = "Before you begin" | other = "Before you begin" | ||||||
| 
 | 
 | ||||||
|  | @ -207,7 +204,6 @@ other = "Subscribe" | ||||||
| [synopsis_heading] | [synopsis_heading] | ||||||
| other = "Synopsis" | other = "Synopsis" | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| [thirdparty_message] | [thirdparty_message] | ||||||
| other = """This section links to third party projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for these projects. This page follows <a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF website guidelines</a> by listing projects alphabetically. To add a project to this list, read the <a href="/contribute/style/content-guide/#third-party-content">content guide</a> before submitting a change.""" | other = """This section links to third party projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for these projects. This page follows <a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF website guidelines</a> by listing projects alphabetically. To add a project to this list, read the <a href="/contribute/style/content-guide/#third-party-content">content guide</a> before submitting a change.""" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -37,7 +37,6 @@ | ||||||
|           </main> |           </main> | ||||||
|           <div class="d-none d-xl-block col-xl-2 td-toc d-print-none"> |           <div class="d-none d-xl-block col-xl-2 td-toc d-print-none"> | ||||||
|             {{ partial "blog-meta-links.html" . }} |             {{ partial "blog-meta-links.html" . }} | ||||||
|             {{ partial "toc.html" . }} |  | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ | ||||||
|             {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} |             {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} | ||||||
|               {{ partial "feedback.html" .Site.Params.ui.feedback }} |               {{ partial "feedback.html" .Site.Params.ui.feedback }} | ||||||
|             {{ end }} |             {{ end }} | ||||||
|             {{ partial "git-info.html" . }} |             <div class="text-muted mt-5 pt-3 border-top">{{ partial "page-meta-lastmod.html" . }}</div> | ||||||
|             {{ if (.Site.DisqusShortname) }} |             {{ if (.Site.DisqusShortname) }} | ||||||
|               <br /> |               <br /> | ||||||
|               {{ partial "disqus-comment.html" . }} |               {{ partial "disqus-comment.html" . }} | ||||||
|  |  | ||||||
|  | @ -1,12 +1,3 @@ | ||||||
| {{ if not (.Site.Param "deprecated") }} |  | ||||||
| {{- $filepath := .page.File.Path }} |  | ||||||
| {{- $editLink := printf "https://github.com/kubernetes/website/edit/master/content/%s/%s" .page.Language.Lang $filepath }} |  | ||||||
| <p> |  | ||||||
|   <a href="{{ $editLink }}" id="editPageButton" target="_blank" data-proofer-ignore> |  | ||||||
|     Edit This Page |  | ||||||
|   </a> |  | ||||||
| </p> |  | ||||||
| {{- end -}} |  | ||||||
| {{ if not .page.Params.notitle }} | {{ if not .page.Params.notitle }} | ||||||
|   <h1>{{ .page.Title }}</h1> |   <h1>{{ .page.Title }}</h1> | ||||||
|   {{ $desc := .page.Description }} |   {{ $desc := .page.Description }} | ||||||
|  |  | ||||||
|  | @ -1,48 +0,0 @@ | ||||||
| <div id="pre-footer"> |  | ||||||
|   <!-- This is at the bottom of every topic underneath the TOC and content --> |  | ||||||
|   <hr/> |  | ||||||
| 
 |  | ||||||
|   <div class="issue-button-container"> |  | ||||||
|     {{ if and (ne .Kind "404") (not (strings.Contains .Path "search")) }} |  | ||||||
|       {{ if not .Params.no_issue }} |  | ||||||
|         <script type="text/javascript"> |  | ||||||
|           PDRTJS_settings_8345992 = { |  | ||||||
|             "id": "8345992", |  | ||||||
|             "unique_id": "{{ .RelPermalink }}", |  | ||||||
|             "title": "{{ .Title }}", |  | ||||||
|             "permalink": "{{ .Permalink }}" |  | ||||||
|           }; |  | ||||||
|           (function (d, c, j) { |  | ||||||
|             if (!document.getElementById(j)) { |  | ||||||
|               var pd = d.createElement(c), |  | ||||||
|                 s; |  | ||||||
|               pd.id = j; |  | ||||||
|               pd.src = ("https:" == document.location.protocol) |  | ||||||
|                 ? "https://polldaddy.com/js/rating/rating.js" |  | ||||||
|                 : "http://i0.poll.fm/js/rating/rating.js"; |  | ||||||
|               s = document.getElementsByTagName(c)[0]; |  | ||||||
|               s.parentNode.insertBefore(pd, s); |  | ||||||
|             } |  | ||||||
|           }(document, "script", "pd-rating-js")); |  | ||||||
|         </script> |  | ||||||
|         <a class="btn btn-primary mb-4 issue" href="" onclick="window.open('https://github.com/kubernetes/website/issues/new?template=bug-report.md&title=Issue%20with%20' + |  | ||||||
|               'k8s.io'+window.location.pathname)">{{ T "main_github_create_an_issue" }}</a> |  | ||||||
|       {{ end }} |  | ||||||
|     {{ end }} |  | ||||||
|     {{ if not .Params.noedit }} |  | ||||||
|       {{ if .File }} |  | ||||||
|         <a class="btn btn-primary mb-4 issue" href="https://github.com/kubernetes/website/edit/master/content/{{ site.Language.Lang }}/{{ .File.Path }}">{{ T "main_edit_this_page" }}</a> |  | ||||||
|       {{ end }} |  | ||||||
|     {{ end }} |  | ||||||
|   </div> |  | ||||||
|   {{ if and (not .Params.showcommit) $.GitInfo }} |  | ||||||
| 
 |  | ||||||
|     <div class="lastedit issue-button-container" id="lastedit"> |  | ||||||
|       {{ T "main_page_last_modified_on" }} |  | ||||||
|       {{ .GitInfo.AuthorDate.Format "January 02, 2006 at 3:04 PM PST" }} |  | ||||||
|       {{ T "main_by" }} |  | ||||||
|       <a href="https://github.com/kubernetes/website/commit/{{ .GitInfo.Hash }}/">{{ .GitInfo.Subject }}</a> |  | ||||||
|       (<a href="https://github.com/kubernetes/website/commits/master/content/en/{{ .File.Path }}">{{ T "main_page_history" }}</a>) |  | ||||||
|     </div> |  | ||||||
|   {{ end }} |  | ||||||
| </div> |  | ||||||
|  | @ -0,0 +1,8 @@ | ||||||
|  | {{ partial "page-meta-links.html" . }} | ||||||
|  | {{ if not .Params.notoc }} | ||||||
|  | {{ with .TableOfContents }} | ||||||
|  | {{ if ge (len .) 100 }} | ||||||
|  | {{ . }} | ||||||
|  | {{ end }} | ||||||
|  | {{ end }} | ||||||
|  | {{ end }} | ||||||
		Loading…
	
		Reference in New Issue