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: move docs-tooling into repo #2460

Merged
merged 13 commits into from
Nov 13, 2023
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
6 changes: 5 additions & 1 deletion .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ ignore$
\.npmrc$
\.png$
\.jpg$
\.ttf
\.ttf$
\.sav$
\.sum$
\.xlf$
\.svg$
\.ico$
\.zip$
\.gif$
^\.github/actions/spelling
_test\.go$
^examples/support/observability/config/
Expand Down
18 changes: 18 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ batchai
baz
benbjohnson
bitnami
breadcrumb
btn
Buf
BUILDENVVAR
Expand All @@ -66,10 +67,12 @@ BUILDPLATFORM
buildx
CACHEDIR
cainjection
canonical
carryforward
certificatehandler
certmanager
certwebhook
changefreq
Chans
Checkmarx
clientgoscheme
Expand Down Expand Up @@ -210,7 +213,9 @@ govulncheck
grafana
graphql
groupversion
gtag
GVK
haspopup
healthz
hellopy
helloworldtask
Expand All @@ -222,6 +227,7 @@ homeobservability
homeorchestrate
horizontalpodautoscaler
hpa
hreflang
htmltest
httpref
httpreference
Expand All @@ -230,6 +236,7 @@ iak
IAnalysis
ICertificate
IConfig
iconx
IEvaluation
IEvent
iface
Expand Down Expand Up @@ -352,10 +359,13 @@ kustomizeconfig
kuttl
kwi
kwv
labelledby
lastmod
lastword
lfc
Lifcycle
lifecyclekeptnsh
lightbox
linkedin
linktitle
linting
Expand All @@ -370,6 +380,7 @@ makefiles
markdownfiles
markdownlint
markdownlintignore
markmap
matryer
maxdepth
MDL
Expand Down Expand Up @@ -406,6 +417,7 @@ myservice
myuser
myversion
namespacedelete
nbsp
netlify
Neue
nifi
Expand Down Expand Up @@ -447,6 +459,7 @@ otlptracegrpc
OUTDIR
owide
oyaml
pagelinks
PARAMSx
perc
persistentvolumeclaims
Expand Down Expand Up @@ -484,6 +497,7 @@ promhttp
providerref
providerresult
pyfunction
pygments
pyyaml
quickstart
rangespec
Expand Down Expand Up @@ -546,6 +560,7 @@ spanitem
spdx
spf
stakeholders
standalone
statefulset
statefultest
stdouttrace
Expand Down Expand Up @@ -605,6 +620,7 @@ UIDs
undeploy
unmarshal
unmarshalling
urlset
usecase
usecasebox
usr
Expand Down Expand Up @@ -641,9 +657,11 @@ WORKLOADOVERALLSTATUS
workloadsstate
workloadstatus
workloadversion
xhtml
xxxx
XXXXXXXXXXXXXXXXXXXXXXXX
yannh
yml
YOURNAME
yourregistry
youtube
3 changes: 3 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ LS0[a-zA-Z0-9]+

# k8s CRD validation patterns
pattern\: .*$

# GA tag
G-[A-Z0-9]+
1 change: 1 addition & 0 deletions docs/assets/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 22 additions & 14 deletions docs/config/_default/config.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
_merge: deep
title: Keptn
baseURL: /

module:
hugoVersion:
extended: true
imports:
- path: github.com/keptn/docs-tooling
ignoreConfig: false
mounts:
- source: static
target: static
- source: layouts
target: layouts
- source: data
target: data
- source: assets
target: assets
- source: archetypes
target: archetypes
- disable: false
path: github.com/google/docsy
- disable: false
path: github.com/google/docsy/dependencies
- path: github.com/keptn/community
ignoreConfig: false
mounts:
Expand All @@ -27,13 +19,18 @@ module:
- "mentorship"
- source: "README.md"
target: "./content/community/_index.md"

proxy: direct

languages:
en:
title: Keptn
contentDir: "content/en"

enableEmoji: true
enableGitInfo: false
enableMissingTranslationPlaceholders: true
enableRobotsTXT: true

menu:
main:
- name: Keptn v1
Expand All @@ -49,3 +46,14 @@ menu:

