├── .nvmrc ├── assets ├── scss │ ├── support │ │ ├── _rtl.scss │ │ ├── _bootstrap_vers_test.scss │ │ ├── _utilities.scss │ │ └── _mixins.scss │ ├── _swagger.scss │ ├── shortcodes.scss │ ├── blocks │ │ ├── _blocks.scss │ │ └── _cover.scss │ ├── _styles_project.scss │ ├── _variables_project.scss │ ├── _variables_project_after_bs.scss │ ├── section-index.scss │ ├── td │ │ ├── _code-dark.scss │ │ └── _color-adjustments-dark.scss │ ├── _breadcrumb.scss │ ├── _table.scss │ ├── _alerts.scss │ ├── shortcodes │ │ ├── cards-pane.scss │ │ └── tabbed-pane.scss │ ├── _blog.scss │ ├── _pageinfo.scss │ ├── _main-container.scss │ ├── _drawio.scss │ ├── _colors.scss │ ├── _variables.scss │ ├── _variables_forward.scss │ ├── _code.scss │ └── _content.scss ├── icons │ └── logo.png ├── _vendor │ └── README.md ├── js │ ├── markmap.js │ ├── search.js │ └── click-to-copy.js ├── stubs │ └── new-page-template.md ├── _cache │ ├── bootstrap │ │ ├── method.patch │ │ ├── scrollspy-method.js │ │ └── scrollspy-method-patched.js │ └── README.md └── json │ └── offline-search-index.json ├── layouts ├── _partials │ ├── hooks │ │ ├── body-end.html │ │ └── head-end.html │ ├── print │ │ ├── toc-li-blog.html │ │ ├── toc-li.html │ │ ├── page-heading.html │ │ ├── content.html │ │ ├── content-blog.html │ │ └── render.html │ ├── page-description.html │ ├── footer │ │ ├── left.html │ │ ├── right.html │ │ ├── links.html │ │ ├── center.html │ │ └── copyright.html │ ├── reading-time.html │ ├── outputformat.html │ ├── page-meta-lastmod.html │ ├── td │ │ ├── render-heading.html │ │ └── scrollspy-attr.txt │ ├── scripts │ │ ├── math.html │ │ └── katex.html │ ├── taxonomy_terms_article.html │ ├── navbar-version-selector.html │ ├── footer.html │ ├── pager.html │ ├── toc.html │ ├── featured-image.html │ ├── taxonomy_terms_article_wrapper.html │ ├── version-banner.html │ ├── taxonomy_terms_cloud.html │ ├── taxonomy_terms_clouds.html │ ├── breadcrumb.html │ ├── disqus-comment.html │ ├── favicons.html │ ├── head-css.html │ ├── community_links.html │ ├── navbar-lang-selector.html │ ├── section-index.html │ ├── feedback.html │ ├── dark-mode-config.html │ └── search-input.html ├── _td-content-after-header.html ├── all.html ├── _markup │ ├── render-codeblock-chem.html │ ├── render-codeblock-math.html │ └── render-codeblock-mermaid.html ├── blog │ ├── single.html │ ├── section.print.html │ ├── _td-content.html │ ├── baseof.print.html │ ├── list.html │ └── baseof.html ├── docs │ ├── single.html │ ├── list.print.html │ ├── list.html │ ├── baseof.print.html │ └── baseof.html ├── swagger │ ├── single.html │ ├── list.html │ └── baseof.html ├── _shortcodes │ ├── cardpane.html │ ├── pageinfo.html │ ├── comment.html │ ├── swaggerui.html │ ├── blocks │ │ ├── link-down.html │ │ ├── feature.html │ │ ├── section.html │ │ └── lead.html │ ├── alert.html │ ├── iframe.html │ ├── imgproc.html │ ├── card.html │ ├── readfile.html │ ├── _param.html │ ├── conditional-text.html │ └── tab.html ├── 404.html ├── taxonomy.html ├── community │ └── list.html ├── search.html ├── _td-content.html ├── baseof.html └── term.html ├── images ├── tn.png └── screenshot.png ├── .gitattributes ├── docsy.dev ├── .gitignore ├── content │ └── en │ │ ├── search.md │ │ ├── blog │ │ ├── 2022 │ │ │ └── hello.md │ │ └── _index.md │ │ ├── featured-background.jpg │ │ ├── about │ │ └── featured-background.jpg │ │ ├── docs │ │ ├── content │ │ │ ├── shortcodes │ │ │ │ ├── spruce.jpg │ │ │ │ ├── flags │ │ │ │ │ ├── de.png │ │ │ │ │ ├── tz.png │ │ │ │ │ └── uk.png │ │ │ │ └── includes │ │ │ │ │ ├── config.yaml │ │ │ │ │ └── installation.md │ │ │ └── _index.md │ │ ├── best-practices │ │ │ ├── _index.md │ │ │ └── site-guidance.md │ │ ├── updating │ │ │ ├── updating-hugo-module.md │ │ │ ├── _index.md │ │ │ └── updating-submodules.md │ │ └── get-started │ │ │ ├── docsy-as-module │ │ │ └── _index.md │ │ │ └── known_issues.md │ │ ├── community │ │ └── _index.md │ │ ├── site │ │ ├── readme.md │ │ ├── repo │ │ │ └── _index.md │ │ ├── implementation │ │ │ └── _index.md │ │ └── _index.md │ │ ├── tests │ │ └── index.md │ │ └── _index.md ├── static │ ├── google6a6ae8b5b016a20d.html │ └── images │ │ ├── no.png │ │ ├── yes.png │ │ ├── feedback.png │ │ └── version-banner.png ├── layouts │ ├── docs │ │ └── content │ │ │ └── diagrams-and-formulae │ │ │ └── _markup │ │ │ └── render-passthrough.html │ ├── _markup │ │ └── render-heading.html │ └── _shortcodes │ │ └── release-summary.md ├── assets │ └── scss │ │ ├── _styles_project.scss │ │ └── _variables_project.scss ├── .prettierignore ├── scripts │ ├── install-hugo.sh │ ├── unescape-refcache-json.mjs │ └── prune-refcache-4xx.mjs ├── .htmltest.yml ├── CONTRIBUTING.md ├── Makefile └── package.json ├── .prettierrc.json ├── static └── favicons │ ├── favicon.ico │ ├── tile70x70.png │ ├── favicon-1024.png │ ├── favicon-256.png │ ├── pwa-192x192.png │ ├── pwa-512x512.png │ ├── tile150x150.png │ ├── tile310x150.png │ ├── tile310x310.png │ ├── android-144x144.png │ ├── android-192x192.png │ ├── android-36x36.png │ ├── android-48x48.png │ ├── android-72x72.png │ ├── android-96x96.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ └── apple-touch-icon-180x180.png ├── CHANGELOG.md ├── CONTRIBUTING.md ├── .editorconfig ├── go.mod ├── docker-compose.yaml ├── .github ├── ISSUE_TEMPLATE │ ├── enhancement.md │ ├── config.yml │ └── bug.md └── workflows │ ├── test.yaml │ └── smoke.yaml ├── .prettierignore ├── go.sum ├── .gitignore ├── Dockerfile ├── .markdownlint.yaml ├── theme.toml ├── .vscode └── cspell.json ├── postcss.config.js ├── .markdownlint-cli2.yaml ├── netlify.toml ├── scripts ├── get-build-id.sh ├── refresh-sass-variables.pl ├── git │ └── check-version.sh ├── gen-chroma-styles.sh ├── getHugoModules │ └── index.mjs ├── mkdirp-hugo-mod.js └── scrollspy-patch │ └── extract-method.pl ├── i18n ├── zh-cn.toml ├── zh-tw.toml ├── ko.toml ├── it.toml ├── pl.toml ├── no.toml ├── et.toml ├── fi.toml ├── bg.toml ├── ja.toml ├── sv.toml ├── hi.toml ├── hu.toml ├── nl.toml ├── bn.toml └── fa.toml └── hugo.yaml /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* 2 | -------------------------------------------------------------------------------- /assets/scss/support/_rtl.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/_partials/hooks/body-end.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/_partials/hooks/head-end.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/_td-content-after-header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/images/tn.png -------------------------------------------------------------------------------- /layouts/all.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 | {{ .Content -}} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /layouts/_markup/render-codeblock-chem.html: -------------------------------------------------------------------------------- 1 | {{ partial "scripts/math.html" . -}} 2 | -------------------------------------------------------------------------------- /layouts/_markup/render-codeblock-math.html: -------------------------------------------------------------------------------- 1 | {{ partial "scripts/math.html" . -}} 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.cmd text eol=crlf 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /docsy.dev/.gitignore: -------------------------------------------------------------------------------- 1 | # Hugo 2 | .hugo_build.lock 3 | /public 4 | resources/ 5 | tmp 6 | -------------------------------------------------------------------------------- /assets/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/assets/icons/logo.png -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /layouts/blog/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "_td-content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /layouts/docs/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "_td-content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /layouts/swagger/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "_td-content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /assets/scss/_swagger.scss: -------------------------------------------------------------------------------- 1 | .swagger-ui .info .title small pre { 2 | background: #7d8492; 3 | } -------------------------------------------------------------------------------- /docsy.dev/content/en/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search Results 3 | layout: search 4 | --- 5 | 6 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "proseWrap": "always", 3 | "semi": true, 4 | "singleQuote": true 5 | } 6 | -------------------------------------------------------------------------------- /assets/scss/shortcodes.scss: -------------------------------------------------------------------------------- 1 | @import "shortcodes/tabbed-pane"; 2 | @import "shortcodes/cards-pane"; 3 | -------------------------------------------------------------------------------- /docsy.dev/content/en/blog/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Blog 3 | menu: { main: { weight: 50 } } 4 | --- 5 | -------------------------------------------------------------------------------- /docsy.dev/static/google6a6ae8b5b016a20d.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google6a6ae8b5b016a20d.html 2 | -------------------------------------------------------------------------------- /layouts/docs/list.print.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "print/render" . }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/favicon.ico -------------------------------------------------------------------------------- /docsy.dev/static/images/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/static/images/no.png -------------------------------------------------------------------------------- /layouts/blog/section.print.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "print/render" . }} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /static/favicons/tile70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/tile70x70.png -------------------------------------------------------------------------------- /docsy.dev/static/images/yes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/static/images/yes.png -------------------------------------------------------------------------------- /static/favicons/favicon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/favicon-1024.png -------------------------------------------------------------------------------- /static/favicons/favicon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/favicon-256.png -------------------------------------------------------------------------------- /static/favicons/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/pwa-192x192.png -------------------------------------------------------------------------------- /static/favicons/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/pwa-512x512.png -------------------------------------------------------------------------------- /static/favicons/tile150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/tile150x150.png -------------------------------------------------------------------------------- /static/favicons/tile310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/tile310x150.png -------------------------------------------------------------------------------- /static/favicons/tile310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/tile310x310.png -------------------------------------------------------------------------------- /layouts/_partials/print/toc-li-blog.html: -------------------------------------------------------------------------------- 1 |
  • {{ .Page.Title }}
  • 2 | -------------------------------------------------------------------------------- /layouts/_shortcodes/cardpane.html: -------------------------------------------------------------------------------- 1 |
    2 | {{- .Inner -}} 3 |
    4 | -------------------------------------------------------------------------------- /static/favicons/android-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-144x144.png -------------------------------------------------------------------------------- /static/favicons/android-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-192x192.png -------------------------------------------------------------------------------- /static/favicons/android-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-36x36.png -------------------------------------------------------------------------------- /static/favicons/android-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-48x48.png -------------------------------------------------------------------------------- /static/favicons/android-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-72x72.png -------------------------------------------------------------------------------- /static/favicons/android-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/android-96x96.png -------------------------------------------------------------------------------- /static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /docsy.dev/static/images/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/static/images/feedback.png -------------------------------------------------------------------------------- /docsy.dev/layouts/docs/content/diagrams-and-formulae/_markup/render-passthrough.html: -------------------------------------------------------------------------------- 1 | {{ partial "scripts/math.html" . -}} 2 | -------------------------------------------------------------------------------- /docsy.dev/static/images/version-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/static/images/version-banner.png -------------------------------------------------------------------------------- /assets/scss/blocks/_blocks.scss: -------------------------------------------------------------------------------- 1 | @import "cover"; 2 | 3 | .td-bg-arrow { 4 | &-wrapper { 5 | position: relative; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /docsy.dev/content/en/featured-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/featured-background.jpg -------------------------------------------------------------------------------- /static/favicons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/static/favicons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docsy.dev/assets/scss/_styles_project.scss: -------------------------------------------------------------------------------- 1 | @import 'td/color-adjustments-dark'; 2 | @import 'td/code-dark'; 3 | @import 'td/gcs-search-dark'; 4 | -------------------------------------------------------------------------------- /docsy.dev/content/en/about/featured-background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/about/featured-background.jpg -------------------------------------------------------------------------------- /layouts/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 | {{ .Page.Store.Set "hasmermaid" true -}} 2 | 3 |
    4 |   {{- .Inner -}}
    5 | 
    6 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/spruce.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/docs/content/shortcodes/spruce.jpg -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/flags/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/docs/content/shortcodes/flags/de.png -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/flags/tz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/docs/content/shortcodes/flags/tz.png -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/flags/uk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/docsy/HEAD/docsy.dev/content/en/docs/content/shortcodes/flags/uk.png -------------------------------------------------------------------------------- /assets/scss/_styles_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Projects can override this file. For details, see: 3 | https://www.docsy.dev/docs/content/lookandfeel/#project-style-files 4 | */ 5 | -------------------------------------------------------------------------------- /assets/scss/_variables_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Projects can override this file. For details, see: 3 | https://www.docsy.dev/docs/content/lookandfeel/#project-style-files 4 | */ 5 | -------------------------------------------------------------------------------- /docsy.dev/content/en/community/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Community 3 | menu: {main: {weight: 40}} 4 | # Content below, if any, will be added to the community page. 5 | --- 6 | -------------------------------------------------------------------------------- /layouts/_partials/page-description.html: -------------------------------------------------------------------------------- 1 | {{ with or .Description .Summary site.Params.description | plainify | htmlUnescape -}} 2 | {{ trim . "\n\r\t " -}} 3 | {{ end -}} 4 | -------------------------------------------------------------------------------- /layouts/_partials/footer/left.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.Params.links -}} 2 | {{ with index . "user" -}} 3 | {{- partial "footer/links.html" . -}} 4 | {{ end -}} 5 | {{ end -}} 6 | -------------------------------------------------------------------------------- /assets/scss/_variables_project_after_bs.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Projects can override this file. For details, see: 3 | https://www.docsy.dev/docs/content/lookandfeel/#project-style-files 4 | */ 5 | -------------------------------------------------------------------------------- /docsy.dev/assets/scss/_variables_project.scss: -------------------------------------------------------------------------------- 1 | /* 2 | Projects can override this file. For details, see: 3 | https://www.docsy.dev/docs/content/lookandfeel/#project-style-files 4 | */ 5 | -------------------------------------------------------------------------------- /layouts/_partials/footer/right.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.Params.links -}} 2 | {{ with index . "developer" -}} 3 | {{- partial "footer/links.html" . -}} 4 | {{ end -}} 5 | {{ end -}} 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | The changelog is published online, see 4 | [Changelog](https://www.docsy.dev/site/changelog/) or the 5 | [page source](docsy.dev/content/en/site/changelog.md). 6 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Content and Customization 3 | weight: 3 4 | description: How to add content to and customize your Docsy site. 5 | sidebar_root_for: self 6 | --- 7 | -------------------------------------------------------------------------------- /layouts/_shortcodes/pageinfo.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $color := .Get "color" | default "primary" }} 3 |
    4 | {{ .Inner }} 5 |
    6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | The contributing page is published online, see 4 | [Contributing](https://www.docsy.dev/site/contributing/) or the 5 | [page source](docsy.dev/content/en/site/contributing.md). 6 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |
    3 |

    Not found

    4 |

    Oops! This page doesn't exist. Try going back to the home page.

    5 |
    6 | {{- end }} 7 | -------------------------------------------------------------------------------- /docsy.dev/.prettierignore: -------------------------------------------------------------------------------- 1 | # cSpell:ignore lookandfeel 2 | 3 | /content/**/*.* 4 | !/content/en/blog/**/*.* 5 | !/content/en/docs/_index.md 6 | !/content/en/docs/content/**/*.* 7 | !/content/en/site/**/*.* 8 | 9 | /layouts 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | 3 | root = true 4 | 5 | # All files 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | -------------------------------------------------------------------------------- /docsy.dev/layouts/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{ partial "td/render-heading.html" . -}} 2 | 3 | {{/* By default, the markdown processor emits a heading on its own line, so we 4 | don't trim whitespace from the end of this template. */}} 5 | -------------------------------------------------------------------------------- /layouts/_partials/reading-time.html: -------------------------------------------------------------------------------- 1 |

     {{ if gt .ReadingTime 1 }} {{ .ReadingTime }} {{ T "post_reading_time" }} {{ else }} {{ T "post_less_than_a_minute_read" }} {{ end }} 

    2 | -------------------------------------------------------------------------------- /layouts/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |
    3 |
    4 |

    {{ .Title }}

    5 | {{ partial "taxonomy_terms_cloud.html" (dict "context" . "taxo" ( lower .Title ) ) -}} 6 |
    7 |
    8 | {{- end }} 9 | -------------------------------------------------------------------------------- /assets/scss/section-index.scss: -------------------------------------------------------------------------------- 1 | .section-index { 2 | .entry { 3 | padding: 0.75rem; 4 | } 5 | 6 | h5 { 7 | margin-bottom: 0; 8 | 9 | a { 10 | font-weight: $font-weight-bold; 11 | } 12 | } 13 | 14 | p { 15 | margin-top: 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /layouts/_partials/print/toc-li.html: -------------------------------------------------------------------------------- 1 | {{ $tpl := printf "print/toc-li-%s.html" .Page.Type }} 2 | {{ if templates.Exists (printf "_partials/%s" $tpl) }} 3 | {{ partial $tpl . }} 4 | {{ else -}} 5 |
  • {{ .sid}}: {{ .Page.Title }}
  • 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/includes/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: tekton.dev/v1beta1 2 | kind: Task 3 | metadata: 4 | name: hello 5 | spec: 6 | steps: 7 | - name: echo 8 | image: alpine 9 | script: | 10 | #!/bin/sh 11 | echo "Hello World" 12 | -------------------------------------------------------------------------------- /docsy.dev/content/en/site/readme.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ReadMe 3 | description: Docsy repository README 4 | cSpell:ignore: docsy readfile 5 | weight: 10 6 | --- 7 | 8 | 11 | 12 | {{% readfile file="/site/repo/README.md" %}} 13 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/docsy 2 | 3 | go 1.12 4 | 5 | // AUTO-GENERATED using `npm run get:hugo-modules` 6 | 7 | require ( 8 | github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3 // indirect 9 | github.com/twbs/bootstrap v5.3.8+incompatible // indirect 10 | ) 11 | -------------------------------------------------------------------------------- /assets/scss/td/_code-dark.scss: -------------------------------------------------------------------------------- 1 | @if $enable-dark-mode { 2 | [data-bs-theme='light'] { 3 | @import 'td/chroma/light'; 4 | } 5 | 6 | [data-bs-theme='dark'] { 7 | @import 'td/chroma/dark'; 8 | 9 | .chroma { 10 | background-color: var(--td-pre-bg); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /assets/scss/_breadcrumb.scss: -------------------------------------------------------------------------------- 1 | // Breadcrumb 2 | 3 | .td-breadcrumbs { 4 | @media print { 5 | display: none; 6 | } 7 | 8 | &__single { 9 | display: none; 10 | } 11 | 12 | .breadcrumb { 13 | background: inherit; 14 | padding-left: 0; 15 | padding-top: 0; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /assets/scss/_table.scss: -------------------------------------------------------------------------------- 1 | .td-table:not(.td-initial) { 2 | @extend .table; 3 | @extend .table-striped; 4 | @extend .table-responsive; 5 | 6 | // The following is needed for tables to be responsive. 7 | // For details, see the https://docsy.dev/docs/content/lookandfeel/#tables 8 | display: block; 9 | } 10 | -------------------------------------------------------------------------------- /assets/scss/support/_bootstrap_vers_test.scss: -------------------------------------------------------------------------------- 1 | $enable-important-utilities: null !default; 2 | @if $enable-important-utilities == null { 3 | @error "\ 4 | Docsy requires Bootstrap v5, but the v5 variable \ 5 | $enable-important-utilities isn't defined. \ 6 | Did you forget to update Docsy dependencies?\ 7 | "; 8 | } 9 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | 3 | services: 4 | 5 | site: 6 | image: docsy/docsy.dev 7 | build: 8 | context: . 9 | ports: 10 | - "1313:1313" 11 | user: "${DOCSY_USER}" 12 | volumes: 13 | - /app/docsy/docsy.dev/node_modules 14 | - .:/app/docsy 15 | -------------------------------------------------------------------------------- /layouts/_shortcodes/comment.html: -------------------------------------------------------------------------------- 1 | {{/* Allows for large segments of Markdown or HTML to be commented out. This was 2 | briefly an internal Hugo template, but it is no more. For details, see: 3 | 4 | - https://discourse.gohugo.io/t/deprecate-comment-shortcode/53237 5 | - https://github.com/gohugoio/hugo/pull/13294 6 | 7 | */}} 8 | {{- $noop := .Inner -}} 9 | -------------------------------------------------------------------------------- /assets/_vendor/README.md: -------------------------------------------------------------------------------- 1 | This `_vendor` folder exists to work around a known bug in Go’s module 2 | management. For details, see 3 | 4 | - 5 | - 6 | 7 | DO NOT EDIT or manually override the files in this folder. They are 8 | automatically synchronized at installation time. 9 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/content/shortcodes/includes/installation.md: -------------------------------------------------------------------------------- 1 | **Installation** 2 | 3 | {{% alert title="Note" %}} Check system compatibility before proceeding. 4 | {{% /alert %}} 5 | 6 | 1. Download the installation files. 7 | 8 | 1. Run the installation script `sudo sh install.sh` 9 | 10 | 1. Test that your installation was successfully completed. 11 | -------------------------------------------------------------------------------- /layouts/_partials/footer/links.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement proposal 3 | labels: [enhancement, needs-triage] 4 | about: Propose an enhancement or submit a feature request 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Note that Prettier ignore rules differ slightly from gitignore rules. The main 2 | # gotcha is that once a _directory_ is ignored, it's content cannot be 3 | # unignored. 4 | 5 | # Ignore all _files_ under assets 6 | /assets/**/*.* 7 | 8 | # Selectively unignore some files 9 | !/assets/scss/main.scss 10 | !/assets/scss/td/**/* 11 | 12 | /assets/scss/td/chroma/**/* 13 | -------------------------------------------------------------------------------- /layouts/_partials/outputformat.html: -------------------------------------------------------------------------------- 1 | {{/* Return the current page outputformat */}} 2 | {{ $alts := newScratch }} 3 | {{ $format := "unknown" }} 4 | {{ range .AlternativeOutputFormats }} 5 | {{ $alts.Set .Name true }} 6 | {{ end }} 7 | {{ range .OutputFormats }} 8 | {{ if not ($alts.Get .Name) }} 9 | {{ $format = .Name }} 10 | {{ end }} 11 | {{ end }} 12 | {{ return $format }} 13 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/best-practices/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Best Practices 3 | weight: 9 4 | description: > 5 | Optional guidance and recommendations about organizing, authoring, and 6 | managing your technical documentation. 7 | sidebar_root_for: children 8 | --- 9 | 10 | Use this section to learn about some of the best practices around creating 11 | technical documentation with Docsy. 12 | -------------------------------------------------------------------------------- /layouts/_partials/print/page-heading.html: -------------------------------------------------------------------------------- 1 | {{/* Use the title and description of the first page to begin the document */}} 2 | 3 | {{ $tpl := printf "print/page-heading-%s.html" .Page.Type }} 4 | {{ if templates.Exists (printf "_partials/%s" $tpl) }} 5 | {{ partial $tpl . }} 6 | {{ else -}} 7 |

    {{ .Title }}

    8 | {{ with .Page.Params.description }}
    {{ . | markdownify }}
    {{ end }} 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3 h1:/iluJkJiyTAdnqrw3Yi9rH2HNHhrrtCmj8VJe7I6o3w= 2 | github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 3 | github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o= 4 | github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 5 | -------------------------------------------------------------------------------- /layouts/_shortcodes/swaggerui.html: -------------------------------------------------------------------------------- 1 | {{ $original := .Get "src" }} 2 |
    3 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | package-lock.json 3 | /tmp 4 | 5 | # ScrollSpy patch related 6 | # Temporary files created by the patch command when it fails: 7 | assets/_cache/bootstrap/scrollspy-method.js.* 8 | 9 | # Hugo 10 | .hugo_build.lock 11 | /public 12 | resources/ 13 | 14 | # vim temporary files 15 | *~ 16 | *.sw? 17 | 18 | # system files 19 | .DS_Store 20 | 21 | # IDE files 22 | .idea 23 | 24 | # VS Code 25 | /.vscode/** 26 | !/.vscode/cspell.json 27 | -------------------------------------------------------------------------------- /layouts/_shortcodes/blocks/link-down.html: -------------------------------------------------------------------------------- 1 | {{ with .Parent }} 2 | {{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }} 3 | {{ $color := $.Get "color" | default "blue" }} 4 | 5 | {{ else }} 6 | {{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}} 7 | {{ end }} -------------------------------------------------------------------------------- /layouts/_partials/page-meta-lastmod.html: -------------------------------------------------------------------------------- 1 | {{ if and .GitInfo .Site.Params.github_repo -}} 2 |
    3 | {{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}} 4 | {{ with .GitInfo }}: {{/* Trim WS */ -}} 5 | 6 | {{- .Subject }} ({{ .AbbreviatedHash }}) {{- /* Trim WS */ -}} 7 | 8 | {{- end }} 9 |
    10 | {{ end -}} 11 | -------------------------------------------------------------------------------- /layouts/_partials/td/render-heading.html: -------------------------------------------------------------------------------- 1 | 6 | {{- .Text | safeHTML -}} 7 | {{ partial "td/heading-self-link.html" . -}} 8 | 9 | 10 | {{- define "_partials/td/heading-self-link.html" -}} 11 | 12 | {{- end -}} 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: SUPPORT, ISSUES, and TROUBLESHOOTING 4 | url: https://github.com/google/docsy/discussions 5 | about: 6 | Please DO NOT use GitHub issues for support requests, instead start a 7 | discussion thread at https://github.com/google/docsy/discussions. Feel 8 | free to open an issue once your problem is confirmed by the docsy 9 | maintainers and/or the docsy community. 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM klakegg/hugo:0.111.3-ext-alpine as docsy-user-guide 2 | 3 | RUN apk update 4 | RUN apk add git 5 | COPY package.json /app/docsy/docsy.dev/ 6 | WORKDIR /app/docsy/docsy.dev/ 7 | RUN npm install --production=false 8 | RUN git config --global --add safe.directory /app/docsy 9 | 10 | CMD ["serve", "--cleanDestinationDir", "--themesDir", "../..", "--baseURL", "http://localhost:1313/", "--buildDrafts", "--buildFuture", "--disableFastRender", "--ignoreCache", "--watch"] 11 | -------------------------------------------------------------------------------- /assets/js/markmap.js: -------------------------------------------------------------------------------- 1 | {{ with .Site.Params.markmap }} 2 | {{ if .enable }} 3 | 4 | 5 | (function($) { 6 | var needMarkmap = false; 7 | $('.language-markmap').parent().replaceWith(function() { 8 | needMarkmap = true; 9 | return $('
    ').text($(this).text()); 10 | }); 11 | 12 | const { markmap } = window; 13 | if(needMarkmap) { 14 | markmap.autoLoader.renderAll(); 15 | } 16 | 17 | })(jQuery); 18 | {{ end }} 19 | {{ end }} 20 | -------------------------------------------------------------------------------- /assets/scss/_alerts.scss: -------------------------------------------------------------------------------- 1 | // Style alert boxes. 2 | 3 | .alert { 4 | font-weight: $font-weight-medium; 5 | color: inherit; 6 | border-radius: 0; 7 | 8 | :last-child { 9 | margin-bottom: 0; 10 | } 11 | 12 | .alert-heading { 13 | color: var(--bs-alert-link-color); 14 | } 15 | 16 | @each $color, $value in $theme-colors { 17 | &-#{$color} { 18 | border-style: solid; 19 | border-color: $value; 20 | border-width: 0 0 0 4px; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docsy.dev/content/en/site/repo/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Repository-root markdown files 3 | linkTitle: Repo files 4 | description: Repository-root pages for the Docsy project. 5 | cascade: 6 | params: 7 | ui: 8 | breadcrumb_disable: true 9 | github_subdir: '' 10 | path_base_for_github_subdir: 11 | from: '^(.*)/(\w+\.md)' 12 | to: $2 13 | toc_hide: true 14 | params: 15 | github_subdir: docsy.dev # cSpell:disable-line 16 | path_base_for_github_subdir: '' 17 | --- 18 | -------------------------------------------------------------------------------- /layouts/_partials/scripts/math.html: -------------------------------------------------------------------------------- 1 | {{ $opts := dict "output" "htmlAndMathml" "displayMode" (not (eq ($.Type) "inline")) -}} 2 | {{ with try (transform.ToMath .Inner $opts) -}} 3 | {{ with .Err -}} 4 | {{ errorf "Unable to render mathematical markup to HTML using the transform.ToMath function. The KaTeX display engine threw the following error: %s: see %s." . $.Position -}} 5 | {{ else -}} 6 | {{ .Value -}} 7 | {{ $.Page.Store.Set "hasMath" true -}} 8 | {{ end -}} 9 | {{ end -}} 10 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | # See https://github.com/DavidAnson/markdownlint/blob/main/README.md#rules--aliases 2 | # cSpell:ignore docsy 3 | 4 | default: true 5 | 6 | blanks-around-fences: false 7 | emphasis-style: false 8 | first-line-h1: false 9 | line-length: false 10 | link-fragments: false 11 | list-marker-space: false 12 | no-emphasis-as-header: false 13 | no-hard-tabs: false 14 | no-inline-html: false 15 | no-trailing-punctuation: false 16 | no-trailing-spaces: { br_spaces: 0, strict: true} 17 | # table-column-style: false 18 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # cSpell:ignore demosite licenselink 2 | name = "Docsy" 3 | license = "Apache 2.0" 4 | licenselink = "https://github.com/google/docsy/blob/main/LICENSE" 5 | description = "A Hugo theme for technical documentation sites" 6 | homepage = "https://docsy.dev" 7 | demosite = "https://example.docsy.dev/" 8 | tags = ["documentation", "multilingual", "customizable", "responsive", "docs"] 9 | features = [] 10 | min_version = "0.146.0" 11 | 12 | [author] 13 | name = "The Docsy Authors" 14 | homepage = "https://docsy.dev" 15 | -------------------------------------------------------------------------------- /assets/scss/shortcodes/cards-pane.scss: -------------------------------------------------------------------------------- 1 | .td-card-group.card-group { 2 | @extend .td-max-width-on-larger-screens; 3 | } 4 | 5 | .td-card { 6 | &.card { 7 | @extend .td-max-width-on-larger-screens; 8 | 9 | .highlight { 10 | border: none; 11 | margin: 0; 12 | } 13 | } 14 | 15 | .card-header.code { 16 | background-color: $card-bg; 17 | } 18 | 19 | .card-body { 20 | &.code { 21 | background-color: $card-bg; 22 | padding: 0 0 0 1ex; 23 | } 24 | 25 | pre { 26 | margin: 0; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /layouts/_shortcodes/blocks/feature.html: -------------------------------------------------------------------------------- 1 | {{ $icon := .Get "icon" | default "fa-lightbulb" -}} 2 |
    3 |
    4 | 5 |
    6 |

    7 | {{- .Get "title" | markdownify -}} 8 |

    9 |
    10 | {{ .Inner }} 11 |
    12 | {{ with .Get "url" }}

    {{ with $.Get "url_text" }}{{ . }}{{ else }}{{ T "ui_read_more" }}{{ end }}

    {{ end }} 13 |
    14 | -------------------------------------------------------------------------------- /assets/scss/blocks/_cover.scss: -------------------------------------------------------------------------------- 1 | // A cover block is a full size cover with a fixed background for smaller screens. 2 | 3 | @include td-box-height-modifiers(".td-cover-block"); 4 | 5 | .td-cover-logo { 6 | margin-right: 0.5em; 7 | } 8 | 9 | .td-cover-block { 10 | position: relative; 11 | padding-top: 5rem; 12 | padding-bottom: 5rem; 13 | background: { 14 | repeat: no-repeat; 15 | position: 50% 0; 16 | size: cover; 17 | } 18 | 19 | & > .byline { 20 | @extend .small; 21 | position: absolute; 22 | bottom: 2px; 23 | right: 4px; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /docsy.dev/scripts/install-hugo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Install the hugo-extended NPM package if not already present. 4 | 5 | set -e 6 | 7 | PKG_JSON=${1:-package.json} 8 | 9 | if ! npm ls hugo-extended; then 10 | _HUGO_EXTENDED_VERS=`node -p "require('./$PKG_JSON').config.hugo_version"` 11 | set -x 12 | if ! npm install --save-exact -D hugo-extended@$_HUGO_EXTENDED_VERS --omit=optional; then 13 | echo "Trying fork instead:" 14 | npm install --save-exact -D chalin/hugo-extended#v$_HUGO_EXTENDED_VERS --omit=optional 15 | fi 16 | fi 17 | 18 | # cSpell:ignore chalin 19 | -------------------------------------------------------------------------------- /layouts/_partials/taxonomy_terms_article.html: -------------------------------------------------------------------------------- 1 | {{ $context := .context -}} 2 | {{ $taxo := .taxo -}} 3 | {{ if (gt (len ($context.GetTerms $taxo)) 0) -}} 4 |
    5 |
    {{ humanize $taxo }}:
    6 |
      7 | {{ range ($context.GetTerms $taxo) -}} 8 |
    • {{ .LinkTitle }}
    • 9 | {{ end -}} 10 |
    11 |
    12 | {{ end -}} 13 | -------------------------------------------------------------------------------- /assets/scss/_blog.scss: -------------------------------------------------------------------------------- 1 | .td-blog { 2 | .td-rss-button { 3 | @extend .btn; 4 | @extend .btn-info; 5 | @extend .btn-lg; 6 | 7 | border-radius: 2rem; 8 | float: right; 9 | 10 | display: none; 11 | @extend .d-lg-block; 12 | } 13 | 14 | &-posts-list { 15 | @extend .list-unstyled; 16 | margin-top: map-get($spacers, 4) !important; 17 | 18 | &__item { 19 | display: flex; 20 | align-items: flex-start; 21 | margin-bottom: map-get($spacers, 4) !important; 22 | 23 | &__body { 24 | flex: 1; 25 | } 26 | } 27 | 28 | } 29 | } -------------------------------------------------------------------------------- /layouts/_partials/navbar-version-selector.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/_shortcodes/blocks/section.html: -------------------------------------------------------------------------------- 1 | {{ $col_id := .Get "color" | default .Ordinal -}} 2 | {{ $height := .Get "height" | default "auto" -}} 3 | {{ $type := .Get "type" | default "container" -}} 4 | 5 |
    6 |
    7 |
    8 |
    9 | {{/* Do NOT remove this comment! It ends the HTML block above. See https://spec.commonmark.org/0.30/#html-blocks, 7. */}} 10 | {{ .Inner -}} 11 |
    12 |
    13 |
    14 | {{/**/ -}} 15 | -------------------------------------------------------------------------------- /assets/scss/_pageinfo.scss: -------------------------------------------------------------------------------- 1 | .pageinfo { 2 | font-weight: $font-weight-medium; 3 | background: var(--bs-alert-bg); 4 | color: inherit; 5 | margin: 2rem auto; 6 | padding: 1.5rem; 7 | padding-bottom: 0.5rem; 8 | 9 | @each $color, $value in $theme-colors { 10 | &-#{$color} { 11 | @extend .alert-#{$color}; 12 | border-width: 0; 13 | } 14 | } 15 | } 16 | 17 | .td-page-meta { 18 | &__lastmod { 19 | @extend .text-body-secondary; 20 | @extend .border-top; 21 | margin-top: map-get($spacers, 5) !important; 22 | padding-top: map-get($spacers, 3) !important; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /docsy.dev/scripts/unescape-refcache-json.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Script to unescape refcache.json, which is necessary because of a bug in htmltest. 4 | // See https://github.com/wjdp/htmltest/issues/239 5 | 6 | import { readFileSync, writeFileSync } from 'fs'; 7 | 8 | const refcacheFile = 'static/refcache.json'; 9 | 10 | console.log( 11 | `Unescaping ${refcacheFile}, which is necessary because of a bug in htmltest ...`, 12 | ); 13 | 14 | const data = JSON.parse(readFileSync(refcacheFile, 'utf8')); 15 | writeFileSync(refcacheFile, JSON.stringify(data, null, 2) + '\n'); 16 | 17 | console.log('Done.'); 18 | -------------------------------------------------------------------------------- /layouts/_partials/print/content.html: -------------------------------------------------------------------------------- 1 | {{ $tpl := printf "print/content-%s.html" .Page.Type }} 2 | 3 | {{ if templates.Exists (printf "_partials/%s" $tpl) }} 4 | {{ partial $tpl . }} 5 | {{ else -}} 6 | {{ $break := cond .DoPageBreak "page-break-before: always" "" -}} 7 |
    8 | {{ $break := cond .DoPageBreak "page-break-before: always" "" }} 9 |

    {{ .PageNum }} - {{ .Page.Title }}

    10 | {{ with .Page.Params.description }}
    {{ . | markdownify }}
    {{ end }} 11 | {{ .Page.Content }} 12 |
    13 | {{ end }} 14 | -------------------------------------------------------------------------------- /docsy.dev/content/en/site/implementation/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Implementation 3 | linkTitle: Implementation 4 | description: 5 | Code-level structure and conventions, Hugo/Docsy templates, SCSS/JS 6 | customizations, patches, and internal shims. 7 | no_list: true 8 | --- 9 | 10 | This section documents code-level implementation details for the Docsy website, 11 | including patches, internal shims, and customizations. 12 | 13 | ## Patches and workarounds 14 | 15 | - [ScrollSpy patch for Bootstrap]({{< relref "scrollspy-patch" >}}) — Runtime 16 | patch to fix Bootstrap ScrollSpy handling of invalid CSS selector IDs. 17 | -------------------------------------------------------------------------------- /layouts/community/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 | 3 |
    4 |
    7 |
    8 |
    9 | 10 |

    {{ T "community_join" . }}

    11 |

    {{ T "community_introduce" . }}

    12 |
    13 |
    14 |
    15 |
    16 | {{ partial "community_links.html" . -}} 17 | 18 | {{ with .Content -}} 19 |
    20 | {{ . }} 21 |
    22 | {{- end -}} 23 | 24 | {{ end }} 25 | -------------------------------------------------------------------------------- /layouts/_partials/footer.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | 7 | {{- /* Trim WS */ -}} 8 | 11 | {{- /* Trim WS */ -}} 12 | 15 |
    16 |
    17 |
    18 | -------------------------------------------------------------------------------- /layouts/search.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |
    3 |
    4 |

    {{ .Title }}

    5 | {{ with .Site.Params.gcs_engine_id -}} 6 | 17 | 18 | {{ end -}} 19 |
    20 |
    21 | {{ end }} 22 | -------------------------------------------------------------------------------- /.vscode/cspell.json: -------------------------------------------------------------------------------- 1 | // For settings, see https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/ 2 | { 3 | "version": "0.2", 4 | "caseSensitive": true, 5 | "words": [ 6 | "anchorize", 7 | "Docsy", 8 | "errorf", 9 | "Gantt", 10 | "GLFM", 11 | "htmltest", 12 | "hugo", 13 | "isset", 14 | "markdownify", 15 | "nvmrc", 16 | "Occitan", 17 | "refcache", 18 | "relref", 19 | "scrollspy", 20 | "shortcode", 21 | "shortcodes", 22 | "subfolders", 23 | "tabpane", 24 | "unmarshal", 25 | "upvote", 26 | "viewports", 27 | "warnf", 28 | "warnidf", 29 | "wrapup" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /layouts/_partials/pager.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /layouts/_partials/toc.html: -------------------------------------------------------------------------------- 1 | {{/* 2 | 3 | Always render the td-toc element. ScrollSpy is counting on it to exist, 4 | even if it's empty. 5 | 6 | cSpell:ignore notoc 7 | */ -}} 8 | 9 |
    10 | {{ if not .Params.notoc -}} 11 | {{ $toc := .TableOfContents -}} 12 | {{ if and $toc (ne $toc ``) -}} 13 |
    14 | {{ i18n "toc_on_this_page" }} 15 | 16 |
    17 | {{ $toc | safeHTML }} 18 | {{ end -}} 19 | {{ end -}} 20 |
    21 | {{/* */ -}} 22 | -------------------------------------------------------------------------------- /layouts/_partials/featured-image.html: -------------------------------------------------------------------------------- 1 | {{ $w := .w | default 480 }} 2 | {{ $h := .h | default 180 }} 3 | {{ $p := .p }} 4 | {{ $class := .class | default "ms-3" }} 5 | {{ $image := ($p.Resources.ByType "image").GetMatch "**featured*" }} 6 | {{ with $image }} 7 | {{ $image := .Fill (printf "%dx%d" $w $h ) }} 8 |
    9 | Featured Image for {{ $p.Title }} 10 | {{ with $image.Params.byline }} 11 |
    {{ . | html }}
    12 | {{ end }} 13 |
    14 | {{ end }} -------------------------------------------------------------------------------- /layouts/_partials/print/content-blog.html: -------------------------------------------------------------------------------- 1 | {{ $break := cond .DoPageBreak "page-break-before: always" "" }} 2 | {{ with .Page }} 3 |
    4 |

    {{ .Title }}

    5 | {{ with .Params.description }}
    {{ . | markdownify }}
    {{ end }} 6 | 12 | {{ .Content }} 13 |
    14 | {{ end }} 15 | -------------------------------------------------------------------------------- /assets/stubs/new-page-template.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Long Page Title" 3 | linkTitle: "Short Nav Title" 4 | weight: 100 5 | description: >- 6 | Page description for heading and indexes. 7 | --- 8 | 9 | ## Heading 10 | 11 | Edit this template to create your new page. 12 | 13 | * Give it a good name, ending in `.md` - e.g. `getting-started.md` 14 | * Edit the "front matter" section at the top of the page (weight controls how its ordered amongst other pages in the same directory; lowest number first). 15 | * Add a good commit message at the bottom of the page (<80 characters; use the extended description field for more detail). 16 | * Create a new branch so you can preview your new file and request a review via Pull Request. 17 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Google LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | module.exports = { 18 | plugins: { 19 | autoprefixer: {} 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | # cSpell:ignore docsy github lookandfeel iconsimages 2 | 3 | globs: 4 | - '!node_modules/**' 5 | - '!public/**' 6 | - '!tmp/**' 7 | - '!docsy.dev/**' 8 | - docsy.dev/content/en/docs/content/iconsimages.md 9 | - docsy.dev/content/en/docs/content/language.md 10 | - docsy.dev/content/en/docs/content/lookandfeel.md 11 | - docsy.dev/content/en/docs/content/navigation.md 12 | # - docsy.dev/content/en/docs/content/repository-links.md 13 | # - docsy.dev/content/en/docs/content/search.md 14 | # - docsy.dev/content/en/docs/content/shortcodes.md 15 | # - docsy.dev/content/en/docs/content/versioning.md 16 | - docsy.dev/content/en/blog/2025/0.13.0.md 17 | config: 18 | extends: .markdownlint.yaml 19 | -------------------------------------------------------------------------------- /layouts/_partials/footer/center.html: -------------------------------------------------------------------------------- 1 | {{ partial "footer/copyright.html" . -}} 2 | 3 | {{ with .Site.Params.privacy_policy -}} 4 | {{ T "footer_privacy_policy" }} 5 | {{- end -}} 6 | 7 | {{ if ne .Site.Params.ui.footer_about_disable nil -}} 8 | {{ warnf "Config parameter '.params.ui.footer_about_disable' is DEPRECATED, use '.params.ui.footer_about_enable' instead." -}} 9 | {{ end -}} 10 | 11 | {{ if or .Site.Params.ui.footer_about_enable (eq .Site.Params.ui.footer_about_disable false) -}} 12 | {{ with .Site.GetPage "about" -}} 13 | 14 | {{- end -}} 15 | {{ end -}} 16 | -------------------------------------------------------------------------------- /layouts/_td-content.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {{ .Title }}

    3 | {{ with .Params.description }}
    {{ . | markdownify }}
    {{ end }} 4 | 10 | {{ .Render "_td-content-after-header" -}} 11 | {{ .Content }} 12 | {{ partial "feedback.html" . -}} 13 | {{ if (.Site.Config.Services.Disqus.Shortname) -}} 14 |
    15 | {{- partial "disqus-comment.html" . -}} 16 | {{ end -}} 17 | {{ partial "page-meta-lastmod.html" . }} 18 |
    19 | {{/**/ -}} 20 | -------------------------------------------------------------------------------- /assets/scss/_main-container.scss: -------------------------------------------------------------------------------- 1 | // The outer page container i.e. common styles for any page. 2 | .td-outer { 3 | display: flex; 4 | flex-direction: column; 5 | min-height: 100vh; 6 | } 7 | 8 | // The outer page container for the default base template. 9 | .td-default { 10 | main { 11 | > section:first-of-type { 12 | @include media-breakpoint-up(md) { 13 | padding-top: 8rem; 14 | } 15 | } 16 | 17 | section { 18 | @extend .td-block-padding; 19 | } 20 | } 21 | } 22 | 23 | .td-main { 24 | flex-grow: 1; 25 | } 26 | 27 | .td-404 main, 28 | .td-main main { 29 | padding-top: 1.5rem; 30 | padding-bottom: 2rem; 31 | @include media-breakpoint-up(md) { 32 | padding-top: 5.5rem; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | labels: [bug, needs-triage] 4 | about: Create a report to help us improve 5 | --- 6 | 7 | 8 | 9 | ### Environment 10 | 11 | - [ ] Version of Docsy you are using: 12 | - [ ] How are you using Docsy? As a: 13 | - [ ] Hugo module 14 | - [ ] NPM module 15 | - [ ] Git submodule 16 | - [ ] Other: 17 | - [ ] Version of Hugo you are using (output of `hugo version`): 18 | - [ ] OS: 19 | - [ ] Linux 20 | - [ ] macOS 21 | - [ ] Windows 22 | - [ ] Other: 23 | 24 | ### Problem 25 | 26 | 27 | -------------------------------------------------------------------------------- /assets/scss/_drawio.scss: -------------------------------------------------------------------------------- 1 | div.drawio { 2 | display: inline-block; 3 | position: relative; 4 | 5 | button { 6 | @extend .btn; 7 | @extend .btn-outline-primary; 8 | position: absolute; 9 | bottom: 5px; 10 | right: 5px; 11 | padding: 0.4em 0.5em; 12 | font-size: 0.8em; 13 | display: none; 14 | } 15 | 16 | &:hover button { 17 | display: inline; 18 | } 19 | } 20 | 21 | div.drawioframe { 22 | position: fixed; 23 | height: 100%; 24 | width: 100%; 25 | top: 0; 26 | left: 0; 27 | z-index: 1000; 28 | background: #000b; 29 | border: 0; 30 | 31 | iframe { 32 | position: absolute; 33 | height: 90%; 34 | width: 90%; 35 | top: 5%; 36 | left: 5%; 37 | z-index: 1010; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /layouts/_partials/taxonomy_terms_article_wrapper.html: -------------------------------------------------------------------------------- 1 | {{ $context := . -}} 2 | {{ if .Site.Params.Taxonomy -}} 3 | {{ if .Site.Params.Taxonomy.taxonomyPageHeader -}} 4 | {{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader -}} 5 | {{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo) -}} 6 | {{ end }} 7 | {{ else -}} 8 | {{ range $taxo, $taxo_map := .Site.Taxonomies -}} 9 | {{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo) -}} 10 | {{ end }} 11 | {{ end -}} 12 | {{ else -}} 13 | {{ range $taxo, $taxo_map := .Site.Taxonomies -}} 14 | {{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo) -}} 15 | {{ end }} 16 | {{ end -}} 17 | -------------------------------------------------------------------------------- /layouts/swagger/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
    3 |

    {{ .Title }}

    4 | {{ with .Params.description }}
    {{ . | markdownify }}
    {{ end }} 5 | 11 | {{ .Content }} 12 | {{ partial "section-index.html" . -}} 13 | {{ partial "feedback.html" . -}} 14 | {{ if (.Site.Config.Services.Disqus.Shortname) -}} 15 |
    16 | {{ partial "disqus-comment.html" . -}} 17 | {{ end -}} 18 | {{ partial "page-meta-lastmod.html" . -}} 19 |
    20 | {{ end -}} 21 | -------------------------------------------------------------------------------- /docsy.dev/scripts/prune-refcache-4xx.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Script to prune refcache.json entries with StatusCode >= 400 (error responses). 4 | // This removes entries for URLs that returned 4xx or 5xx status codes. 5 | 6 | import { readFileSync, writeFileSync } from 'fs'; 7 | 8 | const refcacheFile = 'static/refcache.json'; 9 | 10 | console.log( 11 | `Pruning ${refcacheFile} to remove entries with StatusCode >= 400 ...`, 12 | ); 13 | 14 | const data = JSON.parse(readFileSync(refcacheFile, 'utf8')); 15 | 16 | // Filter entries where StatusCode < 400 17 | const pruned = Object.fromEntries( 18 | Object.entries(data).filter(([_, value]) => value.StatusCode < 400), 19 | ); 20 | 21 | writeFileSync(refcacheFile, JSON.stringify(pruned, null, 2) + '\n'); 22 | 23 | console.log('Done.'); 24 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # Hugo build configuration for Netlify 2 | # (https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify) 3 | 4 | [build] 5 | publish = "docsy.dev/public" 6 | command = "npm install && cd docsy.dev && npm run build:preview" 7 | 8 | [build.environment] 9 | GO_VERSION = "1.23.5" 10 | HUGO_THEME = "repo" 11 | 12 | [context.production] 13 | command = "npm install && cd docsy.dev && npm run build:production" 14 | 15 | # Redirects for slug swap: /docs/adding-content/ → /docs/content/ 16 | [[redirects]] 17 | from = "/docs/adding-content/content" 18 | to = "/docs/content/adding-content" 19 | status = 301 20 | 21 | [[redirects]] 22 | from = "/docs/adding-content/*" 23 | to = "/docs/content/:splat" 24 | status = 301 25 | 26 | # cSpell:ignore docsy 27 | -------------------------------------------------------------------------------- /assets/_cache/bootstrap/method.patch: -------------------------------------------------------------------------------- 1 | --- scrollspy-method.js 2 | +++ scrollspy-method.js 3 | @@ -10,11 +10,13 @@ 4 | continue 5 | } 6 | 7 | - const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element) 8 | + const decodedHash = decodeURI(anchor.hash) 9 | + const escapedSelector = parseSelector(decodedHash) 10 | + const observableSection = SelectorEngine.findOne(escapedSelector, this._element) 11 | 12 | // ensure that the observableSection exists & is visible 13 | if (isVisible(observableSection)) { 14 | - this._targetLinks.set(decodeURI(anchor.hash), anchor) 15 | + this._targetLinks.set(decodedHash, anchor) 16 | this._observableSections.set(anchor.hash, observableSection) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /layouts/docs/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
    3 |

    {{ .Title }}

    4 | {{ with .Params.description }}
    {{ . | markdownify }}
    {{ end }} 5 | 11 | {{ .Render "_td-content-after-header" -}} 12 | {{ .Content }} 13 | {{ partial "section-index.html" . -}} 14 | {{ partial "feedback.html" . -}} 15 | {{ if (.Site.Config.Services.Disqus.Shortname) -}} 16 |
    17 | {{- partial "disqus-comment.html" . -}} 18 | {{ end -}} 19 | {{ partial "page-meta-lastmod.html" . -}} 20 |
    21 | {{ end -}} 22 | -------------------------------------------------------------------------------- /layouts/_partials/version-banner.html: -------------------------------------------------------------------------------- 1 | 3 | {{ if .Site.Params.archived_version }} 4 | {{ $color := "primary" }} 5 | {{ $latest_version := .Site.Params.url_latest_version }} 6 | {{ $current_version := .Site.Params.version }} 7 |
    8 | {{ with $current_version }}

    Version {{ . | markdownify }} of the 9 | documentation is no longer actively maintained. The site that you are 10 | currently viewing is an archived snapshot. 11 | {{ with $latest_version }}For up-to-date documentation, see the 12 | latest version.

    13 | {{ end }} 14 | {{ end }} 15 |
    16 | {{ end }} 17 | -------------------------------------------------------------------------------- /assets/_cache/bootstrap/scrollspy-method.js: -------------------------------------------------------------------------------- 1 | _initializeTargetsAndObservables() { 2 | this._targetLinks = new Map() 3 | this._observableSections = new Map() 4 | 5 | const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target) 6 | 7 | for (const anchor of targetLinks) { 8 | // ensure that the anchor has an id and is not disabled 9 | if (!anchor.hash || isDisabled(anchor)) { 10 | continue 11 | } 12 | 13 | const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element) 14 | 15 | // ensure that the observableSection exists & is visible 16 | if (isVisible(observableSection)) { 17 | this._targetLinks.set(decodeURI(anchor.hash), anchor) 18 | this._observableSections.set(anchor.hash, observableSection) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /layouts/_partials/taxonomy_terms_cloud.html: -------------------------------------------------------------------------------- 1 | {{ $context := .context -}} 2 | {{ $taxo := .taxo -}} 3 | {{ $title := .title -}} 4 | {{ if isset $context.Site.Taxonomies (lower $taxo) -}} 5 | {{ $taxonomy := index $context.Site.Taxonomies (lower $taxo) -}} 6 | {{ if (gt (len $taxonomy) 0) -}} 7 |
    8 | {{ with $title -}} 9 |
    {{ . }}
    10 | {{ end -}} 11 | 16 |
    17 | {{ end -}} 18 | {{ end -}} 19 | -------------------------------------------------------------------------------- /layouts/_partials/td/scrollspy-attr.txt: -------------------------------------------------------------------------------- 1 | {{/* 2 | 3 | Ensure that the value of `data-bs-target` is a selector to an element that will 4 | always exist, otherwise ScrollSpy will scan the full page body, and this can 5 | cause problems -- see 6 | https://github.com/google/docsy/issues/2328#issuecomment-3538869206. 7 | 8 | */ -}} 9 | 10 | {{ if not (.Param "ui.scrollSpy.disable") -}} 11 | {{ $rootMargin := .Param "ui.scrollSpy.rootMargin" | default "0px 0px -10%" -}} 12 | {{/* Note that we tried `data-bs-smooth-scroll="true"`, but it breaks browser URL updates. 13 | For details, see https://github.com/google/docsy/pull/2291 */ -}} 14 | {{ $attr := slice 15 | ` data-bs-spy="scroll"` 16 | ` data-bs-target=".td-toc"` 17 | (printf ` data-bs-root-margin="%s"` $rootMargin) 18 | -}} 19 | {{ delimit $attr "" -}} 20 | {{ end -}} 21 | -------------------------------------------------------------------------------- /layouts/_shortcodes/blocks/lead.html: -------------------------------------------------------------------------------- 1 | {{ $col_id := .Get "color" | default .Ordinal -}} 2 | {{ $height := .Get "height" | default "auto" -}} 3 | {{ with .Get "height" -}} 4 | {{ if not ( or ( eq . "auto" ) ( eq . "min" ) ( eq . "med" ) ( eq . "max" ) ( eq . "full" ) ) -}} 5 | {{ errorf "shortcode 'lead': parameter height is %q, must be one of 'auto', 'min', 'med', 'max' or 'full'." . -}} 6 | {{ end -}} 7 | {{ end -}} 8 | 9 |
    10 |
    11 |
    12 |
    13 |
    14 | {{/* Do NOT remove this comment! It ends the HTML block above. See https://spec.commonmark.org/0.30/#html-blocks, 7. */}} 15 | {{ .Inner }} 16 |
    17 |
    18 |
    19 |
    20 | {{/**/ -}} 21 | -------------------------------------------------------------------------------- /layouts/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | 11 | 12 |
    13 | {{ partial "navbar.html" . }} 14 |
    15 |
    16 |
    17 | {{ block "main" . }}{{ end }} 18 |
    19 | {{ partial "footer.html" . }} 20 |
    21 | {{ partialCached "scripts.html" . }} 22 | 23 | -------------------------------------------------------------------------------- /scripts/get-build-id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Uses `git describe --tags main` to derive a build ID. This doesn't guarantee uniqueness, 4 | # but it's a good enough approximation for our purposes. 5 | # 6 | # Examples of the script output for a given git-describe output: 7 | # - v0.12.0-38-g53cfee7 -> 38-g53cfee7 8 | # - v0.12.0 -> '' (empty string when the current commit is exactly on a tag) 9 | 10 | set -euo pipefail 11 | 12 | # Get the git describe output from the main branch 13 | if ! git_describe=$(git describe --tags main 2>/dev/null); then 14 | echo "Error running git describe: command failed" >&2 15 | exit 1 16 | fi 17 | 18 | # Extract the suffix after the tag (everything after the last version prefix) 19 | # Format: v0.12.0-38-g53cfee7 20 | if [[ $git_describe =~ ^v?[0-9.]+-(.+)$ ]]; then 21 | echo "${BASH_REMATCH[1]}" 22 | else 23 | # No suffix (exactly on a tag), return empty string 24 | echo "" 25 | fi 26 | 27 | -------------------------------------------------------------------------------- /assets/_cache/bootstrap/scrollspy-method-patched.js: -------------------------------------------------------------------------------- 1 | _initializeTargetsAndObservables() { 2 | this._targetLinks = new Map() 3 | this._observableSections = new Map() 4 | 5 | const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target) 6 | 7 | for (const anchor of targetLinks) { 8 | // ensure that the anchor has an id and is not disabled 9 | if (!anchor.hash || isDisabled(anchor)) { 10 | continue 11 | } 12 | 13 | const decodedHash = decodeURI(anchor.hash) 14 | const escapedSelector = parseSelector(decodedHash) 15 | const observableSection = SelectorEngine.findOne(escapedSelector, this._element) 16 | 17 | // ensure that the observableSection exists & is visible 18 | if (isVisible(observableSection)) { 19 | this._targetLinks.set(decodedHash, anchor) 20 | this._observableSections.set(anchor.hash, observableSection) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /assets/_cache/README.md: -------------------------------------------------------------------------------- 1 | This `_cache` folder contains cached copies of external dependencies used for 2 | build-time validation. 3 | 4 | ## Purpose 5 | 6 | Files in this folder are used to validate that external dependencies (like 7 | Bootstrap) haven't changed in ways that would break our patches or workarounds. 8 | 9 | ## Current Contents 10 | 11 | - `bootstrap/scrollspy-method.js` - Cached copy of Bootstrap's 12 | `_initializeTargetsAndObservables()` method 13 | - `bootstrap/scrollspy-method-patched.js` - Result of applying `method.patch` to 14 | `scrollspy-method.js` 15 | - `bootstrap/method.patch` - Standard unified diff patch file 16 | 17 | ## Maintenance 18 | 19 | These files are automatically updated by the `_prepare:scrollspy-patch` script 20 | (called via `npm run _prepare`). The CI/CD pipeline validates that these files 21 | match what's committed. 22 | 23 | DO NOT manually edit these files unless updating the patch. For details, see 24 | `scripts/scrollspy-patch/README.md`. 25 | -------------------------------------------------------------------------------- /layouts/blog/_td-content.html: -------------------------------------------------------------------------------- 1 |
    2 |

    {{ .Title }}

    3 | {{ with .Params.description }}
    {{ . | markdownify }}
    {{ end }} 4 | 8 | 14 | {{ .Render "_td-content-after-header" -}} 15 | {{ .Content }} 16 | {{ if (.Site.Config.Services.Disqus.Shortname) -}} 17 |
    18 | {{- partial "disqus-comment.html" . -}} 19 |
    20 | {{ end -}} 21 | 22 | {{ partial "pager.html" . }} 23 | {{ partial "page-meta-lastmod.html" . -}} 24 |
    25 | -------------------------------------------------------------------------------- /assets/scss/support/_utilities.scss: -------------------------------------------------------------------------------- 1 | // Common utility classes 2 | 3 | .td-border-top { 4 | border: none; 5 | border-top: 1px solid #eee; 6 | } 7 | 8 | .td-border-none { 9 | border: none; 10 | } 11 | 12 | .td-block-padding { 13 | padding-top: $td-block-space-top-base; 14 | padding-bottom: $td-block-space-bottom-base; 15 | 16 | @include media-breakpoint-up(md) { 17 | padding-top: $td-block-space-top-base * 1.25; 18 | padding-bottom: $td-block-space-bottom-base * 1.25; 19 | } 20 | } 21 | 22 | .td-overlay { 23 | position: relative; 24 | 25 | &::after { 26 | content: ""; 27 | position: absolute; 28 | inset: 0; 29 | } 30 | 31 | &--dark::after { 32 | background-color: rgba($dark, 0.3); 33 | } 34 | 35 | &--light::after { 36 | background-color: rgba($light, 0.3); 37 | } 38 | 39 | &__inner { 40 | position: relative; 41 | z-index: 1; 42 | } 43 | } 44 | 45 | .td-max-width-on-larger-screens { 46 | @include media-breakpoint-up(lg) { 47 | max-width: 80%; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /layouts/_partials/taxonomy_terms_clouds.html: -------------------------------------------------------------------------------- 1 | {{ $context := . -}} 2 | {{ if .Site.Params.taxonomy -}} 3 | {{ if .Site.Params.Taxonomy.taxonomyCloud -}} 4 | {{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyCloud -}} 5 | {{ if $.Site.Params.Taxonomy.taxonomyCloudTitle -}} 6 | {{ $.Scratch.Set "title" (index $.Site.Params.Taxonomy.taxonomyCloudTitle $index) -}} 7 | {{ else -}} 8 | {{ $.Scratch.Set "title" (humanize $taxo) -}} 9 | {{ end -}} 10 | {{ partial "taxonomy_terms_cloud.html" (dict "context" $context "taxo" $taxo "title" ($.Scratch.Get "title")) -}} 11 | {{ end }} 12 | {{ else -}} 13 | {{ range $taxo, $taxo_map := .Site.Taxonomies -}} 14 | {{ partial "taxonomy_terms_cloud.html" (dict "context" $context "taxo" $taxo "title" (humanize $taxo)) -}} 15 | {{ end }} 16 | {{ end -}} 17 | {{ else -}} 18 | {{ range $taxo, $taxo_map := .Site.Taxonomies -}} 19 | {{ partial "taxonomy_terms_cloud.html" (dict "context" $context "taxo" $taxo "title" (humanize $taxo)) -}} 20 | {{ end }} 21 | {{ end -}} 22 | -------------------------------------------------------------------------------- /assets/json/offline-search-index.json: -------------------------------------------------------------------------------- 1 | {{- $.Scratch.Add "offline-search-index" slice -}} 2 | {{- range where .Site.AllPages ".Params.exclude_search" "!=" true -}} 3 | {{- /* We have to apply `htmlUnescape` again after `truncate` because `truncate` applies `html.EscapeString` if the argument is not HTML. */ -}} 4 | {{- /* Individual taxonomies can be added in the next line by add '"taxonomy-name" (.Params.taxonomy-name | default "")' to the dict (as seen for categories and tags). */ -}} 5 | {{- $.Scratch.Add 6 | "offline-search-index" 7 | (dict 8 | "ref" .RelPermalink 9 | "title" .Title 10 | "categories" (.Params.categories | default "") 11 | "tags" (.Params.tags | default "") 12 | "description" (.Description | default "") 13 | "body" (.Plain | htmlUnescape) 14 | "excerpt" ((.Description | default .Plain) | htmlUnescape | truncate (.Site.Params.offlineSearchSummaryLength | default 70) | htmlUnescape) 15 | ) 16 | -}} 17 | {{- end -}} 18 | {{- $.Scratch.Get "offline-search-index" | jsonify -}} 19 | -------------------------------------------------------------------------------- /layouts/_partials/breadcrumb.html: -------------------------------------------------------------------------------- 1 | {{ $isSingle := true -}} 2 | {{ with .Parent -}} 3 | {{ $isSingle = .IsHome -}} 4 | {{ end -}} 5 | 11 | 12 | {{- define "breadcrumbnav" -}} 13 | {{ if .p1.Parent -}} 14 | {{ if not .p1.Parent.IsHome -}} 15 | {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) -}} 16 | {{ end -}} 17 | {{ else if not .p1.IsHome -}} 18 | {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) -}} 19 | {{ end -}} 20 | {{ $isActive := eq .p1 .p2 }} 21 | 29 | {{- end -}} 30 | -------------------------------------------------------------------------------- /layouts/_shortcodes/alert.html: -------------------------------------------------------------------------------- 1 | {{/* 2 | 3 | @param {string} [title=""] HTML rendered as a Bootstrap alert heading. 4 | @param {string} [color="primary"] Suffix used for the Bootstrap alert class 5 | `alert-{color}`. 6 | 7 | For details, see https://www.docsy.dev/docs/content/shortcodes/#alert. 8 | 9 | */ -}} 10 | 11 | {{ $color := .Get "color" | default "primary" -}} 12 | 13 | 31 | -------------------------------------------------------------------------------- /layouts/docs/baseof.print.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | 11 | 12 |
    13 | {{ partial "navbar.html" . }} 14 |
    15 |
    16 |
    17 |
    18 |
    19 | {{ block "main" . }}{{ end }} 20 |
    21 |
    22 |
    23 | {{ partial "footer.html" . }} 24 |
    25 | {{ partial "scripts.html" . }} 26 | 27 | 28 | -------------------------------------------------------------------------------- /layouts/_partials/disqus-comment.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | 22 | 23 |
    24 | -------------------------------------------------------------------------------- /layouts/_partials/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docsy.dev/content/en/tests/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docsy tests 3 | linkTitle: Tests 4 | type: docs 5 | description: Tests of Docsy features 6 | params: 7 | hide_feedback: true 8 | --- 9 | 10 | ## Alerts 11 | 12 | {{% alert title="Primary alert heading" color="primary" %}} 13 | A simple primary alert. 14 | {{% /alert %}} 15 | 16 | {{% alert title="Secondary alert heading" color="secondary" %}} 17 | A simple secondary alert. 18 | {{% /alert %}} 19 | 20 | {{% alert title="Success alert heading" color="success" %}} 21 | A simple success alert. 22 | {{% /alert %}} 23 | 24 | {{% alert title="Danger alert heading" color="danger" %}} 25 | A simple danger alert. 26 | {{% /alert %}} 27 | 28 | {{% alert title="Warning alert heading" color="warning" %}} 29 | A simple warning alert. 30 | {{% /alert %}} 31 | 32 | {{% alert title="Info alert heading" color="info" %}} 33 | A simple info alert. 34 | {{% /alert %}} 35 | 36 | {{% alert title="Light alert heading" color="light" %}} 37 | A simple light alert. 38 | {{% /alert %}} 39 | 40 | {{% alert title="Dark alert heading" color="dark" %}} 41 | A simple dark alert. 42 | {{% /alert %}} 43 | -------------------------------------------------------------------------------- /.github/workflows/test.yaml: -------------------------------------------------------------------------------- 1 | # Build Docsy & the website and run all repo checks across OSs. 2 | # cSpell:ignore docsy 3 | 4 | name: test 5 | 6 | on: 7 | push: 8 | branches: [main] 9 | pull_request: 10 | # schedule: 11 | # - cron: '11 0 * * *' # 11 past midnight every day 12 | workflow_dispatch: 13 | 14 | jobs: 15 | build: 16 | runs-on: ${{ matrix.os }} 17 | strategy: 18 | fail-fast: false 19 | matrix: 20 | os: [windows-latest, ubuntu-latest] 21 | steps: 22 | - uses: actions/checkout@v4 23 | 24 | - uses: actions/setup-node@v4 25 | with: 26 | node-version-file: .nvmrc 27 | cache: npm 28 | cache-dependency-path: package.json 29 | 30 | - run: npm install --omit=optional 31 | 32 | - if: runner.os != 'Windows' 33 | run: npm run ci:test 34 | 35 | - if: runner.os == 'Windows' 36 | run: npm run ci:prepare && npm run cd:docsy.dev build && npm run ci:post 37 | 38 | - uses: actions/upload-artifact@v4 39 | with: 40 | name: test-site-${{ matrix.os }} 41 | path: | 42 | docsy.dev/public 43 | -------------------------------------------------------------------------------- /assets/scss/shortcodes/tabbed-pane.scss: -------------------------------------------------------------------------------- 1 | // Only constrain max-width for top-level tabbed panes not, e.g., those in lists. 2 | .td-content > .tab-content .tab-pane { 3 | @extend .td-max-width-on-larger-screens; 4 | } 5 | 6 | .tab-content { 7 | .tab-pane { 8 | .highlight { 9 | margin: 0; 10 | border: none; 11 | max-width: 100%; 12 | } 13 | margin-top: 0; 14 | margin-bottom: 1.5rem; 15 | border-left: $nav-tabs-border-width solid $nav-tabs-border-color; 16 | border-right: $nav-tabs-border-width solid $nav-tabs-border-color; 17 | border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color; 18 | } 19 | } 20 | 21 | .tab-body { 22 | font-weight: $font-weight-medium; 23 | background: var(--td-pre-bg); 24 | color: var(--bs-body-color); 25 | border-radius: 0; 26 | padding: 1.5rem; 27 | 28 | > :last-child { 29 | margin-bottom: 0; 30 | } 31 | 32 | > .highlight:only-child { 33 | margin: -1.5rem; 34 | max-width: calc(100% + 3rem); 35 | } 36 | 37 | @each $color, $value in $theme-colors { 38 | &-#{$color} { 39 | border-style: solid; 40 | border-color: $value; 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/updating/updating-hugo-module.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update your Docsy Hugo Module 3 | weight: 1 4 | description: Update your Docsy theme to the latest version using Hugo Modules. 5 | --- 6 | 7 | When using the Docsy theme as a Hugo Module, updating your theme is really easy. 8 | 9 | At the command prompt, change to the root directory of your existing site. 10 | 11 | ```bash 12 | cd /path/to/my-existing-site 13 | ``` 14 | 15 | Then invoke hugo's module `get` subcommand with the update flag: 16 | 17 | ```bash 18 | hugo mod get -u github.com/google/docsy 19 | ``` 20 | 21 | Hugo automatically pulls in the latest theme version. That's it, your update is 22 | done! 23 | 24 | {{% alert title="Tip" %}} 25 | 26 | If you want to set your module to a certain version inside the Docsy theme repo, 27 | simply specify the name of the tag representing this version when updating your 28 | theme, for example: 29 | 30 | ```bash 31 | hugo mod get -u github.com/google/docsy@v{{% param "version" %}} 32 | ``` 33 | 34 | Instead of a version tag, you can also specify a commit hash, for example: 35 | 36 | ```bash 37 | hugo mod get -u github.com/google/docsy@6c8a3afe 38 | ``` 39 | 40 | {{% /alert %}} 41 | -------------------------------------------------------------------------------- /layouts/_partials/head-css.html: -------------------------------------------------------------------------------- 1 | {{ $scssMain := "scss/main.scss" -}} 2 | {{ $css := resources.Get $scssMain 3 | | toCSS (dict "enableSourceMap" (not hugo.IsProduction)) -}} 4 | 5 | {{/* NOTE: we only apply `postCSS` in production or for RTL languages. This 6 | makes it snappier to develop in Chrome, but it may look sub-optimal in other 7 | browsers. */ -}} 8 | 9 | {{ if eq .Site.Language.LanguageDirection "rtl" -}} 10 | {{ $css = $css 11 | | postCSS (dict "use" "autoprefixer rtlcss" "noMap" true) 12 | | resources.Copy (replace $scssMain "." ".rtl.") -}} 13 | {{ else if hugo.IsProduction -}} 14 | {{ $css = $css | postCSS -}} 15 | {{ end -}} 16 | 17 | {{ if hugo.IsProduction -}} 18 | {{ $css = $css | minify | fingerprint -}} 19 | 20 | {{ end -}} 21 | 22 | {{ with $css -}} 23 | 26 | {{ else -}} 27 | {{ errorf "Resource not found or error building CSS: %s" $scssMain -}} 28 | {{ end -}} 29 | 30 | {{- /**/ -}} 31 | -------------------------------------------------------------------------------- /assets/js/search.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 Google LLC 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | (function ($) { 18 | 'use strict'; 19 | 20 | var Search = { 21 | init: function () { 22 | $(document).ready(function () { 23 | $(document).on('keypress', '.td-search input', function (e) { 24 | if (e.keyCode !== 13) { 25 | return; 26 | } 27 | 28 | var query = $(this).val(); 29 | var searchPage = '{{ "search/" | absURL }}?q=' + query; 30 | document.location = searchPage; 31 | 32 | return false; 33 | }); 34 | }); 35 | }, 36 | }; 37 | 38 | Search.init(); 39 | })(jQuery); 40 | -------------------------------------------------------------------------------- /docsy.dev/.htmltest.yml: -------------------------------------------------------------------------------- 1 | # cSpell:ignore github regexs 2 | CacheExpires: 9000h # ~ 12 months 3 | DirectoryPath: public 4 | CheckDoctype: false # Sadly, this is false only because of `static/google*.html` 5 | IgnoreAltMissing: true # FIXME 6 | IgnoreDirectoryMissingTrailingSlash: true # FIXME 7 | TestFilesConcurrently: true 8 | IgnoreDirs: 9 | - ^blog/(\d+/)?page/\d+ 10 | - ^xx # Placeholder language pages 11 | IgnoreEmptyHref: true # FIXME 12 | IgnoreInternalEmptyHash: true # FIXME 13 | IgnoreInternalURLs: # list of paths 14 | IgnoreURLs: # list of regexs of paths or URLs to be ignored 15 | - ^(https://www.docsy.dev/)?xx/ # Placeholder language pages 16 | - \?no-link-check 17 | - index.xml$ # ignore 18 | - ^https?://[^/]+/(categories|tags)/ # ignore Docsy-generated content 19 | - ^https?://localhost\b 20 | # Ignore Docsy-generated GitHub links for now 21 | - ^https?://github\.com/.*?/.*?/(new|edit)/ # view-page, edit-source etc 22 | # Ignore view page source links for now 23 | - ^https://github.com/google/docsy/tree/main/docsy.dev/content/en/ 24 | - ^https://twitter.com/docsydocs$ 25 | # Too flaky or unnecessary 26 | - ^https://badges.netlify.com/api 27 | - ^https://code.jquery.com 28 | -------------------------------------------------------------------------------- /docsy.dev/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution; 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | 25 | ## Community Guidelines 26 | 27 | This project follows 28 | [Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). 29 | -------------------------------------------------------------------------------- /layouts/_partials/community_links.html: -------------------------------------------------------------------------------- 1 | {{ $links := .Site.Params.links -}} 2 | {{ $contribUrl := .Params.contributingUrl | default "docs/contribution-guidelines" -}} 3 | 4 | 24 | 25 | {{ define "community-links-list" -}} 26 |
      27 | {{ range . -}} 28 |
    • 29 | {{ .name }}: 30 | {{ .desc }} 31 |
    • 32 | {{ end }} 33 |
    34 | {{- end }} 35 | -------------------------------------------------------------------------------- /assets/scss/support/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | 3 | @mixin link-decoration($base: none, $focus_or_hover: initial) { 4 | a { 5 | text-decoration: $base; 6 | 7 | &:focus, 8 | &:hover { 9 | text-decoration: $focus_or_hover; 10 | } 11 | } 12 | 13 | .btn-link { 14 | text-decoration: $base; 15 | } 16 | } 17 | 18 | @mixin link-variant($parent, $color, $hover-color, $underline: false) { 19 | #{$parent} { 20 | color: $color; 21 | 22 | &:hover { 23 | color: $hover-color; 24 | } 25 | 26 | @if $underline { 27 | text-decoration: underline; 28 | } 29 | } 30 | } 31 | 32 | @mixin optional-at-root($sel) { 33 | @at-root #{if(not &, $sel, selector-append(&, $sel))} { 34 | @content; 35 | } 36 | } 37 | 38 | // placeholder allows styling of the placeholder used in search input etc. 39 | @mixin placeholder { 40 | @include optional-at-root("::-webkit-input-placeholder") { 41 | @content; 42 | } 43 | 44 | @include optional-at-root(":-moz-placeholder") { 45 | @content; 46 | } 47 | 48 | @include optional-at-root("::-moz-placeholder") { 49 | @content; 50 | } 51 | 52 | @include optional-at-root(":-ms-input-placeholder") { 53 | @content; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /layouts/blog/baseof.print.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | 11 | 12 |
    13 | {{ partial "navbar.html" . }} 14 |
    15 |
    16 |
    17 |
    18 |
    19 |
    20 |
    21 |
    22 |
    23 | {{ block "main" . }}{{ end }} 24 |
    25 |
    26 |
    27 | {{ partial "footer.html" . }} 28 |
    29 | {{ partial "scripts.html" . }} 30 | 31 | 32 | -------------------------------------------------------------------------------- /layouts/_partials/footer/copyright.html: -------------------------------------------------------------------------------- 1 | {{ $page := .Page -}} 2 | {{ with .Site.Params.copyright -}} 3 | {{ $fromYear := "" -}} 4 | {{ $toYear := "" -}} 5 | {{ $authors := "" -}} 6 | {{ if reflect.IsMap . -}} 7 | {{ $fromYear = .from_year -}} 8 | {{ $toYear = .to_year -}} 9 | {{ $authors = .authors -}} 10 | {{ else -}} 11 | {{ $authors = . -}} 12 | {{ end -}} 13 | 14 | © 15 | {{ with $fromYear -}} 16 | {{ . }}– 17 | {{- end -}} 18 | {{ $toYear | default now.Year }} 19 | 20 | {{- $authors 21 | | default (printf "%s Authors" ($.Site.Title | default "Site")) 22 | | $page.RenderString -}} 23 | 24 | {{- /* Trim WS */ -}} 25 | 26 | 27 | {{- with T "footer_all_rights_reserved" -}} 28 | 29 | {{- . -}} 30 | 31 | {{- end }} 32 | 33 | {{- else -}} 34 | 35 | {{ with .Site.Copyright -}} 36 | {{/* For historical reasons we process this as HTML rather than markdown. */ -}} 37 | 38 | {{- . | safeHTML -}} 39 | 40 | {{- end -}} 41 | 42 | {{ end -}} 43 | -------------------------------------------------------------------------------- /layouts/_shortcodes/iframe.html: -------------------------------------------------------------------------------- 1 | {{ $src := .Get "src" | }} 2 | {{ $width := .Get "width" | default "100%" }} 3 | {{ $tryautoheight := .Get "tryautoheight" | default true }} 4 | {{ $style := .Get "style" | default "min-height:98vh; border:none;" }} 5 | {{ $sandbox := .Get "sandbox" | default false }} 6 | {{ $name := .Get "name" | default "iframe-name" }} 7 | {{ $id := .Get "id" | default "iframe-id" }} 8 | {{ $class := .Get "class" }} 9 | {{ $sub := .Get "sub" | default "Your browser can not display embedded frames. You can access the embedded page via the following link:" }} 10 | {{ with $src }} 11 | {{ if $tryautoheight }} 12 | 17 | {{ end }} 18 | 21 | {{ end }} -------------------------------------------------------------------------------- /docsy.dev/content/en/site/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About this website 3 | linkTitle: Website docs 4 | description: How this site is built, maintained, and deployed. 5 | aliases: [project] 6 | cascade: 7 | outputs: [HTML] 8 | type: docs 9 | params: 10 | hide_feedback: true 11 | params: 12 | FA: 13 | --- 14 | 15 | Planned content organization (tentative) 16 | 17 | - **info** — High-level information about the website project, including its 18 | purpose, ownership, and overall status. 19 | - **design** — Architectural design, Information Architecture (IA), layout, UX 20 | choices, theme related decisions, and other design-level artifacts. 21 | - **implementation** — Code-level structure and conventions, Hugo/Docsy 22 | templates, SCSS/JS customizations, patches, and internal shims. 23 | - **build** — Tooling, local development setup, CI/CD workflows, deployment 24 | environments, and automation details. 25 | - **quality** — Link checking, accessibility standards, tests, review practices, 26 | and other quality-related processes. 27 | - **roadmap** — Milestones, backlog, priorities, technical debt, and 28 | design/implementation decisions. 29 | 30 | {{% _param FA person-digging " pe-2" %}} This section is under development. {{% 31 | _param FA person-digging " ps-2" %}} 32 | -------------------------------------------------------------------------------- /layouts/_shortcodes/imgproc.html: -------------------------------------------------------------------------------- 1 | {{ $original := .Page.Resources.GetMatch (printf "**%s*" (.Get 0)) -}} 2 | {{ $command := .Get 1 -}} 3 | {{ $options := .Get 2 -}} 4 | {{ if eq $command "Fit" -}} 5 | {{ .Scratch.Set "image" ($original.Fit $options) -}} 6 | {{ else if eq $command "Resize" -}} 7 | {{ .Scratch.Set "image" ($original.Resize $options) -}} 8 | {{ else if eq $command "Fill" -}} 9 | {{ .Scratch.Set "image" ($original.Fill $options) -}} 10 | {{ else if eq $command "Crop" -}} 11 | {{ .Scratch.Set "image" ($original.Crop $options) -}} 12 | {{ else -}} 13 | {{ errorf "Invalid image processing command: Must be one of Fit, Fill, Crop or Resize." -}} 14 | {{ end -}} 15 | {{ $image := .Scratch.Get "image" -}} 16 | 17 |
    18 | 19 | {{ with .Inner -}} 20 |
    21 |

    22 | {{/* Do **not** remove this comment! It ends above html block! See https://spec.commonmark.org/0.30/#html-blocks, 7. */}} 23 | {{ . }}{{ with $image.Params.byline }}
    {{ . }}
    {{ end }} 24 |

    25 |
    26 | {{ end -}} 27 |
    28 | -------------------------------------------------------------------------------- /scripts/refresh-sass-variables.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | use warnings; 5 | 6 | my $bootstrap_vars = "node_modules/bootstrap/scss/_variables.scss"; 7 | my $forward_vars = "assets/scss/_variables_forward.scss"; 8 | die "File not found: $bootstrap_vars\n" unless -f $bootstrap_vars; 9 | die "File not found: $forward_vars\n" unless -f $forward_vars; 10 | 11 | # Read bootstrap variables into a hash 12 | open(my $bootstrap_fh, '<', $bootstrap_vars) or die "Cannot open $bootstrap_vars: $!\n"; 13 | my %bootstrap_vars; 14 | while (my $line = <$bootstrap_fh>) { 15 | $bootstrap_vars{$1} = $line if $line =~ /^(\$[\w-]+):\s*(.+?)\s*!default;/; 16 | } 17 | close($bootstrap_fh); 18 | 19 | # Process forward variables file in place 20 | local @ARGV = ($forward_vars); 21 | local $^I = '.bak'; # Create a backup file 22 | my $changed = 0; 23 | 24 | while (<>) { 25 | my $line_to_print = $_; 26 | if (/^(\$[\w-]+):/ && exists $bootstrap_vars{$1}) { 27 | if ($_ ne $bootstrap_vars{$1}) { 28 | $changed = 1; 29 | $line_to_print = $bootstrap_vars{$1}; 30 | } 31 | } 32 | print $line_to_print; 33 | } 34 | 35 | print STDOUT ($changed ? "Updated $forward_vars with refreshed variables\n" : "No changes needed in $forward_vars\n"); 36 | unlink("$forward_vars.bak") or die "Cannot remove backup file: $!\n"; 37 | -------------------------------------------------------------------------------- /scripts/git/check-version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Git hook helper used to check and update the package build ID / version. 4 | 5 | action_name="$1" # "commit" or "push" 6 | hook_name="pre-$action_name" 7 | 8 | # Skip version check if on main branch 9 | current_branch="$(git branch --show-current 2>/dev/null)" 10 | if [ "$current_branch" = "main" ]; then 11 | exit 0 12 | fi 13 | 14 | if [ -n "${SKIP_VERSION_CHECK:-}" ]; then 15 | exit 0 16 | fi 17 | 18 | output="$(npm run -s fix:version -- --silent 2>&1)" 19 | status=$? 20 | 21 | if [ $status -ne 0 ]; then 22 | echo "$hook_name: action failed; aborting $action_name." >&2 23 | printf '%s\n' "$output" >&2 24 | exit $status 25 | fi 26 | 27 | if [ -n "$output" ]; then 28 | echo "$output" >&2 29 | echo >&2 30 | abort_action="$(echo "$action_name" | tr '[:lower:]' '[:upper:]')" 31 | echo "$abort_action ABORTED! Why?" >&2 32 | echo 'Just to let you know that the package build ID has been updated. ' >&2 33 | if [ "$action_name" = "push" ]; then 34 | echo 'Commit and push again if you are ok with the new ID.' >&2 35 | else 36 | echo 'Commit again if you are ok with the new ID.' >&2 37 | fi 38 | echo >&2 39 | echo "Don't want the version to be changed, maybe because this is a release" >&2 40 | echo "branch? Set SKIP_VERSION_CHECK=1" >&2 41 | echo >&2 42 | exit 1 43 | fi 44 | -------------------------------------------------------------------------------- /assets/scss/_colors.scss: -------------------------------------------------------------------------------- 1 | // Add some local palette classes so you can do -bg-warning -text-warning etc. Even -bg-1 if you want to paint by numbers. 2 | @mixin palette-variant($color-name, $color-value) { 3 | $text-color: color-contrast($color-value); 4 | $link-color: mix($blue, $text-color, lightness($color-value)); 5 | 6 | $link-hover-color: rgba($link-color, 0.5) !default; 7 | 8 | .-bg-#{$color-name} { 9 | color: $text-color; 10 | background-color: $color-value; 11 | } 12 | 13 | // Make links in paragraphs stand out more. 14 | @include link-variant( 15 | ".-bg-#{$color-name} p:not(.p-initial) > a", 16 | $link-color, 17 | $link-hover-color, 18 | false 19 | ); 20 | 21 | .-text-#{$color-name} { 22 | color: $color-value; 23 | } 24 | } 25 | 26 | @each $color, $value in $colors { 27 | @include palette-variant($color, $value); 28 | } 29 | 30 | @each $color, $value in $theme-colors { 31 | @include palette-variant($color, $value); 32 | } 33 | 34 | @each $color, $value in $grays { 35 | @include palette-variant($color, $value); 36 | } 37 | 38 | // This allows "painting by numbers", i.e. picking colors by a shortcode Ordinal. 39 | @for $i from 1 through length($td-box-colors) { 40 | $value: nth($td-box-colors, $i); 41 | $name: $i - 1; 42 | $text-color: color-contrast($value); 43 | 44 | @include palette-variant($name, $value); 45 | } 46 | -------------------------------------------------------------------------------- /layouts/_shortcodes/card.html: -------------------------------------------------------------------------------- 1 | {{/* Check parameter type */ -}} 2 | {{ $code := false -}} 3 | {{ with .Get "code" -}} 4 | {{ $type := printf "%T" . -}} 5 | {{ if ne $type "bool" -}} 6 | {{ errorf `shortcode 'card': boolean value expected for parameter 'code', but got %s` $type -}} 7 | {{ else }} 8 | {{ $code = . -}} 9 | {{ end -}} 10 | {{ end -}} 11 | 12 | {{ $lang := default "" (.Get "lang") -}} 13 | {{ $highlight := default "" (.Get "highlight") -}} 14 | 15 |
    16 | {{ with $.Get "header" -}} 17 |
    18 | {{ . | markdownify }} 19 |
    20 | {{ end -}} 21 |
    22 | {{ with $.Get "title" -}} 23 |
    24 | {{ . | markdownify -}} 25 |
    26 | {{ end -}} 27 | {{ with $.Get "subtitle" -}} 28 |
    29 | {{ . | markdownify -}} 30 |
    31 | {{ end -}} 32 | {{ with $.Inner -}} 33 | {{ if $code -}} 34 | {{ highlight ( . | strings.TrimSpace ) $lang $highlight -}} 35 | {{ else -}} 36 |

    37 | {{ . -}} 38 |

    39 | {{ end -}} 40 | {{ end -}} 41 |
    42 | {{ with $.Get "footer" -}} 43 | 46 | {{ end -}} 47 |
    48 | -------------------------------------------------------------------------------- /assets/js/click-to-copy.js: -------------------------------------------------------------------------------- 1 | let codeListings = document.querySelectorAll('.highlight > pre'); 2 | 3 | for (let index = 0; index < codeListings.length; index++) { 4 | const codeSample = codeListings[index].querySelector('code'); 5 | const copyButton = document.createElement('button'); 6 | const buttonAttributes = { 7 | type: 'button', 8 | title: 'Copy to clipboard', 9 | 'data-bs-toggle': 'tooltip', 10 | 'data-bs-placement': 'top', 11 | 'data-bs-container': 'body', 12 | }; 13 | 14 | Object.keys(buttonAttributes).forEach((key) => { 15 | copyButton.setAttribute(key, buttonAttributes[key]); 16 | }); 17 | 18 | copyButton.classList.add( 19 | 'fas', 20 | 'fa-copy', 21 | 'btn', 22 | 'btn-sm', 23 | 'td-click-to-copy' 24 | ); 25 | const tooltip = new bootstrap.Tooltip(copyButton); 26 | 27 | copyButton.onclick = () => { 28 | copyCode(codeSample); 29 | copyButton.setAttribute('data-bs-original-title', 'Copied!'); 30 | tooltip.show(); 31 | }; 32 | 33 | copyButton.onmouseout = () => { 34 | copyButton.setAttribute('data-bs-original-title', 'Copy to clipboard'); 35 | tooltip.hide(); 36 | }; 37 | 38 | const buttonDiv = document.createElement('div'); 39 | buttonDiv.classList.add('click-to-copy'); 40 | buttonDiv.append(copyButton); 41 | codeListings[index].insertBefore(buttonDiv, codeSample); 42 | } 43 | 44 | const copyCode = (codeSample) => { 45 | navigator.clipboard.writeText(codeSample.textContent.trim() + '\n'); 46 | }; 47 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/best-practices/site-guidance.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hugo Content Tips 3 | weight: 9 4 | description: Tips for authoring content for your Docsy-themed Hugo site. 5 | --- 6 | 7 | Docsy is a theme for the [Hugo](https://gohugo.io/) static site generator. If 8 | you're not already familiar with Hugo this page provides some useful tips and 9 | potential gotchas for adding and editing content for your site. Feel free to add 10 | your own! 11 | 12 | ## Linking 13 | 14 | By default, regular relative URLs in links are left unchanged by Hugo (they're 15 | still relative links in your site's generated HTML), hence some hardcoded 16 | relative links like `[relative cross-link](../../peer-folder/sub-file.md)` might 17 | behave unexpectedly compared to how they work on your local file system. You may 18 | find it helpful to use some of Hugo's built-in link shortcodes like 19 | [relref](https://gohugo.io/shortcodes/relref/) to avoid broken links in your 20 | generated site. For example a `{{}}` link in Hugo will 21 | actually find and automatically link to your file named `filename.md`. 22 | 23 | Note, however, that `ref` and `relref` links don't work with `_index` or `index` 24 | files (for example, this site's [content landing page](/docs/content/)): 25 | you'll need to use regular Markdown links to section landing or other index 26 | pages. Specify these links relative to the site's root URL, for example: 27 | `/docs/content/`. 28 | 29 | [Learn more about linking](/docs/content/adding-content/#working-with-links). 30 | -------------------------------------------------------------------------------- /layouts/_partials/navbar-lang-selector.html: -------------------------------------------------------------------------------- 1 | {{/* Link directly to documentation etc., if possible. */ -}} 2 | {{ $langPage := cond (gt (len .Translations) 0) . .Site.Home -}} 3 | -------------------------------------------------------------------------------- /assets/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | // Bootstrap options 2 | 3 | $enable-gradients: true !default; 4 | $enable-shadows: true !default; 5 | 6 | :root, 7 | [data-bs-theme="light"] { 8 | --td-pre-bg: var(--bs-tertiary-bg); 9 | } 10 | 11 | // UI element colors 12 | 13 | // Background colors for the sections on home page etc. It is a paint by number 14 | // system, starting at 0, where the number is taken from the shortcode's ordinal 15 | // if not provided by the user. These colors are all part of the theme palette, 16 | // but the mix is fairly random to create variation. This can be overridden by 17 | // the project if needed. 18 | $td-box-colors: $dark, $primary, $secondary, $info, $white, $gray-600, $success, 19 | $warning, $dark, $danger, $primary, $secondary, $info !default; 20 | 21 | // Fonts 22 | 23 | $td-enable-google-fonts: false !default; 24 | 25 | $td-font-awesome-font-name: "Font Awesome 6 Free" !default; 26 | $td-google-font-name: "Open Sans" !default; 27 | $td-google-font-family: "Open+Sans:300,300i,400,400i,700,700i" !default; 28 | $td-web-font-path: "https://fonts.googleapis.com/css?family=#{$td-google-font-family}&display=swap"; 29 | 30 | @if $td-enable-google-fonts { 31 | $td-fonts-serif: join("#{$td-google-font-name}", $td-fonts-serif); 32 | } 33 | 34 | $font-family-sans-serif: null !default; 35 | @if $td-enable-google-fonts { 36 | $font-family-sans-serif: $td-fonts-serif; 37 | } 38 | 39 | $td-font-weight-body-text: $font-weight-normal !default; 40 | 41 | // Space 42 | 43 | $td-block-space-top-base: 4 * $spacer !default; 44 | $td-block-space-bottom-base: 4 * $spacer !default; 45 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/updating/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update Docsy 3 | description: Keeping the Docsy theme up to date. 4 | weight: 8 5 | --- 6 | 7 | We hope to continue to make improvements to the theme 8 | [along with the Docsy community](/docs/contribution-guidelines/). If you have 9 | cloned the example site (or are otherwise using the theme as a Hugo Module or 10 | Git submodule), you can easily update the Docsy theme in your site yourself. If 11 | you have cloned the theme itself into your own project you can also update, 12 | though you may need to resolve merge conflicts. 13 | 14 | Updating Docsy means that your site will build using the latest version of Docsy 15 | at `HEAD` and include all the new commits or changes that have been merged since 16 | the point in time that you initially added the Docsy submodule, or last updated. 17 | Updating won't affect any modifications that you made in your own project to 18 | [override the Docsy look and feel](/docs/content/lookandfeel/), as your 19 | overrides don't modify the theme itself. For details about what has changed in 20 | the theme since your last update, see the list of 21 | [Docsy commits](https://github.com/google/docsy/commits/main). 22 | 23 | If you have been using the theme as a Git submodule, you can also update your 24 | site to use [Docsy as a Hugo Module](/docs/get-started/docsy-as-module/). This 25 | is the latest and simplest way to pull in a Hugo theme from its repository. If 26 | you're not ready to migrate to Hugo Modules yet, don't worry, your site will 27 | still work and you can continue to update your submodule as before. 28 | -------------------------------------------------------------------------------- /docsy.dev/layouts/_shortcodes/release-summary.md: -------------------------------------------------------------------------------- 1 | {{/* 2 | Generates release summary links for the version specified in page params. 3 | 4 | Usage: {{% release-summary %}} 5 | 6 | The version is read from .Params.version in the page's front matter. 7 | */ -}} 8 | 9 | {{ $version := $.Page.Param "version" | string -}} 10 | {{ if not $version -}} 11 | {{ errorf "%s: shortcode 'release-summary': version parameter not found in page or site params" .Position -}} 12 | {{ end -}} 13 | 14 | {{/* Get the blog section index page and search for a post matching the version */ -}} 15 | {{ $blogSection := $.Site.GetPage "/blog" -}} 16 | {{ $blogPage := false -}} 17 | {{ $currentYear := now.Year -}} 18 | {{ $years := slice $currentYear (add $currentYear -1) -}} 19 | {{ range $years -}} 20 | {{ $postPath := printf "%d/%s" . $version -}} 21 | {{ $blogPage = $blogSection.GetPage $postPath -}} 22 | {{ if $blogPage }}{{ break }}{{ end -}} 23 | {{ warnf "%s: shortcode 'release-summary': Blog post not found for version %q in year %d, path: %q" $version . $postPath -}} 24 | {{ end -}} 25 | 26 | {{ if not $blogPage -}} 27 | {{ errorf "%s: shortcode 'release-summary': blog post not found for version %q during years: %q" 28 | .Position $version (delimit $years ", ") -}} 29 | {{ end -}} 30 | 31 | {{ $changelogURL := printf "/site/changelog/#v%s" $version -}} 32 | {{ $productionURL := .Site.Params.productionURL -}} 33 | 34 | ## Release summary 35 | 36 | - [{{ $blogPage.Title }}][blog-post] 37 | - [Changelog v{{ $version }}][changelog] entry 38 | 39 | [blog-post]: <{{ $productionURL }}{{ $blogPage.RelPermalink }}> 40 | [changelog]: <{{ $productionURL }}{{ $changelogURL }}> 41 | -------------------------------------------------------------------------------- /docsy.dev/Makefile: -------------------------------------------------------------------------------- 1 | REFCACHE?=refcache 2 | HTMLTEST_DIR=tmp 3 | HTMLTEST?=htmltest # Specify as make arg if different 4 | HTMLTEST_ARGS?=--log-level 1 5 | LINK_CACHE_FILE?=refcache.json 6 | LINK_CACHE_FILE_DEST_DIR?=static 7 | LINK_CACHE_FILE_SRC_DIR?=$(HTMLTEST_DIR)/.htmltest 8 | 9 | # Use $(HTMLTEST) in PATH, if available; otherwise, we'll get a copy 10 | ifeq (, $(shell which $(HTMLTEST))) 11 | override HTMLTEST=$(HTMLTEST_DIR)/bin/htmltest 12 | ifeq (, $(shell which $(HTMLTEST))) 13 | GET_LINK_CHECKER_IF_NEEDED=get-link-checker 14 | endif 15 | endif 16 | 17 | default: 18 | @echo "Make what? Target list:\n" 19 | @make -rpn | grep '^[a-z]\S*:' | sed 's/://' | sort 20 | 21 | $(LINK_CACHE_FILE_SRC_DIR): 22 | mkdir -p $(LINK_CACHE_FILE_SRC_DIR) 23 | 24 | $(LINK_CACHE_FILE_DEST_DIR)/$(LINK_CACHE_FILE): 25 | mkdir -p $(LINK_CACHE_FILE_DEST_DIR) 26 | echo '{}' > $(LINK_CACHE_FILE_DEST_DIR)/$(LINK_CACHE_FILE) 27 | 28 | refcache-restore: $(LINK_CACHE_FILE_DEST_DIR)/$(LINK_CACHE_FILE) $(LINK_CACHE_FILE_SRC_DIR) 29 | cp $(LINK_CACHE_FILE_DEST_DIR)/$(LINK_CACHE_FILE) $(LINK_CACHE_FILE_SRC_DIR)/ 30 | 31 | refcache-save: 32 | cp $(LINK_CACHE_FILE_SRC_DIR)/$(LINK_CACHE_FILE) $(LINK_CACHE_FILE_DEST_DIR)/ 33 | node scripts/unescape-refcache-json.mjs 34 | npx prettier --prose-wrap=always --write $(LINK_CACHE_FILE_DEST_DIR)/$(LINK_CACHE_FILE) 35 | 36 | check-links: $(GET_LINK_CHECKER_IF_NEEDED) \ 37 | refcache-restore check-links-only refcache-save 38 | 39 | check-links-only: 40 | $(HTMLTEST) $(HTMLTEST_ARGS) 41 | 42 | clean: 43 | rm -rf $(HTMLTEST_DIR) public/* resources 44 | 45 | get-link-checker: 46 | rm -Rf $(HTMLTEST_DIR)/bin 47 | curl https://htmltest.wjdp.uk | bash -s -- -b $(HTMLTEST_DIR)/bin 48 | -------------------------------------------------------------------------------- /layouts/_shortcodes/readfile.html: -------------------------------------------------------------------------------- 1 | {{/* Store ordinal, to be retrieved by parent element */}} 2 | {{ if ge hugo.Version "0.93.0" }} 3 | {{ .Page.Store.Add "Ordinal" 1 }} 4 | {{ end }} 5 | 6 | {{/* Handle the "file" named parameter or a single unnamed parameter as the file 7 | path */}} 8 | {{ if .IsNamedParams }} 9 | {{ $.Scratch.Set "fparameter" ( .Get "file" ) }} 10 | {{ else }} 11 | {{ $.Scratch.Set "fparameter" ( .Get 0 ) }} 12 | {{ end }} 13 | 14 | 15 | {{/* If the first character is "/", the path is absolute from the site's 16 | `baseURL`. Otherwise, construct an absolute path using the current directory */}} 17 | 18 | {{ if eq (.Scratch.Get "fparameter" | printf "%.1s") "/" }} 19 | {{ $.Scratch.Set "filepath" ($.Scratch.Get "fparameter") }} 20 | {{ else }} 21 | {{ $.Scratch.Set "filepath" "/" }} 22 | {{ $.Scratch.Add "filepath" $.Page.File.Dir }} 23 | {{ $.Scratch.Add "filepath" ($.Scratch.Get "fparameter") }} 24 | {{ end }} 25 | 26 | 27 | {{/* If the file exists, read it and highlight it if it's code. 28 | Throw a compile error or print an error on the page if the file is not found */}} 29 | 30 | {{ if fileExists ($.Scratch.Get "filepath") }} 31 | {{ if eq (.Get "code") "true" }} 32 | {{- highlight ($.Scratch.Get "filepath" | readFile | htmlUnescape | 33 | safeHTML ) (.Get "lang") "" -}} 34 | {{ else }} 35 | {{- $.Scratch.Get "filepath" | os.ReadFile | .Page.RenderString | safeHTML -}} 36 | {{ end }} 37 | {{ else if eq (.Get "draft") "true" }} 38 | 39 |

    The file {{ $.Scratch.Get "filepath" }} was not found.

    40 | 41 | {{ else }}{{- errorf "Shortcode %q: file %q not found at %s" .Name ($.Scratch.Get "filepath") .Position -}}{{ end }} 42 | -------------------------------------------------------------------------------- /layouts/docs/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | 11 | 12 |
    13 | {{ partial "navbar.html" . }} 14 |
    15 |
    16 |
    17 |
    18 | 21 | 26 |
    27 | {{ partial "version-banner.html" . }} 28 | {{ if not (.Param "ui.breadcrumb_disable") -}} 29 | {{ partial "breadcrumb.html" . -}} 30 | {{ end -}} 31 | {{ block "main" . }}{{ end }} 32 |
    33 |
    34 |
    35 | {{ partial "footer.html" . }} 36 |
    37 | {{ partial "scripts.html" . }} 38 | 39 | -------------------------------------------------------------------------------- /scripts/gen-chroma-styles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | HUGO="npx hugo" 6 | CHROMA_STYLE=tango 7 | DEST_DIR=assets/scss/td/chroma 8 | DEST_FILE=_light.scss 9 | DEST_PATH=/dev/null # Set in process_CLI_args 10 | 11 | function _usage() { 12 | cat <&2 29 | exit $status 30 | } 31 | 32 | function process_CLI_args() { 33 | while getopts ":ho:s:" opt; do 34 | case $opt in 35 | h) 36 | usage 37 | ;; 38 | o) 39 | DEST_FILE="$OPTARG" 40 | ;; 41 | s) 42 | CHROMA_STYLE="$OPTARG" 43 | ;; 44 | \?) 45 | echo "ERROR: unrecognized flag: -$OPTARG" 46 | usage 1; 47 | ;; 48 | esac 49 | done 50 | 51 | shift $((OPTIND-1)) 52 | if [ "$#" -gt 0 ]; then 53 | echo "ERROR: extra argument(s): $*" >&2 54 | usage 1; 55 | fi 56 | 57 | DEST_PATH="$DEST_DIR/$DEST_FILE" 58 | } 59 | 60 | function main() { 61 | process_CLI_args "$@" 62 | 63 | # For more options, see https://gohugo.io/commands/hugo_gen_chromastyles/ 64 | local cmd="$HUGO gen chromastyles --style=$CHROMA_STYLE >> $DEST_PATH" 65 | echo "Generating $DEST_FILE using: $cmd" 66 | 67 | echo "/* Chroma style: $CHROMA_STYLE */" > $DEST_PATH 68 | eval "$cmd" 69 | } 70 | 71 | main "$@" 72 | -------------------------------------------------------------------------------- /layouts/_shortcodes/_param.html: -------------------------------------------------------------------------------- 1 | {{/* 2 | 3 | @param {string} [0] The name of the parameter to look up and embed. 4 | @param {string} [1...] Optional numbered arguments to replace {0}, {1}, {2}, etc. in the parameter value. 5 | {0} corresponds to the parameter name itself. 6 | 7 | This shortcode looks up a parameter by name from site params or page params 8 | and outputs its raw content, so that any HTML is not escaped. Numbered 9 | placeholders like {0}, {1}, {2}, etc. in the parameter value are replaced with 10 | the corresponding numbered arguments. {0} is replaced with the parameter name. 11 | 12 | Usage: 13 | {{% _param paramName %}} 14 | {{% _param paramName arg1 arg2 %}} 15 | 16 | NOTE: This is currently an Docsy-private shortcode. 17 | */ -}} 18 | 19 | {{ $position := .Position -}} 20 | {{ $paramName := .Get 0 | default (.Get "name") -}} 21 | {{ $paramValue := $.Page.Param $paramName | string -}} 22 | {{ if not $paramName -}} 23 | {{ errorf "%s: shortcode '_param': parameter name is missing" $position -}} 24 | {{ else if not $paramValue -}} 25 | {{ errorf "%s: shortcode '_param': parameter %q not found in page or site params" $position $paramName -}} 26 | {{ end -}} 27 | 28 | {{ $result := $paramValue -}} 29 | {{ range $i, $v := .Params -}} 30 | {{ $placeholder := printf "{%d}" $i -}} 31 | {{ $replacement := $v | string -}} 32 | {{ $result = replace $result $placeholder $replacement -}} 33 | {{ end -}} 34 | 35 | {{/* After replacements, check for any unresolved numeric placeholders. */ -}} 36 | {{ $unresolved := findRE `\{(\d+)\}` $result -}} 37 | {{ if gt (len $unresolved) 0 -}} 38 | {{ warnf "%s: shortcode '_param' %q: unresolved placeholder(s) %q in value %q" $position $paramName (delimit $unresolved ", ") $paramValue -}} 39 | {{ end -}} 40 | 41 | {{ $result | safeHTML -}} 42 | -------------------------------------------------------------------------------- /layouts/_shortcodes/conditional-text.html: -------------------------------------------------------------------------------- 1 | 2 | {{- $condition := lower $.Site.Params.buildCondition -}} 3 | 4 | {{- if ne $condition "" -}} 5 | 6 | 8 | {{- $include_if := lower (.Get "include-if") -}} 9 | {{- $exclude_if := lower (.Get "exclude-if") -}} 10 | 11 | {{- if and (in $include_if $condition) (in $exclude_if $condition) -}} 12 | 13 | {{- errorf "Build condition %q appears in both include-if and exclude-if parameters of conditional-txt shortcode on page %s" $condition .Position -}} 14 | {{- end -}} 15 | 16 | {{- if isset $.Params "include-if" -}} 17 | 18 | {{- if in $include_if $condition -}} 19 | 20 | {{- .Inner -}} 21 | {{- else -}} 22 | {{- end -}} 23 | {{- else -}} 24 | 25 | {{- if isset $.Params "exclude-if" -}} 26 | 27 | {{- if in $exclude_if $condition -}} 28 | {{- else -}} 29 | 30 | {{- .Inner -}} 31 | {{- end -}} 32 | {{- end -}} 33 | 34 | {{- end -}} 35 | 36 | {{- end -}} 37 | -------------------------------------------------------------------------------- /scripts/getHugoModules/index.mjs: -------------------------------------------------------------------------------- 1 | // Runs `hugo mod get @` for Docsy module dependencies. 2 | // It gets dependency versions from `package.json`. 3 | 4 | import fs from 'fs'; 5 | import { execSync } from 'child_process'; 6 | 7 | const packageJson = readPackageJson(); 8 | let exitStatus = 0; 9 | 10 | const exit = () => process.exit(exitStatus); 11 | 12 | function getHugoModule(npmPkgNm, hugoModuleRefAtV) { 13 | try { 14 | // Extract module version 15 | const pkgVers = packageJson.dependencies[npmPkgNm]; 16 | if (!pkgVers) { 17 | throw new Error(`${npmPkgNm} not found in dependencies`); 18 | } 19 | if (!/^\d/.test(pkgVers)) { 20 | const msg = `${npmPkgNm} version must be exact (start with a number), not: ${pkgVers}`; 21 | throw new Error(msg); 22 | } 23 | 24 | const command = `npx hugo mod get ${hugoModuleRefAtV}${pkgVers}`; 25 | console.log(`> ${command}`); 26 | const output = execSync(command); 27 | console.log(output.toString()); 28 | } catch (error) { 29 | console.error(`ERROR: ${error.message}\n`); 30 | exitStatus = 1; 31 | } 32 | } 33 | 34 | function readPackageJson() { 35 | try { 36 | const packageJsonData = fs.readFileSync('package.json', 'utf8'); 37 | return JSON.parse(packageJsonData); 38 | } catch (error) { 39 | console.error('FAILED to read package.json:', error.message); 40 | exit(); 41 | } 42 | } 43 | 44 | const packagesToUpdate = [ 45 | // NPM package name, `Hugo module name@` optionally follow by `v` if needed 46 | ['@fortawesome/fontawesome-free', 'github.com/FortAwesome/Font-Awesome@'], 47 | ['bootstrap', 'github.com/twbs/bootstrap@v'], 48 | ]; 49 | 50 | packagesToUpdate.forEach(([npmPkgNm, hugoModuleRefAtV]) => { 51 | getHugoModule(npmPkgNm, hugoModuleRefAtV, packageJson); 52 | }); 53 | 54 | exit(); 55 | 56 | // cSpell:ignore hugo twbs 57 | -------------------------------------------------------------------------------- /layouts/term.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 |
    3 |
    4 |

    {{ with .Data.Singular }}{{ . | humanize }}: {{ end }}{{ .Title }}

    5 |
    6 | {{ .Content }} 7 |
    8 |
    9 | {{ range .Pages }} 10 | {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }} 11 | 27 | {{ end }} 28 |
    29 | {{ humanize ( T "ui_all" ) }} {{ with .Data.Plural }}{{ . | humanize }}{{ end }} 30 |
    31 |
    32 | {{- end }} 33 | -------------------------------------------------------------------------------- /docsy.dev/content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docsy 3 | description: A Hugo theme for creating great technical documentation sites 4 | --- 5 | 6 | {{% blocks/cover title="Welcome to Docsy!" image_anchor="top" height="full" %}} 7 | {{% param description %}} 8 | {.display-6} 9 | 10 | Learn More 11 | Get started 12 | {.p-initial .my-5} 13 | 14 | {{% blocks/link-down color="info" %}} 15 | {{% /blocks/cover %}} 16 | 17 | {{% blocks/lead color="primary" %}} 18 | Docsy is a theme for the Hugo static site generator that's specifically designed 19 | for technical documentation sets. Our aim is to help you get a working 20 | documentation site up and running as easily as possible, so you can concentrate 21 | on creating great content for your users. 22 | 23 | 24 | Deploys by Netlify 25 | 26 | {{% /blocks/lead %}} 27 | 28 | {{% blocks/section color="dark" type="row" %}} 29 | 30 | {{% blocks/feature icon="fa-lightbulb" title="See Docsy in action!" url="/docs/examples/" %}} 31 | As well as our example site, there's a growing number of projects using Docsy for their doc sites. 32 | {{% /blocks/feature %}} 33 | 34 | 35 | {{% blocks/feature icon="fa-brands fa-github" title="Contributions welcome!" url="https://github.com/google/docsy" %}} 36 | We do a [Pull Request](https://github.com/google/docsy/pulls) contributions workflow on **GitHub**. New users are always welcome! 37 | {{% /blocks/feature %}} 38 | 39 | 40 | {{% blocks/feature icon="fa-brands fa-x-twitter" title="Follow us on Twitter!" url="https://twitter.com/docsydocs" %}} 41 | Find out about new features and how our users are using Docsy. 42 | {{% /blocks/feature %}} 43 | 44 | {{% /blocks/section %}} 45 | -------------------------------------------------------------------------------- /layouts/blog/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" -}} 2 | 3 |
    4 |

    {{ .Title }}

    5 | {{ with .Content }}{{ . }}{{ end -}} 6 |
    7 | {{ if (and .Parent .Parent.IsHome) -}} 8 | {{ $.Scratch.Set "blog-pages" (where .Site.RegularPages "Section" .Section) -}} 9 | {{ else -}} 10 | {{$.Scratch.Set "blog-pages" .Pages -}} 11 | {{ end -}} 12 | 13 | {{ if .Pages -}} 14 |
    15 | {{ $pager := .Paginate (( $.Scratch.Get "blog-pages").GroupByDate "2006" ) -}} 16 | {{ range $pager.PageGroups -}} 17 |
    {{ T "post_posts_in" }} {{ .Key }}
    18 |
      19 | {{ range .Pages -}} 20 |
    • 21 |
      22 |
      {{ .Title }}
      23 |

      24 | {{- .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle -}} 25 |

      26 | 32 | {{- partial "featured-image.html" (dict "p" . "w" 250 "h" 125 "class" "float-start me-3 pt-1 d-none d-md-block") -}} 33 |

      {{ .Plain | safeHTML | truncate 250 }}

      34 |

      {{ T "ui_read_more"}}

      35 |
      36 |
    • 37 | {{ end -}} 38 |
    39 | {{ end -}} 40 |
    41 |
    42 | {{ partial "pagination.html" . -}} 43 |
    44 | {{- end -}} 45 | {{ end -}} 46 | -------------------------------------------------------------------------------- /docsy.dev/content/en/blog/2022/hello.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello Docsy! 3 | linkTitle: Hello 4 | date: 2022-04-07 5 | description: Welcome to the Docsy blog! 6 | --- 7 | 8 | ## Hello 9 | 10 | It may seem strange to see a "Hello" post from a project that's several years 11 | old, but as Docsy matures as a community-driven project, we thought it was time 12 | to (re)introduce ourselves and talk about what's new with your favorite (we 13 | hope) Hugo documentation theme! 14 | 15 | ### Discuss amongst yourselves 16 | 17 | Our [Discussions](https://github.com/google/docsy/discussions) are really 18 | hopping lately! Don't miss our notice of the 19 | [upcoming deprecation of the Font-Awesome and Bootstrap git submodules](https://github.com/google/docsy/discussions/950) 20 | or our announcement of our 21 | [new governance model](https://github.com/google/docsy/discussions/798)! 22 | 23 | ### Milestones, releases, and roadmaps 24 | 25 | We are planning our first official release of Docsy soon—check out the 26 | [milestones for 0.2.0](https://github.com/google/docsy/milestone/2). Got a 27 | suggestion for the roadmap? Open an 28 | [issue](https://github.com/google/docsy/issues). 29 | 30 | ### Coming soon: project metrics 31 | 32 | Starting next month, we'll publish project metrics here on this blog. 33 | 34 | ### Introducing the PSC 35 | 36 | Docsy now has a Project Steering Committee! The PSC members are [@chalin][], 37 | [@LisaFC][], [@geriom][], and [@emckean][]. If you're interested in serving on 38 | the PSC, open an [issue](https://github.com/google/docsy/issues) and nominate 39 | yourself! 40 | 41 | ### Contribute to the blog! 42 | 43 | Also coming soon: contribution guidelines. Got an idea for a blog post? Open an 44 | [issue](https://github.com/google/docsy/issues)! 45 | 46 | [@chalin]: https://github.com/chalin 47 | [@LisaFC]: https://github.com/LisaFC 48 | [@geriom]: https://github.com/geriom 49 | [@emckean]: https://github.com/emckean 50 | -------------------------------------------------------------------------------- /layouts/blog/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | 11 | 12 |
    13 | {{ partial "navbar.html" . }} 14 |
    15 |
    16 |
    17 |
    18 | 21 | 26 |
    27 | {{ with .CurrentSection.OutputFormats.Get "rss" -}} 28 | 29 | 30 | 31 | {{ end -}} 32 | {{ if not (.Param "ui.breadcrumb_disable") -}} 33 | {{ partial "breadcrumb.html" . -}} 34 | {{ end -}} 35 | {{ block "main" . }}{{ end }} 36 |
    37 |
    38 |
    39 | {{ partial "footer.html" . }} 40 |
    41 | {{ partial "scripts.html" . }} 42 | 43 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/updating/updating-submodules.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Update Docsy without Hugo Modules" 3 | linkTitle: "Update Docsy without Hugo Modules" 4 | weight: 2 5 | description: > 6 | Update the Docsy theme to the latest version using submodules or `git pull`. 7 | --- 8 | 9 | If you aren't using Hugo Modules, depending on how you chose to install Docsy on your existing site, use one of the following two procedures to update your theme. 10 | 11 | {{% alert title="Tip" %}} 12 | If you intend to update your site, consider [converting your site to Hugo Modules](/docs/updating/convert-site-to-module/). After conversion, it's even simpler to update Docsy! 13 | {{% /alert %}} 14 | 15 | ## Update your Docsy submodule 16 | 17 | If you are using the [Docsy theme as a submodule](/docs/get-started/other-options/#option-1-docsy-as-a-git-submodule) in your project, here's how you update the submodule: 18 | 19 | 1. Navigate to the root of your local project, then run: 20 | 21 | ```bash 22 | git submodule update --remote 23 | ``` 24 | 25 | 1. Add and then commit the change to your project: 26 | 27 | ```bash 28 | git add themes/ 29 | git commit -m "Updating theme submodule" 30 | ``` 31 | 32 | 1. Push the commit to your project repo. For example, run: 33 | 34 | ```bash 35 | git push origin master 36 | ``` 37 | 38 | ## Route 2: Update your Docsy clone 39 | 40 | If you [cloned the Docsy theme](/docs/get-started/other-options/#option-2-clone-the-docsy-theme) into 41 | the `themes` folder in your project, then you use the `git pull` command: 42 | 43 | 1. Navigate to the `themes` directory in your local project: 44 | 45 | ```bash 46 | cd themes 47 | 48 | 1. Ensure that `origin` is set to `https://github.com/google/docsy.git`: 49 | 50 | ```bash 51 | git remote -v 52 | 53 | 54 | 1. Update your local clone: 55 | ```bash 56 | git pull origin master 57 | ``` 58 | 59 | If you have made any local changes to the cloned theme, **you must manually resolve any merge conflicts**. 60 | -------------------------------------------------------------------------------- /scripts/mkdirp-hugo-mod.js: -------------------------------------------------------------------------------- 1 | // Helper script to create empty Hugo-module directories for Docsy dependencies 2 | // listed in `go.mod`. This is necessary for projects not using Hugo modules. For 3 | // details, see 4 | // https://www.docsy.dev/docs/get-started/other-options/#docsy-npm-install-side-effect 5 | 6 | const fs = require('fs'); 7 | const path = require('path'); 8 | 9 | if (process.env.DOCSY_MKDIR_HUGO_MOD_SKIP) { 10 | console.log('DOCSY_MKDIR_HUGO_MOD_SKIP is set. Skipping directory creation.'); 11 | process.exit(0); 12 | } 13 | 14 | const modulePathPrefix = process.argv[2] || '..'; 15 | console.log( 16 | `Creating empty directories under MODULE_PATH_PREFIX: ${modulePathPrefix} 17 | which resolves to: ${path.resolve(modulePathPrefix)}\n`, 18 | ); 19 | 20 | // Extract module paths from `go.mod`, assuming the dependencies appear in the form: 21 | // 22 | // require ( 23 | // github.com/... 24 | // ... 25 | // ) 26 | function extractModulePaths() { 27 | const goModPath = path.join(__dirname, '..', 'go.mod'); 28 | 29 | let directories = []; 30 | try { 31 | const goModContent = fs.readFileSync(goModPath, 'utf8'); 32 | const lines = goModContent.split('\n'); 33 | lines.forEach((line) => { 34 | line = line.trim(); 35 | if (!line.startsWith('github.com')) return; 36 | const modulePath = line.split(' ')[0]; 37 | directories.push(modulePath); 38 | }); 39 | } catch (error) { 40 | console.error(`Error reading go.mod file: ${error.message}`); 41 | process.exit(1); 42 | } 43 | return directories; 44 | } 45 | 46 | function createDirectory(targetPath) { 47 | if (!fs.existsSync(targetPath)) { 48 | console.log(`+ Creating directory ${targetPath}`); 49 | fs.mkdirSync(targetPath, { recursive: true }); 50 | } else { 51 | console.log(`> Directory already exists: ${targetPath}`); 52 | } 53 | } 54 | 55 | const directories = extractModulePaths(); 56 | directories.forEach((dir) => { 57 | const targetPath = path.join(modulePathPrefix, dir); 58 | createDirectory(targetPath); 59 | }); 60 | -------------------------------------------------------------------------------- /i18n/zh-cn.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "上一页" 5 | 6 | [ui_pager_next] 7 | other = "下一页" 8 | 9 | [ui_read_more] 10 | other = "阅读全文" 11 | 12 | [ui_search] 13 | other = "站内搜索……" 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "在" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "全部" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "保留所有权利" 26 | 27 | [footer_privacy_policy] 28 | other = "隐私政策" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "撰文:" 34 | [post_created] 35 | other = "创建" 36 | [post_last_mod] 37 | other = "最后修改" 38 | [post_edit_this] 39 | other = "编辑此页" 40 | [post_view_this] 41 | other = "查看页面源码" 42 | [post_create_child_page] 43 | other = "添加子页面" 44 | [post_create_issue] 45 | other = "提交文档问题" 46 | [post_create_project_issue] 47 | other = "提交项目问题" 48 | [post_posts_in] 49 | other = "撰写于" 50 | [post_reading_time] 51 | other = "分钟阅读" 52 | [post_less_than_a_minute_read] 53 | other = "1分钟内可阅读完" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "这是本节的多页打印视图。" 58 | [print_click_to_print] 59 | other = "点击此处打印" 60 | [print_show_regular] 61 | other = "返回本页常规视图" 62 | [print_entire_section] 63 | other = "整节打印" 64 | 65 | # Community 66 | [community_join] 67 | other = "加入 {{ .Site.Title }} 社区" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} 是一个开源项目,社区中的任何人都可以使用、改善和尽情使用它。我们很期待你能加入我们!下面是如何查看最近更新以及参与我们的一些方式。" 70 | [community_learn] 71 | other = "学习和沟通" 72 | [community_using] 73 | other = "正在或打算使用 {{ .Site.Title }} ?获取更多信息:" 74 | [community_develop] 75 | other = "开发和贡献" 76 | [community_contribute] 77 | other = "如果你想通过为 {{ .Site.Title }} 贡献更多参与,请在此处加入我们:" 78 | [community_how_to] 79 | other = "你可以了解如何为 {{ .Site.Title }} 做出贡献,请参考我们的" 80 | [community_guideline] 81 | other = "贡献指南" 82 | 83 | # Feedback 84 | [feedback_title] 85 | other = "意见反馈" 86 | [feedback_question] 87 | other = "这个页面对您有帮助吗?" 88 | [feedback_positive] 89 | other = "有帮助" 90 | [feedback_negative] 91 | other = "没帮助" 92 | -------------------------------------------------------------------------------- /assets/scss/_variables_forward.scss: -------------------------------------------------------------------------------- 1 | // Forward declarations of variables used by _variables.scss and 2 | // _variables_project.scss. 3 | // 4 | // Docsy theme variables: 5 | // 6 | // Note: since these are Docsy variables, we don't forward (repeat) the 7 | // definitions, we've simply added them here. 8 | 9 | $td-fonts-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 10 | "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", 11 | "Segoe UI Symbol" !default; 12 | 13 | $td-font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, 14 | "Liberation Mono", "Courier New", monospace !default; 15 | 16 | // =================================================== 17 | // DO NOT EDIT non-comment lines beyond this point 18 | // since they are auto-refreshed. 19 | 20 | // Bootstrap SASS variables: 21 | 22 | $white: #fff !default; 23 | $gray-100: #f8f9fa !default; 24 | $gray-200: #e9ecef !default; 25 | $gray-300: #dee2e6 !default; 26 | $gray-400: #ced4da !default; 27 | $gray-500: #adb5bd !default; 28 | $gray-600: #6c757d !default; 29 | $gray-700: #495057 !default; 30 | $gray-800: #343a40 !default; 31 | $gray-900: #212529 !default; 32 | $black: #000 !default; 33 | 34 | $blue: #0d6efd !default; 35 | $indigo: #6610f2 !default; 36 | $purple: #6f42c1 !default; 37 | $pink: #d63384 !default; 38 | $red: #dc3545 !default; 39 | $orange: #fd7e14 !default; 40 | $yellow: #ffc107 !default; 41 | $green: #198754 !default; 42 | $teal: #20c997 !default; 43 | $cyan: #0dcaf0 !default; 44 | 45 | $font-size-base: 1rem !default; // Assumes the browser default, typically `16px` 46 | $font-weight-normal: 400 !default; 47 | $font-weight-bold: 700 !default; 48 | 49 | $spacer: 1rem !default; 50 | 51 | $primary: $blue !default; 52 | $secondary: $gray-600 !default; 53 | $success: $green !default; 54 | $info: $cyan !default; 55 | $warning: $yellow !default; 56 | $danger: $red !default; 57 | $light: $gray-100 !default; 58 | $dark: $gray-900 !default; 59 | -------------------------------------------------------------------------------- /assets/scss/td/_color-adjustments-dark.scss: -------------------------------------------------------------------------------- 1 | // ============================================================================= 2 | // Color adjustments for dark mode, mainly to improve color contrast. 3 | // 4 | // Note that other style files might also include dark-mode adjustments, search 5 | // for [data-bs-theme='dark']. 6 | // 7 | // Status: EXPERIMENTAL 8 | // Usage: @import 'td/color-adjustments-dark'; // in client _styles_project.scss 9 | // ============================================================================= 10 | 11 | @if $enable-dark-mode { 12 | // The following value makes sense for the Bootstrap base theme. Projects will 13 | // likely need to adjust this. 14 | $lighten-amount-for-dark-color-variant: 22% !default; 15 | 16 | $primary-dark: lighten( 17 | $primary, 18 | $lighten-amount-for-dark-color-variant 19 | ) !default; 20 | // $secondary-dark: lighten($secondary, $lighten-amount-for-dark-color-variant) !default; 21 | // $success-dark: lighten($success, $lighten-amount-for-dark-color-variant) !default; 22 | // $info-dark: lighten($info, $lighten-amount-for-dark-color-variant) !default; 23 | // $warning-dark: lighten($warning, $lighten-amount-for-dark-color-variant) !default; 24 | // $danger-dark: lighten($danger, $lighten-amount-for-dark-color-variant) !default; 25 | 26 | [data-bs-theme='dark'] { 27 | --bs-primary: #{$primary-dark} !important; 28 | // --bs-success: #{$success-dark} !important; 29 | } 30 | 31 | // --------------------------------------------------------------------------- 32 | // Tips 'n tricks 33 | // --------------------------------------------------------------------------- 34 | 35 | // If you need to adjust properties of a deeply nested class in dark mode, you 36 | // can use the following syntax: 37 | 38 | // .td-some-class { 39 | // .td-deeply-nested-class { 40 | // @at-root [data-bs-theme="dark"] #{&} { 41 | // // ... 42 | // } 43 | // } 44 | // } 45 | 46 | // Want to see the var value? Try: 47 | // @warn "primary-dark: #{$primary-dark}"; 48 | } 49 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/get-started/docsy-as-module/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Use Docsy as a Hugo Module" 3 | linkTitle: "Use Docsy as a Hugo Module" 4 | weight: 1 5 | date: 2021-12-08T10:33:16+01:00 6 | description: > 7 | Learn how to get started with Docsy by using the theme as a Hugo Module. 8 | --- 9 | 10 | [Hugo modules](https://gohugo.io/hugo-modules/) are the simplest and latest way to use Hugo themes like Docsy when building a website. Hugo uses the modules mechanism to pull in the theme files from the main Docsy repo at your chosen revision, and it’s easy to keep the theme up to date in your site. Our example site uses Docsy as a Hugo module. 11 | 12 | To find out about other setup approaches, see our [Get started](/docs/get-started/) overview. If you want to migrate an existing Docsy site to use Hugo Modules, see our [migration guide](/docs/updating/convert-site-to-module/). 13 | 14 | ## Setup options with Hugo Modules 15 | 16 | To use Docsy as a Hugo Module, you have a couple of options: 17 | 18 | * **Copy and edit the source for the [Docsy example site](https://github.com/google/docsy-example).** This approach gives you a skeleton structure for your site, with top-level and documentation sections and templates that you can modify as necessary. The example site uses Docsy as a Hugo Module. 19 | * **Build your own site using the Docsy theme.** Specify the [Docsy theme](https://github.com/google/docsy) like any other [Hugo theme](https://gohugo.io/themes/) when creating or updating your site. With this option, you'll get Docsy look and feel, navigation, and other features, but you'll need to specify your own site structure. 20 | 21 | If you're a beginner, we recommend that you get started by copying our example site. If you're already familiar with Hugo or want a very different site structure, you can follow our guide to start a site from scratch, which gives you maximum flexibility at the cost of higher implementation effort. In both cases you need to follow our prerequisites guide to make sure that you have installed Hugo and all necessary dependencies. 22 | -------------------------------------------------------------------------------- /i18n/zh-tw.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "上一頁" 5 | 6 | [ui_pager_next] 7 | other = "下一頁" 8 | 9 | [ui_read_more] 10 | other = "閱讀全文" 11 | 12 | [ui_search] 13 | other = "站內搜尋…" 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "於" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "所有" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "保留所有權利" 26 | 27 | [footer_privacy_policy] 28 | other = "隱私政策" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "作者:" 34 | [post_created] 35 | other = "建立" 36 | [post_last_mod] 37 | other = "最後更新於" 38 | [post_edit_this] 39 | other = "編輯此頁" 40 | [post_view_this] 41 | other = "檢視頁面原始碼" 42 | [post_create_child_page] 43 | other = "建立子頁面" 44 | [post_create_issue] 45 | other = "建立文件議題" 46 | [post_create_project_issue] 47 | other = "建立專案議題" 48 | [post_posts_in] 49 | other = "張貼於" 50 | [post_reading_time] 51 | other = " 分鐘閱讀時間" 52 | [post_less_than_a_minute_read] 53 | other = "1 分鐘內可讀完" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "這是本節的多頁可列印檢視。" 58 | [print_click_to_print] 59 | other = "點選此處列印" 60 | [print_show_regular] 61 | other = "返回此頁面的標準檢視" 62 | [print_entire_section] 63 | other = "列印整個章節" 64 | 65 | # Community 66 | [community_join] 67 | other = "加入 {{ .Site.Title }} 社群" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} 是一個開放原始碼專案,社群中的任何人都可以使用、改進並享受其成果。我們非常歡迎您加入我們!以下是了解最新動態以及參與我們的一些方式。" 70 | [community_learn] 71 | other = "學習與交流" 72 | [community_using] 73 | other = "正在或打算使用 {{ .Site.Title }} 嗎?在此取得更多資訊:" 74 | [community_develop] 75 | other = "開發和貢獻" 76 | [community_contribute] 77 | other = "如果您想透過貢獻來更深入地參與 {{ .Site.Title }},請在此處加入我們:" 78 | [community_how_to] 79 | other = "您可以透過文件了解如何為 {{ .Site.Title }} 做出貢獻,請參考我們的" 80 | [community_guideline] 81 | other = "貢獻指南" 82 | 83 | # Feedback 84 | [feedback_title] 85 | other = "意見回饋" 86 | [feedback_question] 87 | other = "這個頁面對您有幫助嗎?" 88 | [feedback_positive] 89 | other = "有幫助" 90 | [feedback_negative] 91 | other = "沒幫助" 92 | -------------------------------------------------------------------------------- /i18n/ko.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "이전" 7 | 8 | [ui_pager_next] 9 | other = "다음" 10 | 11 | [ui_read_more] 12 | other = "더 읽기" 13 | 14 | [ui_search] 15 | other = "사이트에서 검색…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "in" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "All Rights Reserved" 24 | 25 | [footer_privacy_policy] 26 | other = "개인정보 보호 정책" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "By" 32 | [post_created] 33 | other = "작성" 34 | [post_last_mod] 35 | other = "최종 수정" 36 | [post_edit_this] 37 | other = "페이지 편집" 38 | [post_create_child_page] 39 | other = "하부 페이지 생성" 40 | [post_create_issue] 41 | other = "문서에 이슈 생성" 42 | [post_create_project_issue] 43 | other = "프로젝트에 이슈 생성" 44 | [post_posts_in] 45 | other = "Posts in" 46 | [post_reading_time] 47 | other = "minute read" 48 | [post_less_than_a_minute_read] 49 | other = "less than a minute" 50 | 51 | # Print support 52 | [print_printable_section] 53 | other = "이 섹션의 다중 페이지 출력 화면임." 54 | [print_click_to_print] 55 | other = "여기를 클릭하여 프린트" 56 | [print_show_regular] 57 | other = "이 페이지의 일반 화면으로 돌아가기" 58 | [print_entire_section] 59 | other = "전체 섹션 프린트" 60 | 61 | # Community 62 | [community_join] 63 | other = "Join the {{ .Site.Title }} community" 64 | [community_introduce] 65 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 66 | [community_learn] 67 | other = "Learn and Connect" 68 | [community_using] 69 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 70 | [community_develop] 71 | other = "Develop and Contribute" 72 | [community_contribute] 73 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 74 | [community_how_to] 75 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 76 | [community_guideline] 77 | other = "Contribution Guidelines" 78 | -------------------------------------------------------------------------------- /docsy.dev/content/en/docs/get-started/known_issues.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Known issues" 3 | linkTitle: "Known issues" 4 | date: 2021-12-08T09:22:27+01:00 5 | weight: 4 6 | description: > 7 | Known issues when installing Docsy theme. 8 | --- 9 | 10 | The following issues are know on [MacOS](#macos) and on [Windows Subsystem for Linux](#windows-subsystem-for-linux-wsl): 11 | 12 | ### MacOS 13 | 14 | #### Errors: `too many open files` or `fatal error: pipe failed` 15 | 16 | By default, MacOS permits a small number of open File Descriptors. For larger sites, or when you're simultaneously running multiple applications, 17 | you might receive one of the following errors when you run [`hugo server`](https://gohugo.io/commands/hugo_server/) to preview your site locally: 18 | 19 | * POSTCSS v7 and earlier: 20 | 21 | ``` 22 | ERROR 2020/04/14 12:37:16 Error: listen tcp 127.0.0.1:1313: socket: too many open files 23 | ``` 24 | * POSTCSS v8 and later: 25 | 26 | ``` 27 | fatal error: pipe failed 28 | ``` 29 | 30 | ##### Workaround 31 | 32 | To temporarily allow more open files: 33 | 34 | 1. View your current settings by running: 35 | 36 | ``` 37 | sudo launchctl limit maxfiles 38 | ``` 39 | 40 | 2. Increase the limit to `65535` files by running the following commands. If your site has fewer files, you can set choose to set lower soft (`65535`) and 41 | hard (`200000`) limits. 42 | 43 | ```shell 44 | sudo launchctl limit maxfiles 65535 200000 45 | ulimit -n 65535 46 | sudo sysctl -w kern.maxfiles=200000 47 | sudo sysctl -w kern.maxfilesperproc=65535 48 | ``` 49 | 50 | Note that you might need to set these limits for each new shell. 51 | [Learn more about these limits and how to make them permanent](https://www.google.com/search?q=mac+os+launchctl+limit+maxfiles+site%3Aapple.stackexchange.com&oq=mac+os+launchctl+limit+maxfiles+site%3Aapple.stackexchange.com). 52 | 53 | ### Windows Subsystem for Linux (WSL) 54 | 55 | If you're using WSL, ensure that you're running `hugo` on a Linux mount of the filesystem, rather than a Windows one, otherwise you may get unexpected errors. 56 | -------------------------------------------------------------------------------- /scripts/scrollspy-patch/extract-method.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # Extracts the _initializeTargetsAndObservables method from Bootstrap ScrollSpy 4 | # source and saves it to the cache directory. 5 | # 6 | # cSpell:ignore scrollspy 7 | 8 | use strict; 9 | use warnings; 10 | use File::Basename qw(dirname); 11 | use File::Path qw(make_path); 12 | use Cwd qw(abs_path); 13 | 14 | my $SCRIPT_DIR = dirname(abs_path($0)); 15 | my $PROJECT_ROOT = dirname(dirname($SCRIPT_DIR)); 16 | 17 | my $BOOTSTRAP_SOURCE = "$PROJECT_ROOT/node_modules/bootstrap/js/src/scrollspy.js"; 18 | my $CACHED_METHOD_FILE = "$PROJECT_ROOT/assets/_cache/bootstrap/scrollspy-method.js"; 19 | 20 | # Check if Bootstrap source exists 21 | unless (-f $BOOTSTRAP_SOURCE) { 22 | print STDERR "ERROR: Bootstrap source not found: $BOOTSTRAP_SOURCE\n"; 23 | print STDERR " Make sure Bootstrap is installed: npm install\n"; 24 | exit 1; 25 | } 26 | 27 | # Create cache directory 28 | make_path(dirname($CACHED_METHOD_FILE)); 29 | 30 | # Extract method 31 | my $in_method = 0; 32 | my $method_indent = 0; 33 | my $method_content = ''; 34 | 35 | open my $fh, '<', $BOOTSTRAP_SOURCE or die "Cannot read $BOOTSTRAP_SOURCE: $!"; 36 | 37 | while (my $line = <$fh>) { 38 | if ($line =~ /^(\s*)_initializeTargetsAndObservables\(\)/) { 39 | $in_method = 1; 40 | $method_indent = length($1); 41 | $method_content = $line; 42 | } elsif ($in_method) { 43 | $method_content .= $line; 44 | # Check if this line has a closing brace at the method indentation level 45 | if ($line =~ /^(\s*)\}/ && length($1) == $method_indent) { 46 | last; 47 | } 48 | } 49 | } 50 | 51 | close $fh; 52 | 53 | unless ($method_content) { 54 | print STDERR "ERROR: Failed to extract method from Bootstrap source\n"; 55 | exit 1; 56 | } 57 | 58 | # Write cached method 59 | open my $out_fh, '>', $CACHED_METHOD_FILE or die "Cannot write $CACHED_METHOD_FILE: $!"; 60 | print $out_fh $method_content; 61 | close $out_fh; 62 | 63 | print "✅ Extracted _initializeTargetsAndObservables() method\n"; 64 | print " Saved to: $CACHED_METHOD_FILE\n"; 65 | -------------------------------------------------------------------------------- /.github/workflows/smoke.yaml: -------------------------------------------------------------------------------- 1 | # Smoke test across OSs: build a Docsy-based site from scratch, 2 | # using Docsy as hugo module and fetching Docsy via NPM. 3 | # cSpell:ignore docsy github 4 | 5 | name: smoke 6 | 7 | on: 8 | push: 9 | branches: [main] 10 | pull_request: 11 | # schedule: # midnight every day 12 | # - cron: '0 0 * * *' 13 | workflow_dispatch: 14 | 15 | jobs: 16 | new-site: 17 | runs-on: ${{ matrix.os }} 18 | strategy: 19 | fail-fast: false 20 | matrix: 21 | os: [windows-latest, ubuntu-latest] 22 | docsy-src: [NPM, HUGO_MODULE] 23 | env: 24 | BASE_REPO: ${{ github.repository }} 25 | BRANCH: ${{ github.head_ref }} 26 | PR_REPO: ${{ github.event.pull_request.head.repo.full_name }} 27 | SHA: ${{ github.sha }} 28 | # TODO: drop PR testing under Windows because it's too slow? 29 | # if: github.event_name != 'pull_request' && matrix.os != 'windows-latest' 30 | if: github.event_name != 'push' || github.repository == 'google/docsy' 31 | steps: 32 | - uses: actions/checkout@v4 33 | 34 | - uses: actions/setup-node@v4 35 | with: 36 | node-version-file: .nvmrc 37 | cache: npm 38 | cache-dependency-path: package.json 39 | 40 | - name: Setup workspace 41 | run: | 42 | npm install 43 | mkdir -p tmp && cd tmp && npm init -y 44 | shell: bash 45 | 46 | - name: Make site (non-PR) 47 | if: github.event_name != 'pull_request' 48 | working-directory: tmp 49 | run: ../scripts/make-site.sh -s ${{ matrix.docsy-src }} -r $BASE_REPO -v $SHA 50 | shell: bash 51 | 52 | - name: Make site from PR 53 | if: github.event_name == 'pull_request' 54 | working-directory: tmp 55 | run: ../scripts/make-site.sh -s ${{ matrix.docsy-src }} -r $PR_REPO -v $BRANCH 56 | shell: bash 57 | 58 | - uses: actions/upload-artifact@v4 59 | with: 60 | name: tmp-site-${{ matrix.os }}-${{ matrix.docsy-src }} 61 | path: | 62 | tmp 63 | !**/node_modules 64 | !**/resources 65 | -------------------------------------------------------------------------------- /layouts/_partials/section-index.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ $page := .Page -}} 3 | {{ $pages := (where .Site.Pages "Section" .Section).ByWeight -}} 4 | {{ $pages = (where $pages "Type" "!=" "search") }} 5 | {{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}} 6 | {{ $pages = (where $pages ".Parent" "!=" nil) -}} 7 | {{ $pages = (where $pages ".Parent.File" "!=" nil) -}} 8 | {{ if $page.File -}} 9 | {{ $pages = (where $pages "Parent.File.UniqueID" "==" $page.File.UniqueID) -}} 10 | {{ end -}} 11 | {{ if or $page.Params.no_list (eq (len $pages) 0) -}} 12 | {{/* If no_list is true or we don't have subpages we don't show a list of subpages */}} 13 | {{ else if $page.Params.simple_list -}} 14 | {{/* If simple_list is true we show a bulleted list of subpages */}} 15 |
      16 | {{ range $pages -}} 17 | {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) }} 18 |
    • {{- .Title -}}
    • 19 | {{ end -}} 20 |
    21 | {{ else -}} 22 | {{/* Otherwise we show a nice formatted list of subpages with page descriptions */}} 23 |
    24 | {{ range $pages -}} 25 | {{ $manualLink := cond (isset .Params "manuallink") .Params.manualLink ( cond (isset .Params "manuallinkrelref") (relref . .Params.manualLinkRelref) .RelPermalink) -}} 26 |
    27 |
    28 | {{- .Title -}} 29 |
    30 |

    {{ .Description | markdownify -}}

    31 |
    32 | {{ end -}} 33 | {{ end -}} 34 |
    35 | -------------------------------------------------------------------------------- /layouts/_partials/print/render.html: -------------------------------------------------------------------------------- 1 | {{ define "recurse-toc" }} 2 | {{ $s := .section }} 3 | {{ $psid := .psid }} 4 | {{ $pages := (union $s.Pages $s.Sections).ByWeight }} 5 | {{ $subSection := 1 }} 6 | 7 | {{ range where $pages ".Params.no_print" "!=" true }} 8 | {{ $sid := printf "%s%d" $psid $subSection }} 9 | {{ $subSection = add $subSection 1 }} 10 | {{ partial "print/toc-li.html" (dict "sid" $sid "Page" .) }} 11 | {{ if .IsSection }} 12 |
      13 | {{ template "recurse-toc" (dict "section" . "psid" (printf "%s." $sid)) }} 14 |
    15 | {{ end }} 16 | {{ end }} 17 | {{ end }} 18 | 19 | {{ define "recurse-content" }} 20 | {{ $s := .section }} 21 | {{ $psid := .psid }} 22 | {{ $pages := (union $s.Pages $s.Sections).ByWeight }} 23 | {{ $subSection := 1 }} 24 | 25 | {{ $breakOnWordCount := default 50 ($s.Site.Param "print.section_break_wordcount") }} 26 | {{ $doPageBreak := gt (countwords $s.Content) $breakOnWordCount }} 27 | 28 | {{ range where $pages ".Params.no_print" "!=" true }} 29 | {{ $sid := printf "%s%d" $psid $subSection }} 30 | {{ $subSection = add $subSection 1 }} 31 | {{ $params := dict "Page" . "PageNum" $sid "DoPageBreak" $doPageBreak }} 32 | {{ partial "print/content.html" $params }} 33 | 34 | {{ if .IsSection }} 35 | {{ template "recurse-content" (dict "section" . "psid" (printf "%s." $sid) ) }} 36 | {{ end }} 37 | {{ $doPageBreak = true }} 38 | {{ end }} 39 | {{ end }} 40 | 41 |
    42 |
    43 |

    44 | {{ T "print_printable_section" }} 45 | {{ T "print_click_to_print" }}. 46 |

    47 | {{ T "print_show_regular" }}. 48 |

    49 |
    50 | {{ partial "print/page-heading.html" . }} 51 | 52 | {{ if not (.Param "print.disable_toc") }} 53 |
      54 | {{ template "recurse-toc" (dict "section" .CurrentSection "psid" "") }} 55 |
    56 | {{ end }} 57 | 58 |
    59 | {{ .Content }} 60 |
    61 |
    62 | 63 | {{ template "recurse-content" (dict "section" .CurrentSection "psid" "") }} 64 | -------------------------------------------------------------------------------- /hugo.yaml: -------------------------------------------------------------------------------- 1 | # Docsy config 2 | # 3 | # cSpell:ignore docsy fortawesome fontawesome github permalinkable twbs webfonts 4 | 5 | params: 6 | time_format_blog: Monday, January 02, 2006 7 | time_format_default: January 2, 2006 8 | rss_sections: [blog] 9 | 10 | outputFormats: 11 | PRINT: 12 | baseName: index 13 | isHTML: true 14 | mediaType: text/html 15 | path: _print 16 | permalinkable: false 17 | 18 | module: 19 | hugoVersion: 20 | extended: true 21 | min: 0.146.0 22 | mounts: 23 | - source: assets 24 | target: assets 25 | - source: node_modules/bootstrap 26 | target: assets/vendor/bootstrap 27 | - source: node_modules/@fortawesome/fontawesome-free 28 | target: assets/vendor/Font-Awesome 29 | - source: i18n 30 | target: i18n 31 | - source: layouts 32 | target: layouts 33 | - source: static 34 | target: static 35 | - source: node_modules/@fortawesome/fontawesome-free/webfonts 36 | target: static/webfonts 37 | # Mounts for projects using Docsy as an NPM package. The source path prefix 38 | # "../.." moves out of themes/docsy so that Docsy can find its dependencies. 39 | - source: ../../node_modules/bootstrap 40 | target: assets/vendor/bootstrap 41 | - source: ../../node_modules/@fortawesome/fontawesome-free 42 | target: assets/vendor/Font-Awesome 43 | - source: ../../node_modules/@fortawesome/fontawesome-free/webfonts 44 | target: static/webfonts 45 | # Mounts for module installations, 46 | # needed to work around a known bug in Go’s module management. 47 | - source: assets/_vendor/bootstrap/scss 48 | target: assets/vendor/bootstrap/scss/vendor 49 | imports: 50 | - path: github.com/twbs/bootstrap 51 | disable: false 52 | mounts: 53 | - source: scss 54 | target: assets/vendor/bootstrap/scss 55 | - source: dist/js 56 | target: assets/vendor/bootstrap/dist/js 57 | - path: github.com/FortAwesome/Font-Awesome 58 | disable: false 59 | mounts: 60 | - source: scss 61 | target: assets/vendor/Font-Awesome/scss 62 | - source: webfonts 63 | target: static/webfonts 64 | -------------------------------------------------------------------------------- /assets/scss/_code.scss: -------------------------------------------------------------------------------- 1 | // Code formatting. 2 | 3 | @include color-mode(dark, true) { 4 | --td-pre-bg: #{adjust-color($gray-900, $lightness: -2.5%)}; 5 | } 6 | 7 | .td-content { 8 | // Highlighted code. 9 | .highlight { 10 | margin: 2rem 0; 11 | padding: 0; 12 | position: relative; 13 | 14 | .click-to-copy { 15 | display: block; 16 | text-align: right; 17 | } 18 | 19 | pre { 20 | margin: 0; 21 | padding: 1rem; 22 | border-radius: inherit; 23 | 24 | // Default click-to-copy button 25 | 26 | button.td-click-to-copy { 27 | position: absolute; 28 | color: var(--bs-tertiary-color); 29 | border-width: 0; 30 | background-color: transparent; 31 | background-image: none; 32 | --bs-btn-box-shadow: 0; 33 | padding: var(--bs-btn-padding-y) calc(var(--bs-btn-padding-x) / 2); 34 | right: 4px; 35 | top: 2px; 36 | 37 | &:hover { 38 | color: var(--bs-secondary-color); 39 | background-color: var(--bs-dark-bg-subtle); 40 | } 41 | &:active { 42 | color: var(--bs-secondary-color); 43 | background-color: var(--bs-dark-bg-subtle); 44 | transform: translateY(2px); 45 | } 46 | } 47 | } 48 | } 49 | 50 | // Inline code 51 | p code, 52 | li > code, 53 | table code { 54 | color: inherit; 55 | padding: 0.2em 0.4em; 56 | margin: 0; 57 | font-size: 85%; 58 | word-break: normal; 59 | background-color: var(--td-pre-bg); 60 | border-radius: $border-radius; 61 | 62 | br { 63 | display: none; 64 | } 65 | } 66 | 67 | // Code blocks 68 | pre { 69 | word-wrap: normal; 70 | background-color: var(--td-pre-bg); 71 | border: solid var(--bs-border-color); 72 | border-width: 1px; 73 | padding: $spacer; 74 | 75 | > code { 76 | background-color: inherit !important; 77 | padding: 0; 78 | margin: 0; 79 | font-size: 100%; 80 | word-break: normal; 81 | white-space: pre; 82 | border: 0; 83 | } 84 | } 85 | 86 | pre.mermaid { 87 | background-color: inherit; 88 | font-size: 0; 89 | padding: 0; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /layouts/_partials/feedback.html: -------------------------------------------------------------------------------- 1 | {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable)) -}} 2 | {{ with .Site.Params.ui.feedback -}} 3 | 18 |
    19 | 20 | 21 | 22 | 23 | 26 | 29 |
    30 | 59 | {{ end -}} 60 |
    61 | {{ end -}} 62 | -------------------------------------------------------------------------------- /i18n/it.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Precedente" 7 | 8 | [ui_pager_next] 9 | other = "Successivo" 10 | 11 | [ui_read_more] 12 | other = "Leggi tutto" 13 | 14 | [ui_search] 15 | other = "Cerca nel sito…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "in" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "Tutti i diritti riservati" 24 | 25 | [footer_privacy_policy] 26 | other = "Privacy Policy" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "Di" 32 | [post_created] 33 | other = "Creato" 34 | [post_last_mod] 35 | other = "Ultima modifica" 36 | [post_edit_this] 37 | other = "Modifica" 38 | [post_create_child_page] 39 | other = "Create child page" 40 | [post_create_issue] 41 | other = "Crea issue di documentazione" 42 | [post_create_project_issue] 43 | other = "Crea issue di progetto" 44 | [post_posts_in] 45 | other = "Post in" 46 | [post_reading_time] 47 | other = "minute read" 48 | [post_less_than_a_minute_read] 49 | other = "less than a minute" 50 | 51 | # Print support 52 | [print_printable_section] 53 | other = "This is the multi-page printable view of this section." 54 | [print_click_to_print] 55 | other = "Click here to print" 56 | [print_show_regular] 57 | other = "Return to the regular view of this page" 58 | [print_entire_section] 59 | other = "Print entire section" 60 | 61 | # Community 62 | [community_join] 63 | other = "Join the {{ .Site.Title }} community" 64 | [community_introduce] 65 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 66 | [community_learn] 67 | other = "Learn and Connect" 68 | [community_using] 69 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 70 | [community_develop] 71 | other = "Develop and Contribute" 72 | [community_contribute] 73 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 74 | [community_how_to] 75 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 76 | [community_guideline] 77 | other = "Contribution Guidelines" 78 | -------------------------------------------------------------------------------- /i18n/pl.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Wstecz" 7 | 8 | [ui_pager_next] 9 | other = "Dalej" 10 | 11 | [ui_read_more] 12 | other = "Zobacz więcej" 13 | 14 | [ui_search] 15 | other = "Szukaj na stronie ..." 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "w" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "Wszelkie prawa zastrzeżone" 24 | 25 | [footer_privacy_policy] 26 | other = "Polityki prywatności" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "Przez" 32 | [post_created] 33 | other = "Utworzono" 34 | [post_last_mod] 35 | other = "Ostatnia modyfikacja" 36 | [post_edit_this] 37 | other = "Edytuj tę stronę" 38 | [post_create_child_page] 39 | other = "Utwórz podstronę" 40 | [post_create_issue] 41 | other = "Zgłoś błąd w dokumencie" 42 | [post_create_project_issue] 43 | other = "Zgłoś błąd na stronie" 44 | [post_posts_in] 45 | other = "Posty" 46 | [post_reading_time] 47 | other = "min." 48 | [post_less_than_a_minute_read] 49 | other = "mniej niż minutę" 50 | 51 | 52 | # Print support 53 | [print_printable_section] 54 | other = "To wielostronicowy widok tej sekcji do wydrukowania." 55 | [print_click_to_print] 56 | other = "Kliknij aby wydrukować" 57 | [print_show_regular] 58 | other = "Wróć do zwykłego widoku tej strony" 59 | [print_entire_section] 60 | other = "Wydrukuj całą sekcję" 61 | 62 | # Community 63 | [community_join] 64 | other = "Join the {{ .Site.Title }} community" 65 | [community_introduce] 66 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 67 | [community_learn] 68 | other = "Learn and Connect" 69 | [community_using] 70 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 71 | [community_develop] 72 | other = "Develop and Contribute" 73 | [community_contribute] 74 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 75 | [community_how_to] 76 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 77 | [community_guideline] 78 | other = "Contribution Guidelines" 79 | -------------------------------------------------------------------------------- /i18n/no.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Forrige" 7 | 8 | [ui_pager_next] 9 | other = "Neste" 10 | 11 | [ui_read_more] 12 | other = "Les mer" 13 | 14 | [ui_search] 15 | other = "Søk på nettstedet…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "i" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "Alle rettigheter er reservert" 24 | 25 | [footer_privacy_policy] 26 | other = "Personvernpolicy" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "Av" 32 | [post_created] 33 | other = "Opprettet" 34 | [post_last_mod] 35 | other = "Sist endret" 36 | [post_edit_this] 37 | other = "Endre denne siden" 38 | [post_create_child_page] 39 | other = "Lag underside" 40 | [post_create_issue] 41 | other = "Opprett dokumentasjon sak" 42 | [post_create_project_issue] 43 | other = "Opprett prosjekt sak" 44 | [post_posts_in] 45 | other = "Poster til" 46 | [post_reading_time] 47 | other = "minute read" 48 | [post_less_than_a_minute_read] 49 | other = "less than a minute" 50 | [post_view_this] 51 | other = "Vis kildekoden" 52 | 53 | # Print support 54 | [print_printable_section] 55 | other = "Dette er flersidevisningen av denne seksjonen." 56 | [print_click_to_print] 57 | other = "Klikk her for å skrive ut" 58 | [print_show_regular] 59 | other = "Gå tilbake til vanlig sidevisning" 60 | [print_entire_section] 61 | other = "Skriv ut hele seksjonen" 62 | 63 | # Community 64 | [community_join] 65 | other = "Bli med i {{ .Site.Title }} fellesskapet" 66 | [community_introduce] 67 | other = "{{ .Site.Title }} er et åpen kildekodeprosjekt som alle kan bruke, forbedre og glede seg over. Bli med - her er noen måter du kan holde deg oppdatert på og bidra." 68 | [community_learn] 69 | other = "Lær og få kontakt" 70 | [community_using] 71 | other = "Bruker du, eller har du lyst til å bruke {{ .Site.Title }}? Lær mer her:" 72 | [community_develop] 73 | other = "Bidra og videreutvikle" 74 | [community_contribute] 75 | other = "Dersom du vil involvere deg mer ved å bidra til {{ .Site.Title }}, bli med oss her:" 76 | [community_how_to] 77 | other = "Du kan finne ut hvordan du bidrar til {{ .Site.Title }} i vår" 78 | [community_guideline] 79 | other = "Retningslinjer for bidrag" 80 | -------------------------------------------------------------------------------- /i18n/et.toml: -------------------------------------------------------------------------------- 1 | 2 | # Translation into Estonian 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Eelmine" 7 | 8 | [ui_pager_next] 9 | other = "Järgmine" 10 | 11 | [ui_read_more] 12 | other = "Loe lähemalt" 13 | 14 | [ui_search] 15 | other = "Otsi lehelt…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "kohas" # not perfect. In Estonian this idea is represented by a suffix, not a separate word. 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "Kõik õigused kaitstud" 24 | 25 | [footer_privacy_policy] 26 | other = "Privaatsuspoliitika" 27 | 28 | # Post (blog, articles etc.) 29 | [post_byline_by] 30 | other = "järgi" # not perfect. In Estonian this idea is represented by a suffix, not a separate word. 31 | [post_created] 32 | other = "Loodud" 33 | [post_last_mod] 34 | other = "Viimati muudetud" 35 | [post_edit_this] 36 | other = "Täienda lehte" 37 | [post_create_child_page] 38 | other = "Loo alamleht" 39 | [post_create_issue] 40 | other = "Tõstata dokumentatsiooni kohta ülesanne" # perhaps there is a better translation for "issue"... 41 | [post_create_project_issue] 42 | other = "Tõstata projekti kohta ülesanne" 43 | [post_posts_in] 44 | other = "Postitused" # in Estonian this "in" should be the suffix of the next word, cannot include it to that phrase. 45 | [post_reading_time] 46 | other = "minute read" 47 | [post_less_than_a_minute_read] 48 | other = "less than a minute" 49 | 50 | # Community 51 | [community_join] 52 | other = "Join the {{ .Site.Title }} community" 53 | [community_introduce] 54 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 55 | [community_learn] 56 | other = "Learn and Connect" 57 | [community_using] 58 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 59 | [community_develop] 60 | other = "Develop and Contribute" 61 | [community_contribute] 62 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 63 | [community_how_to] 64 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 65 | [community_guideline] 66 | other = "Contribution Guidelines" 67 | -------------------------------------------------------------------------------- /layouts/_partials/scripts/katex.html: -------------------------------------------------------------------------------- 1 | {{/* cSpell:ignore katex */ -}} 2 | {{/* stylesheet */ -}} 3 | 4 | {{ $version := .Site.Params.katex.version | default "latest" -}} 5 | {{ $cssFile := cond hugo.IsProduction "katex.min.css" "katex.css" -}} 6 | {{ $cssUrl := printf "https://unpkg.com/katex@%s/dist/%s" $version $cssFile -}} 7 | {{ with try (resources.GetRemote $cssUrl) -}} 8 | {{ with .Err -}} 9 | {{ errorf "Could not retrieve KaTeX css file from CDN. Reason: %s." . -}} 10 | {{ else with .Value -}} 11 | {{ with resources.Copy (printf "css/%s" $cssFile) . -}} 12 | {{ $cssHash := . | fingerprint "sha512" -}} 13 | {{/**/ -}} 16 | {{ end -}} 17 | {{ else -}} 18 | {{ errorf "Could not retrieve css file %q from CDN. Reason: invalid KaTeX version %q." $cssUrl $version -}} 19 | {{ end -}} 20 | {{ end -}} 21 | 22 | {{/* font files */ -}} 23 | 24 | {{ $fontFiles := slice -}} 25 | {{ $data := dict -}} 26 | {{ $url := ( printf "https://unpkg.com/katex@%s/dist/fonts?meta" $version ) -}} 27 | {{ with try (resources.GetRemote $url) -}} 28 | {{ with .Err -}} 29 | {{ errorf "%s" . -}} 30 | {{ else with ( .Value | unmarshal ) -}} 31 | {{ range .files -}} 32 | {{ $fontFiles = $fontFiles | append .path -}} 33 | {{ end -}} 34 | {{ else -}} 35 | {{ errorf "Unable to get fonts meta data %q from CDN. Reason: invalid KaTeX version %q." $url $version -}} 36 | {{ end -}} 37 | {{ end -}} 38 | 39 | {{ range $fontFile := $fontFiles -}} 40 | {{ $fontUrl := (printf "https://unpkg.com/katex@%s%s" $version $fontFile) -}} 41 | {{ with try (resources.GetRemote $fontUrl) -}} 42 | {{ with .Err -}} 43 | {{ errorf "Could not retrieve KaTeX font file from CDN. Reason: %s." . -}} 44 | {{ else with .Value -}} 45 | {{ with resources.Copy (printf "css/fonts/%s" (replace $fontFile "/dist/fonts/" "")) . -}} 46 | {{ .Publish -}} 47 | {{ end -}} 48 | {{ else -}} 49 | {{ errorf "Could not retrieve font file %q from CDN. Reason: invalid KaTeX version %q." $fontUrl $version -}} 50 | {{ break -}} 51 | {{ end -}} 52 | {{ end -}} 53 | {{ end }} 54 | -------------------------------------------------------------------------------- /i18n/fi.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "Edellinen" 5 | 6 | [ui_pager_next] 7 | other = "Seuraava" 8 | 9 | [ui_read_more] 10 | other = "Lue lisää" 11 | 12 | [ui_search] 13 | other = "Hae sivustolta..." 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "kaikki" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "(C)" 26 | 27 | [footer_privacy_policy] 28 | other = "Tietosuojalauseke" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "Kirjoittanut" 34 | [post_created] 35 | other = "Luonut" 36 | [post_last_mod] 37 | other = "Viimeksi muokattu" 38 | [post_edit_this] 39 | other = "Muokkaa sivua" 40 | [post_view_this] 41 | other = "Katso lähdekoodi" 42 | [post_create_child_page] 43 | other = "Luo alisivu" 44 | [post_create_issue] 45 | other = "Luo dokumentaation vikailmoitus" 46 | [post_create_project_issue] 47 | other = "Luo projektin vikailmoitus" 48 | [post_posts_in] 49 | other = "Kirjoituksia" 50 | [post_reading_time] 51 | other = "minuutin teksti" 52 | [post_less_than_a_minute_read] 53 | other = "alle minuutin" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "Tämä on monen sivun tulostettava näkymä osiosta" 58 | [print_click_to_print] 59 | other = "Paina tulostaaksesi" 60 | [print_show_regular] 61 | other = "Palaa tavalliseen näkymään" 62 | [print_entire_section] 63 | other = "Tulosta koko osio" 64 | 65 | # Community 66 | [community_join] 67 | other = "Liity {{ .Site.Title }}-yhteisöön" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} on avoimen lähdekoodin projekti, josta jokainen saa nauttia käyttämällä ja kehittämällä sitä. Olisi mahtavaa jos tulisit mukaan! Tässä pari tapaa osallistua." 70 | [community_learn] 71 | other = "Opi ja kohtaa muita" 72 | [community_using] 73 | other = "Käytätkö tai haluatko käyttää {{ .Site.Title }}:a? Lisätietoa täällä:" 74 | [community_develop] 75 | other = "Kehitä ja osallistu" 76 | [community_contribute] 77 | other = "Jos haluat auttaa kehittämään {{ .Site.Title }}:a, liity tänne:" 78 | [community_how_to] 79 | other = "Voit oppia kehittämään {{ .Site.Title }}:a meidän" 80 | [community_guideline] 81 | other = "osallistumisohjeissamme" 82 | -------------------------------------------------------------------------------- /i18n/bg.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Предишен" 7 | 8 | [ui_pager_next] 9 | other = "Следващ" 10 | 11 | [ui_read_more] 12 | other = "Прочети повече" 13 | 14 | [ui_search] 15 | other = "Търси в тази страница…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "в" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "Всички права запазени!" 24 | 25 | [footer_privacy_policy] 26 | other = "Политика за поверителност" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "От" 32 | [post_created] 33 | other = "Създаден" 34 | [post_last_mod] 35 | other = "Последна промяна" 36 | [post_edit_this] 37 | other = "Промени тази страница" 38 | [post_create_child_page] 39 | other = "Създай дъщерна страница" 40 | [post_create_issue] 41 | other = "Създаване на издаване на документ" 42 | [post_create_project_issue] 43 | other = "Създаване на издаване на проект" 44 | [post_posts_in] 45 | other = "Публикувано в" 46 | [post_reading_time] 47 | other = "minute read" 48 | [post_less_than_a_minute_read] 49 | other = "less than a minute" 50 | 51 | # Print support 52 | [print_printable_section] 53 | other = "Изглед за печат на този раздел, в режим много страници" 54 | [print_click_to_print] 55 | other = "Натисни тук за отпечатване" 56 | [print_show_regular] 57 | other = "Върнете се към обичайния изглед на тази страница" 58 | [print_entire_section] 59 | other = "Отпечатайте цялата секция" 60 | 61 | # Community 62 | [community_join] 63 | other = "Join the {{ .Site.Title }} community" 64 | [community_introduce] 65 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 66 | [community_learn] 67 | other = "Learn and Connect" 68 | [community_using] 69 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 70 | [community_develop] 71 | other = "Develop and Contribute" 72 | [community_contribute] 73 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 74 | [community_how_to] 75 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 76 | [community_guideline] 77 | other = "Contribution Guidelines" 78 | -------------------------------------------------------------------------------- /layouts/_partials/dark-mode-config.html: -------------------------------------------------------------------------------- 1 | {{/* Helper partial to get dark mode configuration with backward compatibility */ -}} 2 | 3 | {{/* Initialize to config defaults */}} 4 | {{ $darkModeConfig := dict "enable" false "showMenu" false -}} 5 | {{ $ui := site.Params.ui -}} 6 | {{ $menuConfig := $ui.showLightDarkModeMenu -}} 7 | 8 | {{ if eq $menuConfig "enable-only (experimental)" -}} 9 | {{ warnidf "experimental-dark-mode-config" (printf "%s %s %s" 10 | "Site config 'params.ui.showLightDarkModeMenu' is using 'enable-only (experimental)' mode." 11 | "For details, see " 12 | "https://www.docsy.dev/docs/content/lookandfeel/#lightdark-mode-menu" 13 | ) -}} 14 | {{ $darkModeConfig = dict "enable" true "showMenu" false -}} 15 | {{ else if $menuConfig -}} 16 | {{ $darkModeConfig = dict "enable" true "showMenu" true -}} 17 | {{/* else not $menuConfig, 18 | fallthrough and use defaults */ -}} 19 | {{ end -}} 20 | 21 | 22 | {{/* The code below is unreachable atm. Keep it here for future reference. */}} 23 | {{/* Skip-start ================================================================= */}} 24 | {{ if false -}} 25 | {{ $paramUiDarkMode := $ui.darkMode -}} 26 | 27 | {{/* Check for deprecated showLightDarkModeMenu */ -}} 28 | {{ if ne $menuConfig nil -}} 29 | {{ warnidf "deprecated-showLightDarkModeMenu" (printf 30 | "%s %s %s" 31 | "Site config 'params.ui.showLightDarkModeMenu' is deprecated:" 32 | "use 'params.ui.darkMode.showMenu' or 'params.ui.darkMode.enable'. For details, see" 33 | "https://www.docsy.dev/docs/content/lookandfeel/#lightdark-mode-menu" 34 | ) -}} 35 | {{ else if eq $paramUiDarkMode true -}} 36 | {{/* Shorthand */ -}} 37 | {{ $darkModeConfig = dict "enable" true "showMenu" true -}} 38 | {{ else if $paramUiDarkMode -}} 39 | {{/* Use new configuration structure */ -}} 40 | {{ $showMenu := $paramUiDarkMode.showMenu -}} 41 | {{ $enable := $paramUiDarkMode.enable -}} 42 | {{/* showMenu implies enable when not explicitly disabled */ -}} 43 | {{ if and $showMenu (ne $enable false) -}} 44 | {{ $enable = true -}} 45 | {{ end -}} 46 | {{ $darkModeConfig = dict "enable" $enable "showMenu" $showMenu -}} 47 | {{ end -}} 48 | {{ end -}} 49 | {{/* Skip-end ================================================================= */}} 50 | 51 | {{ return $darkModeConfig -}} 52 | -------------------------------------------------------------------------------- /layouts/swagger/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | {{ partial "head.html" . }} 10 | {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }} 11 | 12 | 13 | 14 |
    15 | {{ partial "navbar.html" . }} 16 |
    17 |
    18 |
    19 |
    20 | 23 | 28 |
    29 | {{ if not (.Param "ui.breadcrumb_disable") -}} 30 | {{ partial "breadcrumb.html" . -}} 31 | {{ end -}} 32 | 33 | 34 | {{ block "main" . }}{{ end }} 35 |
    36 |
    37 |
    38 | {{ partial "footer.html" . }} 39 |
    40 | {{ partial "scripts.html" . }} 41 | 42 | 43 | -------------------------------------------------------------------------------- /i18n/ja.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "前へ" 7 | 8 | [ui_pager_next] 9 | other = "次へ" 10 | 11 | [ui_read_more] 12 | other = "続きを読む" 13 | 14 | [ui_search] 15 | other = "サイトを検索..." 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "in" 20 | 21 | # Footer text 22 | [footer_all_rights_reserved] 23 | other = "All Rights Reserved" 24 | 25 | [footer_privacy_policy] 26 | other = "プライバシーポリシー" 27 | 28 | 29 | # Post (blog, articles etc.) 30 | [post_byline_by] 31 | other = "By" 32 | [post_created] 33 | other = "作成" 34 | [post_last_mod] 35 | other = "最終更新" 36 | [post_edit_this] 37 | other = "ページの編集" 38 | [post_view_this] 39 | other = "ページのソースコードを見る" 40 | [post_create_child_page] 41 | other = "子ページを作成" 42 | [post_create_issue] 43 | other = "ドキュメントのissueを作成" 44 | [post_create_project_issue] 45 | other = "プロジェクトのissueを作成" 46 | [post_posts_in] 47 | other = "記事一覧" 48 | [post_reading_time] 49 | other = "minute read" 50 | [post_less_than_a_minute_read] 51 | other = "less than a minute" 52 | 53 | # Print support 54 | [print_printable_section] 55 | other = "これは、このセクションの複数ページの印刷可能なビューです。" 56 | [print_click_to_print] 57 | other = "印刷するには、ここをクリックしてください" 58 | [print_show_regular] 59 | other = "このページの通常のビューに戻る" 60 | [print_entire_section] 61 | other = "セクション全体を印刷" 62 | 63 | # Community 64 | [community_join] 65 | other = "Join the {{ .Site.Title }} community" 66 | [community_introduce] 67 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 68 | [community_learn] 69 | other = "Learn and Connect" 70 | [community_using] 71 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 72 | [community_develop] 73 | other = "Develop and Contribute" 74 | [community_contribute] 75 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 76 | [community_how_to] 77 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 78 | [community_guideline] 79 | other = "Contribution Guidelines" 80 | 81 | # Feedback 82 | [feedback_title] 83 | other = "フィードバック" 84 | [feedback_question] 85 | other = "このページは役に立ちましたか?" 86 | [feedback_positive] 87 | other = "役に立った" 88 | [feedback_negative] 89 | other = "役に立たなかった" 90 | -------------------------------------------------------------------------------- /assets/scss/_content.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Style Markdown content 3 | // 4 | // cSpell:ignore: katex 5 | 6 | .td-content { 7 | order: 1; 8 | 9 | p, 10 | li, 11 | td { 12 | font-weight: $td-font-weight-body-text; 13 | } 14 | 15 | > h1 { 16 | font-weight: $font-weight-bold; 17 | margin-bottom: 1rem; 18 | } 19 | 20 | > h2 { 21 | margin-bottom: 1rem; 22 | } 23 | 24 | > h2:not(:first-child) { 25 | margin-top: 3rem; 26 | } 27 | 28 | > h2 + h3 { 29 | margin-top: 1rem; 30 | } 31 | 32 | > h3, 33 | > h4, 34 | > h5, 35 | > h6 { 36 | margin-bottom: 1rem; 37 | margin-top: 2rem; 38 | } 39 | 40 | img { 41 | @extend .img-fluid; 42 | } 43 | 44 | table { 45 | @extend .td-table; 46 | } 47 | 48 | blockquote { 49 | padding: 0 0 0 1rem; 50 | margin-bottom: $spacer; 51 | color: var(--bs-secondary-color); 52 | border-left: 6px solid var(--bs-primary); 53 | } 54 | 55 | ul li, 56 | ol li { 57 | margin-bottom: 0.25rem; 58 | } 59 | 60 | strong { 61 | font-weight: $font-weight-bold; 62 | } 63 | 64 | .footnotes, 65 | > .alert, 66 | > .highlight, 67 | > .katex-display, 68 | > .lead, 69 | > .td-table, 70 | > blockquote, 71 | > dl dd, 72 | > h1, 73 | > h2, 74 | > ol, 75 | > p, 76 | > pre, 77 | > ul { 78 | @extend .td-max-width-on-larger-screens; 79 | } 80 | 81 | .alert:not(:first-child) { 82 | margin-top: 2 * $spacer; 83 | margin-bottom: 2 * $spacer; 84 | } 85 | 86 | .lead { 87 | margin-bottom: 1.5rem; 88 | } 89 | } 90 | 91 | .td-title { 92 | margin-top: 1rem; 93 | margin-bottom: 0.5rem; 94 | 95 | @include media-breakpoint-up(sm) { 96 | font-size: 3rem; 97 | } 98 | } 99 | 100 | .td-heading-self-link { 101 | &::before { 102 | content: '#'; 103 | } 104 | 105 | font-size: 90%; 106 | padding-left: 0.25em; 107 | text-decoration: none; 108 | visibility: hidden; 109 | 110 | // Always visible on touch devices and small screens 111 | @media (hover: none) and (pointer: coarse), 112 | (max-width: map-get($grid-breakpoints, sm)) { 113 | visibility: visible; 114 | } 115 | 116 | } 117 | 118 | @for $i from 1 through 6 { 119 | h#{$i}:hover > .td-heading-self-link { 120 | visibility: visible; 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /i18n/sv.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "Tidigare" 5 | 6 | [ui_pager_next] 7 | other = "Nästa" 8 | 9 | [ui_read_more] 10 | other = "Läs mer" 11 | 12 | [ui_search] 13 | other = "Sök denna sida…" 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "i" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "alla" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "Alla rättigheter förbehållna" 26 | 27 | [footer_privacy_policy] 28 | other = "Integritetspolicy" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "Av" 34 | [post_created] 35 | other = "Skapat" 36 | [post_last_mod] 37 | other = "Senast ändrad" 38 | [post_edit_this] 39 | other = "Redigera sida" 40 | [post_view_this] 41 | other = "Visa sidans källa" 42 | [post_create_child_page] 43 | other = "Skapa barnsida" 44 | [post_create_issue] 45 | other = "Skapa dokumentationsfråga" 46 | [post_create_project_issue] 47 | other = "Skapa projektfråga" 48 | [post_posts_in] 49 | other = "Inlägg i" 50 | [post_reading_time] 51 | other = "minuter läst" 52 | [post_less_than_a_minute_read] 53 | other = "mindre än en minut" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "Detta är den flersidiga utskrivbara vyn av detta avsnitt." 58 | [print_click_to_print] 59 | other = "Klicka här för att skriva ut" 60 | [print_show_regular] 61 | other = "Återgå till den vanliga vyn på denna sida" 62 | [print_entire_section] 63 | other = "Skriv ut hela avsnittet" 64 | 65 | # Community 66 | [community_join] 67 | other = "Gå med i {{ .Site.Title }} samhället" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} är ett projekt med öppen källkod som alla i samhället kan använda, förbättra och njuta av. Vi vill gärna att du är med! Här är några sätt att ta reda på vad som händer och engagera dig." 70 | [community_learn] 71 | other = "Lär dig och Anslut" 72 | [community_using] 73 | other = "Använder eller vill använda {{ .Site.Title }}? Ta reda på mer här:" 74 | [community_develop] 75 | other = "Utveckla och Medverka" 76 | [community_contribute] 77 | other = "Om du vill engagera dig mer genom att medverka till {{ .Site.Title }}, gå med oss här:" 78 | [community_how_to] 79 | other = "Du kan ta reda på hur du medverkar till {{ .Site.Title }} i våra" 80 | [community_guideline] 81 | other = "Riktlinjer för att Medverka" 82 | -------------------------------------------------------------------------------- /i18n/hi.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "पिछला" 5 | 6 | [ui_pager_next] 7 | other = "अगला" 8 | 9 | [ui_read_more] 10 | other = "अधिक जानें" 11 | 12 | [ui_search] 13 | other = "इस साइट में खोजें…" 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "में" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "देखना सभी टैग" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "सर्वाधिकार सुरक्षित" 26 | 27 | [footer_privacy_policy] 28 | other = "गोपनीयता नीति" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "द्वारा" 34 | [post_created] 35 | other = "बनाया" 36 | [post_last_mod] 37 | other = "अंतिम बार संशोधित" 38 | [post_edit_this] 39 | other = "इस पृष्ठ को संपादित करें" 40 | [post_view_this] 41 | other = "पृष्ठ का स्त्रोत देखें" 42 | [post_create_child_page] 43 | other = "चाइल्ड पृष्ठ बनाएं" 44 | [post_create_issue] 45 | other = "समस्या की सुचना दें" 46 | [post_create_project_issue] 47 | other = "परियोजना इशू बनाएं" 48 | [post_posts_in] 49 | other = "पोस्ट में" 50 | [post_reading_time] 51 | other = "लघु अध्ययन" 52 | [post_less_than_a_minute_read] 53 | other = "एक मिनट से कम" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "यह इस खंड का बहु-पृष्ठ प्रिंट योग्य दृश्य है।" 58 | [print_click_to_print] 59 | other = "प्रिंट करने के लिए यहां क्लिक करें" 60 | [print_show_regular] 61 | other = "इस पृष्ठ के सामान्य दृश्य पर लौटें" 62 | [print_entire_section] 63 | other = "संपूर्ण अनुभाग प्रिंट करें" 64 | 65 | # Community 66 | [community_join] 67 | other = "{{ .Site.Title }} समुदाय में शामिल हों" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} एक खुला स्रोत प्रोजेक्ट है जिसका समुदाय में कोई भी उपयोग कर सकता है, सुधार कर सकता है और आनंद ले सकता है। हम चाहेंगे कि आप हमारे साथ जुड़ें! क्या हो रहा है इसका पता लगाने और इसमें शामिल होने के कुछ तरीके यहां दिए गए हैं." 70 | [community_learn] 71 | other = "सीखें और जुड़ें" 72 | [community_using] 73 | other = "{{ .Site.Title }} का उपयोग कर रहे हैं या करना चाहते हैं? यहां और जानें:" 74 | [community_develop] 75 | other = "विकास करें और योगदान दें" 76 | [community_contribute] 77 | other = "यदि आप {{ .Site.Title }} में योगदान देकर और अधिक शामिल होना चाहते हैं, तो यहां हमसे जुड़ें:" 78 | [community_how_to] 79 | other = "आप हमारे यहां {{ .Site.Title }} में योगदान करने का तरीका जान सकते हैं" 80 | [community_guideline] 81 | other = "योगदान दिशानिर्देश" 82 | -------------------------------------------------------------------------------- /i18n/hu.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Előző" 7 | 8 | [ui_pager_next] 9 | other = "Következő" 10 | 11 | [ui_read_more] 12 | other = "További olvasnivaló" 13 | 14 | [ui_search] 15 | other = "Keresés ezen az oldalon…" 16 | 17 | # Used in sentences such as "Posted in News" 18 | # TODO: this structure will not work in Hungarian 19 | # so I left it as is 20 | [ui_in] 21 | other = "in" 22 | 23 | # Footer text 24 | [footer_all_rights_reserved] 25 | other = "Minden jog fenntartva" 26 | 27 | [footer_privacy_policy] 28 | other = "Adatvédelmi szabályzat" 29 | 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "Készítette" 34 | [post_created] 35 | other = "Elkészítve" 36 | [post_last_mod] 37 | other = "Utolsó módosítás" 38 | [post_edit_this] 39 | other = "Oldal szerkesztése" 40 | [post_create_child_page] 41 | other = "Create child page" 42 | [post_create_issue] 43 | other = "Dokumentáció issue létrehozása" 44 | [post_create_project_issue] 45 | other = "Projekt issue létrehozása" 46 | # TODO: this structure will not work in Hungarian 47 | # so I left it as is 48 | [post_posts_in] 49 | other = "Posts in" 50 | [post_reading_time] 51 | other = "minute read" 52 | [post_less_than_a_minute_read] 53 | other = "less than a minute" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "This is the multi-page printable view of this section." 58 | [print_click_to_print] 59 | other = "Click here to print" 60 | [print_show_regular] 61 | other = "Return to the regular view of this page" 62 | [print_entire_section] 63 | other = "Print entire section" 64 | 65 | # Community 66 | [community_join] 67 | other = "Join the {{ .Site.Title }} community" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 70 | [community_learn] 71 | other = "Learn and Connect" 72 | [community_using] 73 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 74 | [community_develop] 75 | other = "Develop and Contribute" 76 | [community_contribute] 77 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 78 | [community_how_to] 79 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 80 | [community_guideline] 81 | other = "Contribution Guidelines" 82 | -------------------------------------------------------------------------------- /layouts/_shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | {{- /* Make sure that we are enclosed within a tabpane shortcode block */ -}} 2 | 3 | {{ with $.Parent -}} 4 | {{ if ne $.Parent.Name "tabpane" -}} 5 | {{ errorf "Found shortcode %q enclosed inside a %q block, must be enclosed inside a %q block. Error position: %s" $.Name $.Parent.Name "tabpane" $.Position -}} 6 | {{ end -}} 7 | {{ else -}} 8 | {{ errorf "shortcode %q must be enclosed inside a %q block, but no parent block was found. Error position: %s" $.Name "tabpane" $.Position -}} 9 | {{ end -}} 10 | 11 | {{ $header := "Tab" -}} 12 | {{ if and (not .IsNamedParams) (.Get 0) -}} 13 | {{ $header = (.Get 0) -}} 14 | {{ else -}} 15 | {{/* Prefill header if not given as named or unnamed parameter */ -}} 16 | {{ $header = .Get "header" | default (printf "Tab %v" .Ordinal) -}} 17 | {{ end -}} 18 | 19 | {{/* store all tab info in dict tab */ -}} 20 | {{ $tab := dict "header" $header -}} 21 | {{ with $.Get "lang" -}} 22 | {{ $tab = merge $tab (dict "language" .) -}} 23 | {{ end -}} 24 | {{ with $.Get "highlight" -}} 25 | {{ $tab = merge $tab (dict "highlight" .) -}} 26 | {{ end -}} 27 | {{ with $.Get "text" -}} 28 | {{ if ne ( printf "%T" . ) "bool" -}} 29 | {{ errorf "Shortcode %q: boolean value expected for parameter %q, but got %s. Error position: %s" $.Name "text" (printf "%T" .) $.Position -}} 30 | {{ end -}} 31 | {{ $tab = merge $tab (dict "text" .) -}} 32 | {{ end -}} 33 | {{ with $.Get "right" -}} 34 | {{ if ne ( printf "%T" . ) "bool" -}} 35 | {{ errorf "Shortcode %q: boolean value expected for parameter %q, but got %s. Error position: %s" $.Name "right" (printf "%T" .) $.Position -}} 36 | {{ end -}} 37 | {{ $tab = merge $tab (dict "rightpush" .) -}} 38 | {{ end -}} 39 | {{ with $.Get "disabled" -}} 40 | {{ if ne ( printf "%T" . ) "bool" -}} 41 | {{ errorf "Shortcode %q: boolean value expected for parameter %q, but got %s. Error position: %s" $.Name "disabled" (printf "%T" .) $.Position -}} 42 | {{ end -}} 43 | {{ $tab = merge $tab (dict "disabled" .) -}} 44 | {{ end -}} 45 | 46 | {{ with $.Inner -}} 47 | {{/* Trim any leading and trailing newlines from .Inner, this avoids 48 | spurious lines during syntax highlighting */ -}} 49 | {{ $tab = merge $tab (dict "content" .) -}} 50 | {{ end -}} 51 | 52 | {{/* add dict tab to parent's scratchpad */ -}} 53 | {{ with .Parent -}} 54 | {{ $.Parent.Scratch.SetInMap "tabs" (printf "%02v" $.Ordinal) $tab -}} 55 | {{ end -}} 56 | -------------------------------------------------------------------------------- /i18n/nl.toml: -------------------------------------------------------------------------------- 1 | 2 | 3 | # UI strings. Buttons and similar. 4 | 5 | [ui_pager_prev] 6 | other = "Vorige" 7 | 8 | [ui_pager_next] 9 | other = "Volgende" 10 | 11 | [ui_read_more] 12 | other = "Lees meer" 13 | 14 | [ui_search] 15 | other = "Doorzoek deze site" 16 | 17 | # Used in sentences such as "Posted in News" 18 | [ui_in] 19 | other = "in" 20 | 21 | [ui_all] 22 | other = "alle" 23 | 24 | # Footer text 25 | [footer_all_rights_reserved] 26 | other = "Alle rechten voorbehouden" 27 | 28 | [footer_privacy_policy] 29 | other = "Privacy Policy" 30 | 31 | # Post (blog, articles etc.) 32 | [post_byline_by] 33 | other = "Door" 34 | [post_created] 35 | other = "Aangemaakt" 36 | [post_last_mod] 37 | other = "Laatst gewijzigd" 38 | [post_edit_this] 39 | other = "Bewerk deze pagina" 40 | [post_view_this] 41 | other = "Bekijk paginabron" 42 | [post_create_child_page] 43 | other = "Maak sub pagina" 44 | [post_create_issue] 45 | other = "Maak documentatie issue" 46 | [post_create_project_issue] 47 | other = "Maak project issue" 48 | [post_posts_in] 49 | other = "Posts in" 50 | [post_reading_time] 51 | other = "minuten leestijd" 52 | [post_less_than_a_minute_read] 53 | other = "minder dan een minuut" 54 | 55 | # Print support 56 | [print_printable_section] 57 | other = "Dit is de multi-page printable view van deze sectie." 58 | [print_click_to_print] 59 | other = "Klik hier om te printen" 60 | [print_show_regular] 61 | other = "Terug naar normale view van deze pagina" 62 | [print_entire_section] 63 | other = "Print volledige sectie" 64 | 65 | # Community 66 | [community_join] 67 | other = "Wordt lid van de {{ .Site.Title }} community" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} is een open source project welke iedereen kan gebruiken, verbeteren en van kan genieten. We zouden het fijn vinden als je betrokken wordt! Hier zijn een aantal manieren om erachter te komen wat er speelt en hoe je betrokken kunt worden." 70 | [community_learn] 71 | other = "Leren en aansluiten" 72 | [community_using] 73 | other = "Gebruik je {{ .Site.Title }} of wil je dit gebruiken? Meer informatie hier:" 74 | [community_develop] 75 | other = "Ontwikkel en draag bij" 76 | [community_contribute] 77 | other = "Als je meer betrokken wil zijn door bij te dragen aan {{ .Site.Title }}, meldt je hier aan:" 78 | [community_how_to] 79 | other = "Je kunt meer informatie vinden over hoe bij te dragen aan {{ .Site.Title }} in onze" 80 | [community_guideline] 81 | other = "Richtlijnen voor bijdrage" 82 | -------------------------------------------------------------------------------- /docsy.dev/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "www.docsy.dev", 3 | "description": "Docsy website and development environment for the Docsy theme", 4 | "private": true, 5 | "scripts": { 6 | "_build": "npm run _hugo-dev --", 7 | "_check:format": "npx prettier --config ../.prettierrc.json --check .", 8 | "_check:links--warn": "npm run _check:links || (echo; echo 'WARNING: see link-checker output for issues.'; echo)", 9 | "_check:links": "make --keep-going check-links", 10 | "_commit:public": "HASH=$(git rev-parse --short main); cd public && git add -A && git commit --allow-empty -m \"Site at $HASH\"", 11 | "_hugo-dev": "npm run _hugo -- -e dev -DFE", 12 | "_hugo": "hugo --cleanDestinationDir --themesDir ../..", 13 | "_refcache:prune-4xx": "node scripts/prune-refcache-4xx.mjs", 14 | "_serve": "npm run _hugo-dev -- serve --minify --disableFastRender --renderToMemory", 15 | "build:preview": "cross-env npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", 16 | "build:production": "npm run _hugo -- --minify", 17 | "build": "cross-env npm run _build -- --baseURL \"${BASE_URL:-http://localhost}\"", 18 | "check:format": "npm run _check:format || (echo '[help] Run: npm run fix:format'; exit 1)", 19 | "check:links:internal": "HTMLTEST_ARGS='--skip-external' npm run _check:links", 20 | "check:links": "npm run _check:links", 21 | "clean": "rm -Rf public", 22 | "fix:format": "npm run _check:format -- --write", 23 | "fix": "npm run fix:format && npm run _refcache:prune-4xx", 24 | "make:public": "git init -b main public", 25 | "postbuild:preview": "npm run _check:links--warn", 26 | "postbuild:production": "npm run _check:links--warn", 27 | "precheck:links:all": "npm run build", 28 | "precheck:links": "npm run build", 29 | "prepare-disabled": "cd .. && npm install", 30 | "serve": "npm run _serve", 31 | "test": "npm run check:format && npm run check:links", 32 | "update:hugo": "npm install --save-exact -D hugo-extended@latest", 33 | "update:packages": "npx npm-check-updates -u" 34 | }, 35 | "devDependencies": { 36 | "autoprefixer": "^10.4.22", 37 | "cross-env": "^10.1.0", 38 | "hugo-extended": "0.152.2", 39 | "netlify-cli": "^23.11.1", 40 | "npm-check-updates": "^19.1.2", 41 | "postcss-cli": "^11.0.1", 42 | "rtlcss": "^4.3.0" 43 | }, 44 | "cSpell:ignore": "- docsy htmltest postbuild precheck refcache rtlcss -" 45 | } 46 | -------------------------------------------------------------------------------- /i18n/bn.toml: -------------------------------------------------------------------------------- 1 | # ইউআই স্ট্রিং বাটন এবং অনুরূপ। 2 | 3 | [ui_pager_prev] 4 | other = "পূর্ববর্তী" 5 | 6 | [ui_pager_next] 7 | other = "পরবর্তী" 8 | 9 | [ui_read_more] 10 | other = "আরও পড়ুন" 11 | 12 | [ui_search] 13 | other = "এই সাইটে খোঁজ করুন…" 14 | 15 | # "পোস্ট করা নিউজ" এর মতো বাক্যে ব্যবহৃত 16 | [ui_in] 17 | other = "মধ্যে" 18 | 19 | # Used in sentences such as "All Tags" 20 | [ui_all] 21 | other = "সব" 22 | 23 | # পাদচরণ 24 | [footer_all_rights_reserved] 25 | other = "সমস্ত অধিকার সংরক্ষিত" 26 | 27 | [footer_privacy_policy] 28 | other = "গোপনীয়তা নীতি" 29 | 30 | 31 | # পোস্ট (ব্লগ, নিবন্ধ ইত্যাদি) 32 | [post_byline_by] 33 | other = "দ্বারা" 34 | [post_created] 35 | other = "তৈরি" 36 | [post_last_mod] 37 | other = "সর্বশেষ পরিবর্তিত" 38 | [post_edit_this] 39 | other = "এই পৃষ্ঠাটি সম্পাদনা করুন" 40 | [post_view_this] 41 | other = "পৃষ্ঠার উৎস দেখুন" 42 | [post_create_child_page] 43 | other = "শাখা পৃষ্ঠা তৈরি করুন" 44 | [post_create_issue] 45 | other = "ডকুমেন্টেশন ইস্যু তৈরি করুন" 46 | [post_create_project_issue] 47 | other = "প্রকল্পের সমস্যা তৈরি করুন" 48 | [post_posts_in] 49 | other = "পোস্ট" 50 | [post_reading_time] 51 | other = "পড়তে এক মিনিট" 52 | [post_less_than_a_minute_read] 53 | other = "পড়তে এক মিনিটেরও কম সময় লাগবে" 54 | 55 | # মুদ্রণ সমর্থন 56 | [print_printable_section] 57 | other = "এটি এই বিভাগটির বহু পৃষ্ঠার মুদ্রণযোগ্য দর্শন।" 58 | [print_click_to_print] 59 | other = "মুদ্রণ করতে এখানে ক্লিক করুন" 60 | [print_show_regular] 61 | other = "এই পৃষ্ঠার নিয়মিত দৃশ্যে ফিরে আসুন" 62 | [print_entire_section] 63 | other = "পুরো বিভাগ মুদ্রণ করুন" 64 | 65 | # Community 66 | [community_join] 67 | other = "যোগদান করুন {{ .Site.Title }} সম্প্রদায়ে" 68 | [community_introduce] 69 | other = "{{ .Site.Title }} হল একটি ওপেন সোর্স প্রকল্প যা সম্প্রদায়ের যে কেউ ব্যবহার করতে, উন্নতি করতে এবং উপভোগ করতে পারে৷ আমরা আপনাকে আমাদের সাথে দেখতে আনন্দিত হবে! এখানে আমাদের সাথে যোগ দেওয়ার কিছু উপায় রয়েছে, কী ঘটছে তা জানুন এবং জড়িত হন৷" 70 | [community_learn] 71 | other = "শিখুন এবং যোগদান করুন" 72 | [community_using] 73 | other = "ইতিমধ্যে {{ .Site.Title }} ব্যবহার করছেন বা ব্যবহার করতে চান? ? এখানে আরো জানুন:" 74 | [community_develop] 75 | other = "বিকাশ এবং অবদান" 76 | [community_contribute] 77 | other = "আপনি যদি {{ .Site.Title }} এ অবদান রেখে আরও জড়িত হতে চান, তবে এখানে আমাদের সাথে যোগ দিন:" 78 | [community_how_to] 79 | other = "আপনি আমাদের এ এই নথিগুলিতে কীভাবে অবদান রাখবেন তা খুঁজে পেতে পারেন" 80 | [community_guideline] 81 | other = "অবদান নির্দেশিকা" 82 | -------------------------------------------------------------------------------- /layouts/_partials/search-input.html: -------------------------------------------------------------------------------- 1 | {{ .Scratch.Set "docsy-search" 0 -}} 2 | 3 | {{ if .Site.Params.gcs_engine_id -}} 4 | {{ .Scratch.Add "docsy-search" 1 -}} 5 | 6 | 10 | 11 | {{- end -}} 12 | 13 | 14 | {{ if and .Site.Params.search (isset .Site.Params.search "algolia") -}} 15 | {{ .Scratch.Add "docsy-search" 1 -}} 16 | {{ .Scratch.Add "docsearch-id-num" 1 -}} 17 | 18 | 21 | 22 | {{- end -}} 23 | 24 | 25 | {{ if .Site.Params.offlineSearch -}} 26 | {{ .Scratch.Add "docsy-search" 1 -}} 27 | 28 | {{ $offlineSearchIndex := resources.Get "json/offline-search-index.json" | resources.ExecuteAsTemplate "offline-search-index.json" . -}} 29 | {{ if hugo.IsProduction -}} 30 | {{/* Use `md5` as finger print hash function to shorten file name to avoid `file name too long` error. */ -}} 31 | {{ $offlineSearchIndex = $offlineSearchIndex | fingerprint "md5" -}} 32 | {{ end -}} 33 | {{ $offlineSearchLink := $offlineSearchIndex.RelPermalink -}} 34 | 35 | 55 | 56 | {{- end -}} 57 | 58 | {{ if gt (.Scratch.Get "docsy-search") 1 -}} 59 | {{ warnf `You have more than one site-search option configured: choose only one. 60 | For details, see https://www.docsy.dev/docs/content/search.` -}} 61 | {{ end -}} 62 | -------------------------------------------------------------------------------- /i18n/fa.toml: -------------------------------------------------------------------------------- 1 | # UI strings. Buttons and similar. 2 | 3 | [ui_pager_prev] 4 | other = "قبلی" 5 | 6 | [ui_pager_next] 7 | other = "بعدی" 8 | 9 | [ui_read_more] 10 | other = "بیشتر بخوانید" 11 | 12 | [ui_search] 13 | other = "در این سایت جستجو کنید..." 14 | 15 | # Used in sentences such as "Posted in News" 16 | [ui_in] 17 | other = "در" 18 | 19 | # Footer text 20 | [footer_all_rights_reserved] 21 | other = "تمام حقوق محفوظ است." 22 | 23 | [footer_privacy_policy] 24 | other = "سیاست حفظ حریم خصوصی" 25 | 26 | 27 | # Post (blog, articles etc.) 28 | [post_byline_by] 29 | other = "توسط" 30 | [post_created] 31 | other = "ساخته شده" 32 | [post_last_mod] 33 | other = "آخرین تغییرات" 34 | [post_edit_this] 35 | other = "این صفحه را ویرایش کنید" 36 | [post_view_this] 37 | other = "مشاهده منبع صفحه" 38 | [post_create_child_page] 39 | other = "ایجاد زیر صفحه در این صفحه" 40 | [post_create_issue] 41 | other = "ساخت ایشو" 42 | [post_create_project_issue] 43 | other = "ساخت ایشو برای پوسته" 44 | [post_posts_in] 45 | other = "نوشته ها در" 46 | [post_reading_time] 47 | other = "دقیقه برای خواندن" 48 | [post_less_than_a_minute_read] 49 | other = "کمتر از یک دقیقه" 50 | 51 | 52 | # Print support 53 | [print_printable_section] 54 | other = "این حالت نمایش چند صفحه ای قابل پرینت این قسمت می‌باشد." 55 | [print_click_to_print] 56 | other = "برای پرینت کلیک کنید." 57 | [print_show_regular] 58 | other = "بازگشت به حالت نمایش عادی این قسمت" 59 | [print_entire_section] 60 | other = "پرینت کامل قسمت" 61 | 62 | # Community 63 | [community_join] 64 | other = "Join the {{ .Site.Title }} community" 65 | [community_introduce] 66 | other = "{{ .Site.Title }} is an open source project that anyone in the community can use, improve, and enjoy. We'd love you to join us! Here's a few ways to find out what's happening and get involved." 67 | [community_learn] 68 | other = "Learn and Connect" 69 | [community_using] 70 | other = "Using or want to use {{ .Site.Title }}? Find out more here:" 71 | [community_develop] 72 | other = "Develop and Contribute" 73 | [community_contribute] 74 | other = "If you want to get more involved by contributing to {{ .Site.Title }}, join us here:" 75 | [community_how_to] 76 | other = "You can find out how to contribute to {{ .Site.Title }} in our" 77 | [community_guideline] 78 | other = "Contribution Guidelines" 79 | 80 | # Feedback 81 | [feedback_title] 82 | other = "بازخورد" 83 | [feedback_question] 84 | other = "این صفحه به شما کمک کرد؟" 85 | [feedback_positive] 86 | other = "آره" 87 | [feedback_negative] 88 | other = "نه" 89 | --------------------------------------------------------------------------------