ignoreErrors:
- "error-remote-getjson"

outputs:
home:
- HTML
page:
- HTML

permalinks: blog = "/:section/:year/:month/:day/:slug/"
taxonomies:
category: categories
tag: tags
48 changes: 48 additions & 0 deletions docs/config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,51 @@ links:
icon: fab fa-github
name: Keptn Lifecycle Toolkit GitHub Repository
url: https://github.com/keptn/lifecycle-toolkit

user:
- desc: Development takes place here!
icon: fab fa-github
name: Keptn GitHub Organization
url: https://github.com/keptn/
- desc: Chat with other project developers
icon: fab fa-slack
name: Keptn Slack
url: https://cloud-native.slack.com/messages/keptn
- desc: Watch videos about Keptn
icon: fab fa-youtube
name: Keptn YouTube channel
url: https://youtube.com/@keptn
- desc: Follow us on Twitter to get the latest news!
icon: fab fa-twitter
name: Twitter
url: https://twitter.com/KeptnProject
- icon: fab fa-linkedin
name: LinkedIn
url: https://www.linkedin.com/company/keptnproject
markmap:
enable: true
offlineSearch: true
slack: https://cloud-native.slack.com/messages/keptn
taxonomy:
pygmentsCodeFences: true
pygmentsUseClasses: true
pygmentsUseClassic: false
taxonomyCloud:
- tags
- categories
taxonomyCloudTitle:
- tags
- categories
taxonomyPageHeader:
- tags
- categories
ui:
breadcrumb_disable: false
footer_about_disable: false
header_search_disable: true
navbar_logo: true
sidebar_menu_compact: true
sidebar_menu_foldable: true
sidebar_menu_truncate: 1000
sidebar_search_disable: false
version_menu: Releases
5 changes: 5 additions & 0 deletions docs/config/staging/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ versions:
version: development
- url: https://lifecycle.keptn.sh/docs
version: latest

github_branch: main
github_project_repo: https://github.com/keptn/lifecycle-toolkit
github_repo: https://github.com/keptn/lifecycle-toolkit
github_subdir: docs
7 changes: 4 additions & 3 deletions docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module github.com/keptn/keptn-lifecycle-toolkit/docs
go 1.20

require (
github.com/google/docsy/dependencies v0.6.0 // indirect
github.com/keptn/community v0.0.0-20230906052955-7eb1261c06ac // indirect
github.com/keptn/docs-tooling v0.1.5 // indirect
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f // indirect
github.com/google/docsy v0.6.0 // indirect
github.com/keptn/community v0.0.0-20231107002325-fe4aeafde163 // indirect
github.com/twbs/bootstrap v4.6.2+incompatible // indirect
)
14 changes: 5 additions & 9 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f h1:bvkUptSRPZBr3Kxuk+bnWCEmQ5MtEJX5fjezyV0bC3g=
github.com/FortAwesome/Font-Awesome v0.0.0-20220831210243-d3a7818c253f/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.6.0 h1:43bVF18t2JihAamelQjjGzx1vO2ljCilVrBgetCA8oI=
github.com/google/docsy/dependencies v0.6.0 h1:BFXDCINbp8ZuUGl/mrHjMfhCg+b1YX+hVLAA5fGW7Pc=
github.com/google/docsy v0.6.0/go.mod h1:VKKLqD8PQ7AglJc98yBorATfW7GrNVsn0kGXVYF6G+M=
github.com/google/docsy/dependencies v0.6.0/go.mod h1:EDGc2znMbGUw0RW5kWwy2oGgLt0iVXBmoq4UOqstuNE=
github.com/google/docsy/dependencies v0.7.1 h1:NbzYKJYMin2q50xdWSUzR2c9gCp7zR/XHDBcxklEcTQ=
github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/keptn/community v0.0.0-20230906052955-7eb1261c06ac h1:ewU/L6PZuoR1T292iLpc39Nf9SOXWk839UfbJ6KDmb4=
github.com/keptn/community v0.0.0-20230906052955-7eb1261c06ac/go.mod h1:0G5nUhSv7ch9BgIFXiY7+U+cV5SbVmneysNGQwQkH8s=
github.com/keptn/docs-tooling v0.1.5 h1:D/w9GFxRMqIhTznwOvb6GA+qOw4XkuXEvyrDzOz55lc=
github.com/keptn/docs-tooling v0.1.5/go.mod h1:x0iT5YsJosz6wzjQke/YaLgiXF6PV+N8QzxSAc2MY/4=
github.com/keptn/community v0.0.0-20231107002325-fe4aeafde163 h1:/RWNyrdx1GxOG15AMgjjjaQliRr9tRhFmPLMfCGUGQE=
github.com/keptn/community v0.0.0-20231107002325-fe4aeafde163/go.mod h1:0G5nUhSv7ch9BgIFXiY7+U+cV5SbVmneysNGQwQkH8s=
github.com/twbs/bootstrap v4.6.2+incompatible h1:TDa+R51BTiy1wEHSYjmqDb8LxNl/zaEjAOpRE9Hwh/o=
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
13 changes: 13 additions & 0 deletions docs/layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if or (strings.HasPrefix .Destination "http") (strings.HasPrefix .Destination "#") -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- else -}}
{{- $link := . -}}
{{- $internal := urls.Parse .Destination -}}
{{- if $internal.Path -}}
{{- $fragment := "" }}
{{- with $internal.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
{{- with .Page.GetPage $internal.Path }}{{ $internal = printf "%s%s" .RelPermalink $fragment }}
<a href="{{ $internal }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ $link.Text | safeHTML }}</a>
{{- end -}}
{{- end -}}
{{- end -}}
24 changes: 24 additions & 0 deletions docs/layouts/_default/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
{{- if and (not (in .RelPermalink "docs-v")) (.Permalink) -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{- end -}}
{{ end }}
</urlset>
1 change: 1 addition & 0 deletions docs/layouts/partials/hooks/body-end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Check warning on line 1 in docs/layouts/partials/hooks/body-end.html

View workflow job for this annotation

GitHub Actions / Check Spelling

Skipping `docs/layouts/partials/hooks/body-end.html` because appears to be a binary file ('application/octet-stream'). (binary-file)
24 changes: 24 additions & 0 deletions docs/layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

{{ if in .RelPermalink "docs-v" -}}
{{ $canonical := replaceRE "-v[^/]+/" "/" .RelPermalink -}}
{{ $canonicalPath := substr $canonical 0 -1 -}}
{{ if .GetPage $canonicalPath -}}
<link rel="canonical" href="{{ $canonical | absURL}}"/>
{{ else }}
{{ range .Site.Pages -}}
{{ if in .Aliases $canonical -}}
<link rel="canonical" href="{{ .RelPermalink | absURL}}"/>
{{- end }}
{{- end}}
{{- end}}
{{ else if in .RelPermalink "/docs/" -}}
<link rel="canonical" href="{{ .RelPermalink | absURL}}"/>
{{- end}}
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SJLS2F2J2B"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-SJLS2F2J2B');
</script>
26 changes: 26 additions & 0 deletions docs/layouts/partials/navbar-version-selector.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

<a data-proofer-ignore class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ .Site.Params.version_menu }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
{{ range sort .Site.Pages ".File.ContentBaseName" "desc" -}}
{{ if (findRE "docs" .File.ContentBaseName) -}}
{{ $versionFile := printf "%s%s" .File.Dir "/version" -}}
{{ if fileExists $versionFile -}}
<a class="dropdown-item" href="{{ .RelPermalink }}">
{{readFile ( $versionFile )}}
{{- if eq .File.ContentBaseName "docs" -}}
&nbsp;(latest)
{{- end -}}
</a>
{{ end -}}
{{ end -}}
{{ end -}}
{{ $path := "" }}
{{ if .Site.Params.version_menu_pagelinks }}
{{ $path = .Page.RelPermalink }}
{{ end }}
{{ range .Site.Params.versions }}
<a class="dropdown-item" href="{{ .url }}{{ $path }}">{{ .version }}</a>
{{ end }}
</div>
Loading
Loading