├── .hugo_build.lock ├── CNAME ├── .gitignore ├── themes └── hugo-book │ ├── layouts │ ├── partials │ │ └── docs │ │ │ ├── inject │ │ │ ├── footer.html │ │ │ ├── menu-after.html │ │ │ ├── menu-before.html │ │ │ ├── toc-after.html │ │ │ ├── toc-before.html │ │ │ ├── content-after.html │ │ │ ├── content-before.html │ │ │ ├── body.html │ │ │ └── head.html │ │ │ ├── html-head-title.html │ │ │ ├── toc.html │ │ │ ├── comments.html │ │ │ ├── date.html │ │ │ ├── menu-bundle.html │ │ │ ├── brand.html │ │ │ ├── search.html │ │ │ ├── header.html │ │ │ ├── title.html │ │ │ ├── taxonomy.html │ │ │ ├── post-meta.html │ │ │ ├── menu-hugo.html │ │ │ ├── menu.html │ │ │ ├── languages.html │ │ │ ├── footer.html │ │ │ ├── menu-filetree.html │ │ │ └── html-head.html │ ├── shortcodes │ │ ├── html.html │ │ ├── hint.html │ │ ├── columns.html │ │ ├── details.html │ │ ├── section.html │ │ ├── tab.html │ │ ├── button.html │ │ ├── mermaid.html │ │ ├── expand.html │ │ ├── tabs.html │ │ └── katex.html │ ├── _default │ │ ├── list.html │ │ ├── single.html │ │ ├── _markup │ │ │ ├── render-heading.html │ │ │ ├── render-image.html │ │ │ └── render-link.html │ │ └── baseof.html │ ├── posts │ │ ├── single.html │ │ └── list.html │ ├── taxonomy │ │ ├── list.html │ │ └── taxonomy.html │ └── 404.html │ ├── go.mod │ ├── assets │ ├── themes │ │ ├── _dark.scss │ │ ├── _light.scss │ │ └── _auto.scss │ ├── _custom.scss │ ├── _variables.scss │ ├── mermaid.json │ ├── sw-register.js │ ├── menu-reset.js │ ├── _print.scss │ ├── book.scss │ ├── manifest.json │ ├── plugins │ │ ├── _scrollbars.scss │ │ └── _numbered.scss │ ├── clipboard.js │ ├── search-data.json │ ├── _fonts.scss │ ├── sw.js │ ├── _utils.scss │ ├── _defaults.scss │ ├── _shortcodes.scss │ ├── search.js │ ├── _markdown.scss │ ├── _main.scss │ └── normalize.css │ ├── .gitignore │ ├── exampleSite │ ├── assets │ │ ├── _variables.scss │ │ └── _custom.scss │ ├── content │ │ ├── docs │ │ │ ├── shortcodes │ │ │ │ ├── _index.md │ │ │ │ ├── section │ │ │ │ │ ├── _index.md │ │ │ │ │ ├── first-page.md │ │ │ │ │ └── second-page.md │ │ │ │ ├── buttons.md │ │ │ │ ├── details.md │ │ │ │ ├── expand.md │ │ │ │ ├── katex.md │ │ │ │ ├── hints.md │ │ │ │ ├── mermaid.md │ │ │ │ ├── columns.md │ │ │ │ └── tabs.md │ │ │ └── example │ │ │ │ ├── collapsed │ │ │ │ ├── _index.md │ │ │ │ └── 3rd-level │ │ │ │ │ ├── 4th-level.md │ │ │ │ │ └── _index.md │ │ │ │ ├── hidden.md │ │ │ │ ├── table-of-contents │ │ │ │ ├── without-toc.md │ │ │ │ ├── with-toc.md │ │ │ │ └── _index.md │ │ │ │ └── _index.md │ │ ├── posts │ │ │ ├── _index.md │ │ │ ├── hugoisforlovers.md │ │ │ ├── migrate-from-jekyll.md │ │ │ └── goisforlovers.md │ │ ├── menu │ │ │ └── index.md │ │ └── _index.md │ ├── resources │ │ └── _gen │ │ │ └── assets │ │ │ └── book.scss_e129fe35b8d0a70789c8a08429469073.json │ ├── content.zh │ │ └── _index.md │ ├── content.bn │ │ └── _index.md │ ├── content.ru │ │ └── _index.md │ ├── hugo.yaml │ └── hugo.toml │ ├── images │ ├── tn.png │ └── screenshot.png │ ├── static │ ├── favicon.png │ ├── fonts │ │ ├── roboto-v27-latin-700.woff │ │ ├── roboto-v27-latin-700.woff2 │ │ ├── roboto-v27-latin-regular.woff │ │ ├── roboto-v27-latin-regular.woff2 │ │ ├── roboto-mono-v13-latin-regular.woff │ │ └── roboto-mono-v13-latin-regular.woff2 │ ├── katex │ │ ├── fonts │ │ │ ├── KaTeX_Main-Bold.ttf │ │ │ ├── KaTeX_Main-Bold.woff │ │ │ ├── KaTeX_AMS-Regular.ttf │ │ │ ├── KaTeX_AMS-Regular.woff │ │ │ ├── KaTeX_Fraktur-Bold.ttf │ │ │ ├── KaTeX_Main-Bold.woff2 │ │ │ ├── KaTeX_Main-Italic.ttf │ │ │ ├── KaTeX_Main-Italic.woff │ │ │ ├── KaTeX_Main-Regular.ttf │ │ │ ├── KaTeX_Math-Italic.ttf │ │ │ ├── KaTeX_Math-Italic.woff │ │ │ ├── KaTeX_AMS-Regular.woff2 │ │ │ ├── KaTeX_Fraktur-Bold.woff │ │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ │ ├── KaTeX_Fraktur-Regular.ttf │ │ │ ├── KaTeX_Main-BoldItalic.ttf │ │ │ ├── KaTeX_Main-Italic.woff2 │ │ │ ├── KaTeX_Main-Regular.woff │ │ │ ├── KaTeX_Main-Regular.woff2 │ │ │ ├── KaTeX_Math-BoldItalic.ttf │ │ │ ├── KaTeX_Math-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Bold.ttf │ │ │ ├── KaTeX_SansSerif-Bold.woff │ │ │ ├── KaTeX_Script-Regular.ttf │ │ │ ├── KaTeX_Script-Regular.woff │ │ │ ├── KaTeX_Size1-Regular.ttf │ │ │ ├── KaTeX_Size1-Regular.woff │ │ │ ├── KaTeX_Size1-Regular.woff2 │ │ │ ├── KaTeX_Size2-Regular.ttf │ │ │ ├── KaTeX_Size2-Regular.woff │ │ │ ├── KaTeX_Size2-Regular.woff2 │ │ │ ├── KaTeX_Size3-Regular.ttf │ │ │ ├── KaTeX_Size3-Regular.woff │ │ │ ├── KaTeX_Size3-Regular.woff2 │ │ │ ├── KaTeX_Size4-Regular.ttf │ │ │ ├── KaTeX_Size4-Regular.woff │ │ │ ├── KaTeX_Size4-Regular.woff2 │ │ │ ├── KaTeX_Caligraphic-Bold.ttf │ │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ │ ├── KaTeX_Fraktur-Regular.woff │ │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ │ ├── KaTeX_Main-BoldItalic.woff │ │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ │ ├── KaTeX_Math-BoldItalic.woff │ │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ │ ├── KaTeX_SansSerif-Italic.ttf │ │ │ ├── KaTeX_SansSerif-Italic.woff │ │ │ ├── KaTeX_SansSerif-Regular.ttf │ │ │ ├── KaTeX_Script-Regular.woff2 │ │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ │ ├── KaTeX_Caligraphic-Regular.ttf │ │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ │ ├── KaTeX_SansSerif-Regular.woff │ │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ │ ├── KaTeX_Typewriter-Regular.ttf │ │ │ ├── KaTeX_Typewriter-Regular.woff │ │ │ ├── KaTeX_Typewriter-Regular.woff2 │ │ │ └── KaTeX_Caligraphic-Regular.woff2 │ │ └── auto-render.min.js │ ├── favicon.svg │ └── svg │ │ ├── menu.svg │ │ ├── toc.svg │ │ ├── calendar.svg │ │ ├── edit.svg │ │ └── translate.svg │ ├── archetypes │ ├── posts.md │ └── docs.md │ ├── resources │ └── _gen │ │ └── assets │ │ └── book.scss_e129fe35b8d0a70789c8a08429469073.json │ ├── i18n │ ├── am.yaml │ ├── en.yaml │ ├── nb.yaml │ ├── pt.yaml │ ├── tr.yaml │ ├── de.yaml │ ├── it.yaml │ ├── sv.yaml │ ├── cs.yaml │ ├── es.yaml │ ├── fr.yaml │ ├── bn.yaml │ ├── uk.yaml │ ├── ru.yaml │ ├── zh.yaml │ ├── ja.yaml │ ├── zh-TW.yaml │ ├── ko.yaml │ ├── cn.yaml │ ├── jp.yaml │ └── fa.yaml │ ├── theme.toml │ ├── .github │ └── workflows │ │ └── main.yml │ └── LICENSE ├── content ├── docs │ ├── references │ │ ├── _index.md │ │ └── FAQ.md │ ├── use-cases │ │ ├── _index.md │ │ ├── federated-data-access-layer.md │ │ └── api-composition.md │ └── articles │ │ ├── _index.md │ │ └── supergraph-in-disguise.md └── menu │ └── index.md ├── static ├── favicon.png └── supergraph-logo.png ├── .gitmodules ├── archetypes └── default.md ├── resources └── _gen │ └── assets │ └── book.scss_e129fe35b8d0a70789c8a08429469073.json ├── README.md ├── LICENSE ├── .github └── workflows │ └── hugo.yaml └── hugo.toml /.hugo_build.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | supergraph.io -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/menu-after.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/menu-before.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/toc-after.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/toc-before.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/html.html: -------------------------------------------------------------------------------- 1 | {{- .Inner -}} -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/content-after.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/content-before.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /content/docs/references/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookFlatSection: true 3 | --- 4 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "dummy" }}{{ end }} 2 | -------------------------------------------------------------------------------- /themes/hugo-book/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/alex-shpak/hugo-book 2 | 3 | go 1.16 4 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "dummy" }}{{ end }} 2 | -------------------------------------------------------------------------------- /content/docs/use-cases/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 1 3 | bookFlatSection: true 4 | --- 5 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/themes/_dark.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | @include theme-dark; 3 | } 4 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/themes/_light.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | @include theme-light; 3 | } 4 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/static/favicon.png -------------------------------------------------------------------------------- /themes/hugo-book/.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | exampleSite/public/ 3 | .DS_Store 4 | .hugo_build.lock 5 | -------------------------------------------------------------------------------- /content/docs/articles/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookCollapseSection: true 3 | bookFlatSection: true 4 | --- 5 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/assets/_variables.scss: -------------------------------------------------------------------------------- 1 | /* You can override SASS variables here. */ 2 | -------------------------------------------------------------------------------- /static/supergraph-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/static/supergraph-logo.png -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookFlatSection: true 3 | --- 4 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/html-head-title.html: -------------------------------------------------------------------------------- 1 | {{ partial "docs/title" . }} | {{ .Site.Title -}} 2 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_custom.scss: -------------------------------------------------------------------------------- 1 | /* You can add custom styles here. */ 2 | 3 | // @import "plugins/numbered"; 4 | -------------------------------------------------------------------------------- /themes/hugo-book/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/images/tn.png -------------------------------------------------------------------------------- /themes/hugo-book/assets/_variables.scss: -------------------------------------------------------------------------------- 1 | /* You can override SASS variables here. */ 2 | 3 | // @import "plugins/dark"; 4 | -------------------------------------------------------------------------------- /themes/hugo-book/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/favicon.png -------------------------------------------------------------------------------- /themes/hugo-book/assets/mermaid.json: -------------------------------------------------------------------------------- 1 | { 2 | "flowchart": { 3 | "useMaxWidth":true 4 | }, 5 | "theme": "default" 6 | } 7 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/collapsed/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookCollapseSection: true 3 | weight: 20 4 | --- 5 | -------------------------------------------------------------------------------- /themes/hugo-book/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/images/screenshot.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "supergraph/themes/hugo-book"] 2 | path = themes/hugo-book 3 | url = https://github.com/alex-shpak/hugo-book 4 | -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = '{{ replace .File.ContentBaseName "-" " " | title }}' 3 | date = {{ .Date }} 4 | draft = true 5 | +++ 6 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | menu: 3 | after: 4 | name: blog 5 | weight: 5 6 | title: Blog 7 | --- 8 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/hint.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner | .Page.RenderString }} 3 |
4 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/toc.html: -------------------------------------------------------------------------------- 1 | {{ partial "docs/inject/toc-before" . }} 2 | {{ .TableOfContents }} 3 | {{ partial "docs/inject/toc-after" . }} 4 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/assets/_custom.scss: -------------------------------------------------------------------------------- 1 | /* You can add custom styles here. */ 2 | 3 | // @import "plugins/numbered"; 4 | // @import "plugins/scrollbars"; 5 | -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-v27-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-v27-latin-700.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-v27-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-v27-latin-700.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /themes/hugo-book/archetypes/posts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ .Name | humanize | title }}" 3 | date: {{ .Date }} 4 | # bookComments: false 5 | # bookSearchExclude: false 6 | --- 7 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/comments.html: -------------------------------------------------------------------------------- 1 | 2 | {{ template "_internal/disqus.html" . }} 3 | -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.ttf -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hasura/supergraph-io/HEAD/themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /themes/hugo-book/assets/themes/_auto.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | @include theme-light; 3 | } 4 | 5 | @media (prefers-color-scheme: dark) { 6 | :root { 7 | @include theme-dark; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | 2 | {{ .Text | safeHTML }} 3 | # 4 | 5 | -------------------------------------------------------------------------------- /themes/hugo-book/static/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/static/svg/menu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/columns.html: -------------------------------------------------------------------------------- 1 |
2 | {{ range split .Inner "<--->" }} 3 |
4 | {{ . | $.Page.RenderString }} 5 |
6 | {{ end }} 7 |
8 | -------------------------------------------------------------------------------- /resources/_gen/assets/book.scss_e129fe35b8d0a70789c8a08429469073.json: -------------------------------------------------------------------------------- 1 | {"Target":"book.min.309b7ed028807cdb68d8d61e26d609f48369c098dbf5e4d8c0dcf4cdf49feafc.css","MediaType":"text/css","Data":{"Integrity":"sha256-MJt+0CiAfNto2NYeJtYJ9INpwJjb9eTYwNz0zfSf6vw="}} -------------------------------------------------------------------------------- /themes/hugo-book/static/svg/toc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/resources/_gen/assets/book.scss_e129fe35b8d0a70789c8a08429469073.json: -------------------------------------------------------------------------------- 1 | {"Target":"book.min.309b7ed028807cdb68d8d61e26d609f48369c098dbf5e4d8c0dcf4cdf49feafc.css","MediaType":"text/css","Data":{"Integrity":"sha256-MJt+0CiAfNto2NYeJtYJ9INpwJjb9eTYwNz0zfSf6vw="}} -------------------------------------------------------------------------------- /themes/hugo-book/archetypes/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ .Name | humanize | title }}" 3 | weight: 1 4 | # bookFlatSection: false 5 | # bookToc: true 6 | # bookHidden: false 7 | # bookCollapseSection: false 8 | # bookComments: false 9 | # bookSearchExclude: false 10 | --- 11 | -------------------------------------------------------------------------------- /content/menu/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | headless: true 3 | --- 4 | 5 | - **Use cases** 6 | - [API composition]({{< relref "/docs/use-cases/api-composition" >}}) 7 | 8 |
9 | 10 | - **Articles** 11 | - [Use cases]({{< relref "/docs/articles/use-cases" >}}) 12 | 13 |
14 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/resources/_gen/assets/book.scss_e129fe35b8d0a70789c8a08429469073.json: -------------------------------------------------------------------------------- 1 | {"Target":"book.min.309b7ed028807cdb68d8d61e26d609f48369c098dbf5e4d8c0dcf4cdf49feafc.css","MediaType":"text/css","Data":{"Integrity":"sha256-MJt+0CiAfNto2NYeJtYJ9INpwJjb9eTYwNz0zfSf6vw="}} -------------------------------------------------------------------------------- /themes/hugo-book/static/svg/calendar.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/sw-register.js: -------------------------------------------------------------------------------- 1 | {{- $swJS := resources.Get "sw.js" | resources.ExecuteAsTemplate "sw.js" . -}} 2 | if (navigator.serviceWorker) { 3 | navigator.serviceWorker.register( 4 | "{{ $swJS.RelPermalink }}", 5 | { scope: "{{ "./" | relURL }}" } 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/date.html: -------------------------------------------------------------------------------- 1 | 5 | {{- $format := default "January 2, 2006" .Format -}} 6 | {{- return (time.Format $format .Date) -}} 7 | -------------------------------------------------------------------------------- /themes/hugo-book/static/svg/edit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/am.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: ፈልግ 3 | 4 | - id: Edit this page 5 | translation: ይህንን ገጽ አስተካክል 6 | 7 | - id: Last modified by 8 | translation: መጨረሻ የከለሰው ሰው 9 | 10 | - id: Expand 11 | translation: አስፋ 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/menu-reset.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var menu = document.querySelector("aside .book-menu-content"); 3 | addEventListener("beforeunload", function(event) { 4 | localStorage.setItem("menu.scrollTop", menu.scrollTop); 5 | }); 6 | menu.scrollTop = localStorage.getItem("menu.scrollTop"); 7 | })(); 8 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/en.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Search 3 | 4 | - id: Edit this page 5 | translation: Edit this page 6 | 7 | - id: Last modified by 8 | translation: Last modified by 9 | 10 | - id: Expand 11 | translation: Expand 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/nb.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Søk 3 | 4 | - id: Edit this page 5 | translation: Rediger denne siden 6 | 7 | - id: Last modified by 8 | translation: Sist endret av 9 | 10 | - id: Expand 11 | translation: Utvid 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/menu-bundle.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.GetPage .Site.Params.BookMenuBundle }} 2 | {{- $href := printf "href=\"%s\"" $.RelPermalink -}} 3 | {{- replace .Content $href (print $href "class=active") | safeHTML -}} 4 | {{- warnf "Bundle menu mode is deprecated and will be removed" -}} 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/pt.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Buscar 3 | 4 | - id: Edit this page 5 | translation: Editar página 6 | 7 | - id: Last modified by 8 | translation: Última modificação por 9 | 10 | - id: Expand 11 | translation: Expandir 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/tr.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Arama 3 | 4 | - id: Edit this page 5 | translation: Bu sayfayı düzenle 6 | 7 | - id: Last modified by 8 | translation: Son düzenleyen 9 | 10 | - id: Expand 11 | translation: Genişlet 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/de.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Suche 3 | 4 | - id: Edit this page 5 | translation: Seite bearbeiten 6 | 7 | - id: Last modified by 8 | translation: Zuletzt geändert von 9 | 10 | - id: Expand 11 | translation: Erweitern 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/it.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Cerca 3 | 4 | - id: Edit this page 5 | translation: Modifica questa pagina 6 | 7 | - id: Last modified by 8 | translation: Ultima modifica di 9 | 10 | - id: Expand 11 | translation: Espandi 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/sv.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Sök 3 | 4 | - id: Edit this page 5 | translation: Redigera denna sida 6 | 7 | - id: Last modified by 8 | translation: Senast modifierad av 9 | 10 | - id: Expand 11 | translation: Expandera 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/cs.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Vyhledávat 3 | 4 | - id: Edit this page 5 | translation: Upravit tuto stránku 6 | 7 | - id: Last modified by 8 | translation: Autor poslední změny 9 | 10 | - id: Expand 11 | translation: Rozbalit 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/es.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Buscar 3 | 4 | - id: Edit this page 5 | translation: Editar esta página 6 | 7 | - id: Last modified by 8 | translation: Última modificación por 9 | 10 | - id: Expand 11 | translation: Expandir 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/fr.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Rechercher 3 | 4 | - id: Edit this page 5 | translation: Modifier cette page 6 | 7 | - id: Last modified by 8 | translation: Dernière modification par 9 | 10 | - id: Expand 11 | translation: Développer 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/details.html: -------------------------------------------------------------------------------- 1 |
2 | {{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}} 3 | {{ $summary | .Page.RenderString }} 4 |
5 | {{ .Inner | .Page.RenderString }} 6 |
7 |
8 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/bn.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: অনুসন্ধান 3 | 4 | - id: Edit this page 5 | translation: এই পৃষ্ঠাটি সম্পাদনা করুন 6 | 7 | - id: Last modified by 8 | translation: সর্বশেষ সম্পাদনা করেছেন 9 | 10 | - id: Expand 11 | translation: বিস্তৃত করা 12 | 13 | - id: bookSearchConfig 14 | translation: '{ cache: true }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/uk.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Пошук 3 | 4 | - id: Edit this page 5 | translation: Редагувати цю сторінку 6 | 7 | - id: Last modified by 8 | translation: Остання зміна від 9 | 10 | - id: Expand 11 | translation: Розгорнути 12 | 13 | - id: bookSearchConfig 14 | translation: '{ split: /[^a-zа-яё0-9\w]/gi }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/section.html: -------------------------------------------------------------------------------- 1 |
2 | {{ range .Page.Pages }} 3 |
4 | {{ partial "docs/title" . }} 5 |
6 | {{ if (in $.Params "summary") -}} 7 |
8 | {{ default .Summary .Description }} 9 |
10 | {{ end -}} 11 | {{ end }} 12 |
13 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/ru.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Поиск 3 | 4 | - id: Edit this page 5 | translation: Редактировать эту страницу 6 | 7 | - id: Last modified by 8 | translation: Последнее изменение от 9 | 10 | - id: Expand 11 | translation: Развернуть 12 | 13 | - id: bookSearchConfig 14 | translation: '{ split: /[^a-zа-яё0-9\w]/gi }' 15 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_print.scss: -------------------------------------------------------------------------------- 1 | @media print { 2 | .book-menu, 3 | .book-footer, 4 | .book-toc { 5 | display: none; 6 | } 7 | 8 | .book-header, 9 | .book-header aside { 10 | display: block; 11 | } 12 | 13 | main { 14 | // Fix for https://bugzilla.mozilla.org/show_bug.cgi?id=939897 15 | display: block !important; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/brand.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | {{- with .Site.Params.BookLogo -}} 4 | Logo 5 | {{- end -}} 6 | {{ .Site.Title }} 7 | 8 |

9 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/posts/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |

4 | {{ partial "docs/title.html" . }} 5 |

6 | {{ partial "docs/post-meta" . }} 7 | {{- .Content -}} 8 |
9 | {{ end }} 10 | 11 | {{ define "toc" }} 12 | {{ partial "docs/toc" . }} 13 | {{ end }} 14 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/book.scss: -------------------------------------------------------------------------------- 1 | @import "defaults"; 2 | @import "variables"; 3 | @import "themes/{{ default "light" .Site.Params.BookTheme }}"; 4 | 5 | @import "normalize"; 6 | @import "utils"; 7 | @import "main"; 8 | @import "fonts"; 9 | @import "print"; 10 | 11 | @import "markdown"; 12 | @import "shortcodes"; 13 | 14 | // Custom defined styles 15 | @import "custom"; 16 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/section/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookCollapseSection: true 3 | --- 4 | 5 | # Section 6 | 7 | Section renders pages in section as definition list, using title and description. Optional param `summary` can be used to show or hide page summary 8 | 9 | ## Example 10 | 11 | ```tpl 12 | {{}} 13 | ``` 14 | 15 | {{
}} 16 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/body.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ .Site.Title }}", 3 | "short_name": "{{ .Site.Title }}", 4 | "start_url": "{{ "./" | relURL }}", 5 | "scope": "{{ "./" | relURL }}", 6 | "display": "standalone", 7 | "background_color": "#000000", 8 | "theme_color": "#000000", 9 | "icons": [ 10 | { 11 | "src": "{{ "./favicon.svg" | relURL }}", 12 | "sizes": "512x512" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/zh.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: 搜索 3 | 4 | - id: Edit this page 5 | translation: 编辑本页 6 | 7 | - id: Last modified by 8 | translation: 最后修改者 9 | 10 | - id: Expand 11 | translation: 展开 12 | 13 | - id: bookSearchConfig 14 | translation: | 15 | { 16 | encode: false, 17 | tokenize: function(str) { 18 | return str.replace(/[\x00-\x7F]/g, '').split(''); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/ja.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: 検索 3 | 4 | - id: Edit this page 5 | translation: このページを編集する 6 | 7 | - id: Last modified by 8 | translation: 最終更新者 9 | 10 | - id: Expand 11 | translation: 展開 12 | 13 | - id: bookSearchConfig 14 | translation: | 15 | { 16 | encode: false, 17 | tokenize: function(str) { 18 | return str.replace(/[\x00-\x7F]/g, '').split(''); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/zh-TW.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: 搜索 3 | 4 | - id: Edit this page 5 | translation: 編輯頁面 6 | 7 | - id: Last modified by 8 | translation: 最後修改者 9 | 10 | - id: Expand 11 | translation: 展開 12 | 13 | - id: bookSearchConfig 14 | translation: | 15 | { 16 | encode: false, 17 | tokenize: function(str) { 18 | return str.replace(/[\x00-\x7F]/g, '').split(''); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | {{ if .Parent }} 2 | {{ $name := .Get 0 }} 3 | {{ $group := printf "tabs-%s" (.Parent.Get 0) }} 4 | 5 | {{ if not (.Parent.Scratch.Get $group) }} 6 | {{ .Parent.Scratch.Set $group slice }} 7 | {{ end }} 8 | 9 | {{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }} 10 | {{ else }} 11 | {{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }} 12 | {{ end}} 13 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/taxonomy/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |

{{ .Title | title }}

4 | {{ $taxonomies := index .Site.Taxonomies .Page.Type }} 5 | {{ range $taxonomies }} 6 |
{{ .Page.Title }} {{ .Count }}
7 | {{ end }} 8 |
9 | {{ end }} 10 | 11 | {{ define "toc" }} 12 | {{ partial "docs/taxonomy" . }} 13 | {{ end }} 14 | -------------------------------------------------------------------------------- /themes/hugo-book/static/svg/translate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/ko.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: Search 3 | 4 | - id: Edit this page 5 | translation: Edit this page 6 | 7 | - id: Last modified by 8 | translation: Last modified by 9 | 10 | - id: Expand 11 | translation: Expand 12 | 13 | - id: bookSearchConfig 14 | translation: | 15 | { 16 | encode: false, 17 | tokenize: function(str) { 18 | return str.replace(/[\x00-\x7F]/g, '').split(''); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{ $ref := "" }} 2 | {{ $target := "" }} 3 | {{ with .Get "href" }} 4 | {{ $ref = . }} 5 | {{ $target = "_blank" }} 6 | {{ end }} 7 | {{ with .Get "relref" }} 8 | {{ $ref = relref $ . }} 9 | {{ end }} 10 | 11 | {{ .Inner | .Page.RenderString }} 12 | 13 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/search.html: -------------------------------------------------------------------------------- 1 | {{ if default true .Site.Params.BookSearch }} 2 | 7 | 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ if not (.Page.Scratch.Get "mermaid") }} 2 | 3 | 4 | {{ with resources.Get "mermaid.json" }} 5 | 6 | {{ end }} 7 | {{ .Page.Scratch.Set "mermaid" true }} 8 | {{ end }} 9 | 10 |

11 | {{- .Inner -}} 12 |

13 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/cn.yaml: -------------------------------------------------------------------------------- 1 | # This should be removed in future, 'cn' is moved to `zh' 2 | - id: Search 3 | translation: 搜索 4 | 5 | - id: Edit this page 6 | translation: 编辑本页 7 | 8 | - id: Last modified by 9 | translation: 最后修改者 10 | 11 | - id: Expand 12 | translation: 展开 13 | 14 | - id: bookSearchConfig 15 | translation: | 16 | { 17 | encode: false, 18 | tokenize: function(str) { 19 | return str.replace(/[\x00-\x7F]/g, '').split(''); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/jp.yaml: -------------------------------------------------------------------------------- 1 | # This should be removed in future, 'jp' is moved to `ja' 2 | - id: Search 3 | translation: 検索 4 | 5 | - id: Edit this page 6 | translation: このページを編集する 7 | 8 | - id: Last modified by 9 | translation: 最終更新者 10 | 11 | - id: Expand 12 | translation: 展開 13 | 14 | - id: bookSearchConfig 15 | translation: | 16 | { 17 | encode: false, 18 | tokenize: function(str) { 19 | return str.replace(/[\x00-\x7F]/g, '').split(''); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /themes/hugo-book/i18n/fa.yaml: -------------------------------------------------------------------------------- 1 | - id: Search 2 | translation: جستجو 3 | 4 | - id: Edit this page 5 | translation: این صفحه را ویرایش کنید 6 | 7 | - id: Last modified by 8 | translation: آخرین بار ویرایش شده توسط 9 | 10 | - id: Expand 11 | translation: بسط دادن 12 | 13 | - id: Categories 14 | translation: دسته بندی ها 15 | 16 | - id: Tags 17 | translation: تگ ها 18 | 19 | - id: bookSearchConfig 20 | translation: '{ cache: true, encode: false, rtl: true, split: /\s+/, tokenize: "forward"}' 21 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/buttons.md: -------------------------------------------------------------------------------- 1 | # Buttons 2 | 3 | Buttons are styled links that can lead to local page or external link. 4 | 5 | ## Example 6 | 7 | ```tpl 8 | {{}}Get Home{{}} 9 | {{}}Contribute{{}} 10 | ``` 11 | 12 | {{< button relref="/" >}}Get Home{{< /button >}} 13 | {{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}} 14 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/header.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 6 | {{ partial "docs/title" . }} 7 | 8 | 13 |
14 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/title.html: -------------------------------------------------------------------------------- 1 | 5 | {{ $title := "" }} 6 | 7 | {{ if .LinkTitle }} 8 | {{ $title = .LinkTitle }} 9 | {{ else if .Title }} 10 | {{ $title = .Title }} 11 | {{ else if and .IsSection .File }} 12 | {{ $title = path.Base .File.Dir | humanize | title }} 13 | {{ else if and .IsPage .File }} 14 | {{ $title = .File.BaseFileName | humanize | title }} 15 | {{ end }} 16 | 17 | {{ return $title }} 18 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/expand.html: -------------------------------------------------------------------------------- 1 | {{ warnf "Expand shortcode is deprecated. Use 'details' instead." }} 2 |
3 | 13 |
14 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/plugins/_scrollbars.scss: -------------------------------------------------------------------------------- 1 | @import "defaults"; 2 | @import "variables"; 3 | 4 | // Webkit 5 | ::-webkit-scrollbar { 6 | width: $padding-8; 7 | } 8 | 9 | ::-webkit-scrollbar-thumb { 10 | background: transparent; 11 | border-radius: $padding-8; 12 | } 13 | 14 | :hover::-webkit-scrollbar-thumb { 15 | background: var(--gray-500); 16 | } 17 | 18 | // MS 19 | body { 20 | -ms-overflow-style: -ms-autohiding-scrollbar; 21 | } 22 | 23 | // Future 24 | .book-menu nav { 25 | scrollbar-color: transparent var(--gray-500); 26 | } 27 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/section/first-page.md: -------------------------------------------------------------------------------- 1 | # First page 2 | 3 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 4 | 5 | 6 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 7 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/section/second-page.md: -------------------------------------------------------------------------------- 1 | # Second Page 2 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 3 | 4 | 5 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 6 | 7 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/taxonomy.html: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # supergraph.io 2 | 3 | 4 | 5 | Rendered at: [supergraph.io](https://supergraph.io) 6 | 7 | ## Contributing 8 | 9 | This site uses [Hugo](https://gohugo.io/) with the [Hugo Book Theme](https://github.com/alex-shpak/hugo-book). 10 | 11 | #### Local development 12 | 13 | ```bash 14 | hugo server --minify --disableFastRender --theme hugo-book --ignoreCache 15 | ``` 16 | 17 | #### Deployments 18 | 19 | Deployments are automated with github actions, hosted on Github pages. 20 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | {{ if .Inner }}{{ end }} 2 | {{ $id := .Get 0 }} 3 | {{ $group := printf "tabs-%s" $id }} 4 | 5 |
6 | {{- range $index, $tab := .Scratch.Get $group -}} 7 | 8 | 11 |
12 | {{- .Content | $.Page.RenderString -}} 13 |
14 | {{- end -}} 15 |
16 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/details.md: -------------------------------------------------------------------------------- 1 | # Details 2 | 3 | Details shortcode is a helper for `details` html5 element. It is going to replace `expand` shortcode. 4 | 5 | ## Example 6 | ```tpl 7 | {{}} 8 | ## Markdown content 9 | Lorem markdownum insigne... 10 | {{}} 11 | ``` 12 | ```tpl 13 | {{}} 14 | ## Markdown content 15 | Lorem markdownum insigne... 16 | {{}} 17 | ``` 18 | 19 | {{< details "Title" open >}} 20 | ## Markdown content 21 | Lorem markdownum insigne... 22 | {{< /details >}} 23 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/posts/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ range sort .Paginator.Pages }} 3 |
4 |

5 | {{ partial "docs/title.html" . }} 6 |

7 | {{ partial "docs/post-meta" . }} 8 |

9 | {{- .Summary -}} 10 | {{ if .Truncated }} 11 | ... 12 | {{ end }} 13 |

14 |
15 | {{ end }} 16 | 17 | {{ template "_internal/pagination.html" . }} 18 | {{ end }} 19 | 20 | {{ define "toc" }} 21 | {{ partial "docs/taxonomy" . }} 22 | {{ end }} 23 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/taxonomy/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ range sort .Paginator.Pages }} 3 |
4 |

5 | {{ partial "docs/title.html" . }} 6 |

7 | {{ partial "docs/post-meta" . }} 8 |

9 | {{- .Summary -}} 10 | {{ if .Truncated }} 11 | ... 12 | {{ end }} 13 |

14 |
15 | {{ end }} 16 | 17 | {{ template "_internal/pagination.html" . }} 18 | {{ end }} 19 | 20 | {{ define "toc" }} 21 | {{ partial "docs/taxonomy" . }} 22 | {{ end }} 23 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/shortcodes/katex.html: -------------------------------------------------------------------------------- 1 | {{- if not (.Page.Scratch.Get "katex") -}} 2 | 3 | 4 | 5 | 6 | {{- .Page.Scratch.Set "katex" true -}} 7 | {{- end -}} 8 | 9 | 10 | {{ with .Get "display" }}\[{{else}}\({{end}} 11 | {{- trim .Inner "\n" -}} 12 | {{ with .Get "display" }}\]{{else}}\){{end}} 13 | 14 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/inject/head.html: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/collapsed/3rd-level/4th-level.md: -------------------------------------------------------------------------------- 1 | # 4th Level of Menu 2 | 3 | ## Caesorum illa tu sentit micat vestes papyriferi 4 | 5 | Inde aderam facti; Theseus vis de tauri illa peream. Oculos **uberaque** non 6 | regisque vobis cursuque, opus venit quam vulnera. Et maiora necemque, lege modo; 7 | gestanda nitidi, vero? Dum ne pectoraque testantur. 8 | 9 | Venasque repulsa Samos qui, exspectatum eram animosque hinc, [aut 10 | manes](http://www.creveratnon.net/apricaaetheriis), Assyrii. Cupiens auctoribus 11 | pariter rubet, profana magni super nocens. Vos ius sibilat inpar turba visae 12 | iusto! Sedes ante dum superest **extrema**. 13 | -------------------------------------------------------------------------------- /themes/hugo-book/theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "Book" 5 | license = "MIT" 6 | licenselink = "https://github.com/alex-shpak/hugo-book/blob/master/LICENSE" 7 | description = "Hugo documentation theme as simple as plain book" 8 | homepage = "https://github.com/alex-shpak/hugo-book" 9 | demosite = "https://hugo-book-demo.netlify.app" 10 | tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"] 11 | features = [] 12 | min_version = "0.124" 13 | 14 | [author] 15 | name = "Alex Shpak" 16 | homepage = "https://github.com/alex-shpak/" 17 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/clipboard.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | function select(element) { 3 | const selection = window.getSelection(); 4 | 5 | const range = document.createRange(); 6 | range.selectNodeContents(element); 7 | 8 | selection.removeAllRanges(); 9 | selection.addRange(range); 10 | } 11 | 12 | document.querySelectorAll("pre code").forEach(code => { 13 | code.addEventListener("click", function (event) { 14 | if (window.getSelection().toString()) { 15 | return; 16 | } 17 | select(code.parentElement); 18 | 19 | if (navigator.clipboard) { 20 | navigator.clipboard.writeText(code.parentElement.textContent); 21 | } 22 | }); 23 | }); 24 | })(); 25 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/post-meta.html: -------------------------------------------------------------------------------- 1 | {{ with .Date }} 2 |
{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}
3 | {{ end }} 4 | 5 | {{ range $taxonomy, $_ := .Site.Taxonomies }} 6 | {{ with $terms := $.GetTerms $taxonomy }} 7 |
8 | {{ range $n, $term := $terms }}{{ if $n }}, {{ end }} 9 | {{ $term.Title }} 10 | {{- end }} 11 |
12 | {{ end }} 13 | {{ end }} 14 | 15 | {{ if .Params.image }} 16 |

17 | {{ with .Resources.GetMatch .Params.image }} 18 | 19 | {{ else }} 20 | 21 | {{ end }} 22 |

23 | {{ end }} 24 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/search-data.json: -------------------------------------------------------------------------------- 1 | [ 2 | {{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}} 3 | {{- $pages = where $pages "Params.booksearchexclude" "!=" true -}} 4 | {{/* Remove until we know why it does not work, see https://github.com/alex-shpak/hugo-book/issues/528 */}} 5 | {{/*- $pages = where $pages "Content" "not in" (slice nil "") -*/}} 6 | {{- $pages = where $pages "Content" "!=" "" -}} 7 | 8 | {{ range $index, $page := $pages }} 9 | {{ if gt $index 0}},{{end}} { 10 | "id": {{ $index }}, 11 | "href": "{{ $page.RelPermalink }}", 12 | "title": {{ (partial "docs/title" $page) | jsonify }}, 13 | "section": {{ (partial "docs/title" $page.Parent) | jsonify }}, 14 | "content": {{ $page.Plain | jsonify }} 15 | } 16 | {{- end -}} 17 | ] 18 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/menu-hugo.html: -------------------------------------------------------------------------------- 1 | 5 | {{ if . }} 6 | {{ template "book-menu-hugo" . }} 7 | {{ end }} 8 | 9 | {{ define "book-menu-hugo" }} 10 | 28 | {{ end }} 29 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/menu.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | {{ $script := resources.Get "menu-reset.js" | resources.Minify }} 23 | {{ with $script.Content }} 24 | 25 | {{ end }} 26 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ partial "docs/html-head" . }} 6 | {{ partial "docs/inject/head" . }} 7 | 8 | 18 | 19 | 20 | 21 |
22 |
23 |

404

24 |

Page Not Found

25 |

26 | {{ .Site.Title }} 27 |

28 |
29 |
30 | 31 | {{ partial "docs/inject/body" . }} 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/plugins/_numbered.scss: -------------------------------------------------------------------------------- 1 | $startLevel: 1; 2 | $endLevel: 6; 3 | 4 | .book-page .markdown.book-article { 5 | @for $currentLevel from $startLevel through $endLevel { 6 | > h#{$currentLevel} { 7 | counter-increment: h#{$currentLevel}; 8 | counter-reset: h#{$currentLevel + 1}; 9 | 10 | $content: ""; 11 | @for $n from $startLevel through $currentLevel { 12 | $content: $content + 'counter(h#{$n})"."'; 13 | } 14 | 15 | &::before { 16 | content: unquote($content) " "; 17 | } 18 | } 19 | } 20 | } 21 | 22 | .book-toc nav#TableOfContents ul { 23 | li { 24 | counter-increment: item; 25 | 26 | &:first-child { 27 | counter-reset: item; 28 | } 29 | 30 | &:before { 31 | content: counters(item, ".") ". "; 32 | float: left; 33 | margin-inline-end: $padding-4; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{- if .Page.Site.Params.BookPortableLinks -}} 2 | {{- template "portable-image" . -}} 3 | {{- else -}} 4 | {{ .Text }} 5 | {{- end -}} 6 | 7 | {{- define "portable-image" -}} 8 | {{- $isRemote := or (in .Destination "://") (strings.HasPrefix .Destination "//") }} 9 | {{- if not $isRemote }} 10 | {{- $path := print .Page.File.Dir .Destination }} 11 | {{- if strings.HasPrefix .Destination "/" }} 12 | {{- $path = print "/static" .Destination }} 13 | {{- end }} 14 | {{- if not (fileExists $path) }} 15 | {{- warnf "Image '%s' not found in '%s'" .Destination .Page.File }} 16 | {{- end }} 17 | {{- end }} 18 | {{ .Text }} 19 | {{- end -}} 20 | -------------------------------------------------------------------------------- /themes/hugo-book/.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build with Hugo 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | hugo-version: 11 | - 'latest' 12 | - '0.124.0' 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | submodules: true # Fetch Hugo themes (true OR recursive) 17 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 18 | 19 | - name: Setup Hugo 20 | uses: peaceiris/actions-hugo@v2 21 | with: 22 | hugo-version: ${{ matrix.hugo-version }} 23 | extended: true 24 | 25 | - name: Run Hugo 26 | working-directory: exampleSite 27 | run: hugo --themesDir ../.. 28 | 29 | # - name: Deploy 30 | # uses: peaceiris/actions-gh-pages@v3 31 | # with: 32 | # github_token: ${{ secrets.GITHUB_TOKEN }} 33 | # publish_dir: ./public 34 | 35 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/expand.md: -------------------------------------------------------------------------------- 1 | # Expand 2 | 3 | Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it. 4 | 5 | ## Example 6 | ### Default 7 | 8 | ```tpl 9 | {{}} 10 | ## Markdown content 11 | Lorem markdownum insigne... 12 | {{}} 13 | ``` 14 | 15 | {{< expand >}} 16 | ## Markdown content 17 | Lorem markdownum insigne... 18 | {{< /expand >}} 19 | 20 | ### With Custom Label 21 | 22 | ```tpl 23 | {{}} 24 | ## Markdown content 25 | Lorem markdownum insigne... 26 | {{}} 27 | ``` 28 | 29 | {{< expand "Custom Label" "..." >}} 30 | ## Markdown content 31 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 32 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 33 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 34 | Miseratus fonte Ditis conubia. 35 | {{< /expand >}} 36 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/menu/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | headless: true 3 | --- 4 | 5 | - [**Example Site**]({{< relref "/docs/example" >}}) 6 | - [Table of Contents]({{< relref "/docs/example/table-of-contents" >}}) 7 | - [With ToC]({{< relref "/docs/example/table-of-contents/with-toc" >}}) 8 | - [Without ToC]({{< relref "/docs/example/table-of-contents/without-toc" >}}) 9 | - [Collapsed]({{< relref "/docs/example/collapsed" >}}) 10 | - [3rd]({{< relref "/docs/example/collapsed/3rd-level" >}}) 11 | - [4th]({{< relref "/docs/example/collapsed/3rd-level/4th-level" >}}) 12 |
13 | 14 | - **Shortcodes** 15 | - [Buttons]({{< relref "/docs/shortcodes/buttons" >}}) 16 | - [Columns]({{< relref "/docs/shortcodes/columns" >}}) 17 | - [Expand]({{< relref "/docs/shortcodes/expand" >}}) 18 | - [Hints]({{< relref "/docs/shortcodes/hints" >}}) 19 | - [KaTeX]({{< relref "/docs/shortcodes/katex" >}}) 20 | - [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}}) 21 | - [Tabs]({{< relref "/docs/shortcodes/tabs" >}}) 22 |
23 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/katex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: KaTeX 3 | --- 4 | # KaTeX 5 | 6 | KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX](https://katex.org/) 7 | 8 | ## Example 9 | 10 |
11 |
12 | 13 | ```latex 14 | {{}} 15 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi 16 | {{< /katex */>}} 17 | ``` 18 | 19 |
20 |
21 | 22 | {{< katex display=true class="optional" >}} 23 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi 24 | {{< /katex >}} 25 | 26 |
27 |
28 | 29 | ## Display Mode Example 30 | 31 | Here is some inline example: {{< katex >}}\pi(x){{< /katex >}}, rendered in the same line. And below is `display` example, having `display: block` 32 | {{< katex display=true >}} 33 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi 34 | {{< /katex >}} 35 | Text continues here. 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Hasura 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /themes/hugo-book/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 Alex Shpak 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/hints.md: -------------------------------------------------------------------------------- 1 | # Hints 2 | 3 | Hint shortcode can be used as hint/alerts/notification block. 4 | There are 3 colors to choose: `info`, `warning` and `danger`. 5 | 6 | ```tpl 7 | {{}} 8 | **Markdown content** 9 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 10 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 11 | {{}} 12 | ``` 13 | 14 | ## Example 15 | 16 | {{< hint info >}} 17 | **Markdown content** 18 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 19 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 20 | {{< /hint >}} 21 | 22 | {{< hint warning >}} 23 | **Markdown content** 24 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 25 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 26 | {{< /hint >}} 27 | 28 | {{< hint danger >}} 29 | **Markdown content** 30 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 31 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 32 | {{< /hint >}} 33 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/languages.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }} 3 | {{ $translations := dict }} 4 | {{ if (eq $bookTranslatedOnly false ) }} 5 | {{ range .Site.Home.Translations }} 6 | {{ $translations = merge $translations (dict .Language.Lang .) }} 7 | {{ end }} 8 | {{ end }} 9 | {{ range .Translations }} 10 | {{ $translations = merge $translations (dict .Language.Lang .) }} 11 | {{ end }} 12 | 13 | 34 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | {{- if .Page.Site.Params.BookPortableLinks -}} 2 | {{- template "portable-link" . -}} 3 | {{- else -}} 4 | {{ .Text | safeHTML }} 5 | {{- end -}} 6 | 7 | {{- define "portable-link" -}} 8 | {{- $destination := .Destination }} 9 | {{- $isRemote := or (in .Destination ":") (strings.HasPrefix .Destination "//") }} 10 | {{- if not $isRemote }} 11 | {{- $url := urls.Parse .Destination }} 12 | {{- $path := strings.TrimSuffix "/_index.md" $url.Path }} 13 | {{- $path = strings.TrimSuffix "/_index" $path }} 14 | {{- $path = strings.TrimSuffix ".md" $path }} 15 | {{- $page := .Page.GetPage $path }} 16 | {{- if $page }} 17 | {{- $destination = $page.RelPermalink }} 18 | {{- if $url.Fragment }} 19 | {{- $destination = print $destination "#" $url.Fragment }} 20 | {{- end }} 21 | {{- else if fileExists (print .Page.File.Dir .Destination) }} 22 | 23 | {{- else -}} 24 | {{- warnf "Page '%s' not found in '%s'" .Destination .Page.File }} 25 | {{- end }} 26 | {{- end }} 27 | {{ .Text | safeHTML }} 28 | {{- end -}} 29 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/mermaid.md: -------------------------------------------------------------------------------- 1 | # Mermaid Chart 2 | 3 | [MermaidJS](https://mermaid-js.github.io/) is library for generating svg charts and diagrams from text. 4 | 5 | {{< hint info >}} 6 | **Override Mermaid Initialization Config** 7 | 8 | To override the [initialization config](https://mermaid-js.github.io/mermaid/#/Setup) for Mermaid, 9 | create a `mermaid.json` file in your `assets` folder! 10 | {{< /hint >}} 11 | 12 | ## Example 13 | 14 | 15 |
16 |
17 | 18 | ```tpl 19 | {{}} 20 | stateDiagram-v2 21 | State1: The state with a note 22 | note right of State1 23 | Important information! You can write 24 | notes. 25 | end note 26 | State1 --> State2 27 | note left of State2 : This is the note to the left. 28 | {{< /mermaid */>}} 29 | ``` 30 | 31 |
32 |
33 | 34 | {{< mermaid class="optional" >}} 35 | stateDiagram-v2 36 | State1: The state with a note 37 | note right of State1 38 | Important information! You can write 39 | notes. 40 | end note 41 | State1 --> State2 42 | note left of State2 : This is the note to the left. 43 | {{< /mermaid >}} 44 | 45 |
46 |
-------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | type: docs 4 | --- 5 | 6 | # Acerbo datus maxime 7 | 8 | {{< columns >}} 9 | ## Astris ipse furtiva 10 | 11 | Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut 12 | olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, 13 | modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies 14 | 15 | <---> 16 | 17 | ## Suis quot vota 18 | 19 | Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: 20 | miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod 21 | nunc! Fragosis suae dextra geruntur functus vulgata. 22 | {{< /columns >}} 23 | 24 | 25 | ## Tempora nisi nunc 26 | 27 | Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, 28 | tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis 29 | sequens! 30 | 31 | var panel = ram_design; 32 | if (backup + system) { 33 | file.readPoint = network_native; 34 | sidebar_engine_device(cell_tftp_raster, 35 | dual_login_paper.adf_vci.application_reader_design( 36 | graphicsNvramCdma, lpi_footer_snmp, integer_model)); 37 | } 38 | 39 | ## Locis suis novi cum suoque decidit eadem 40 | 41 | Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? 42 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/columns.md: -------------------------------------------------------------------------------- 1 | # Columns 2 | 3 | Columns help organize shorter pieces of content horizontally for readability. 4 | 5 | 6 | ```html 7 | {{}} 8 | # Left Content 9 | Lorem markdownum insigne... 10 | 11 | <---> 12 | 13 | # Mid Content 14 | Lorem markdownum insigne... 15 | 16 | <---> 17 | 18 | # Right Content 19 | Lorem markdownum insigne... 20 | {{}} 21 | ``` 22 | 23 | ## Example 24 | 25 | {{< columns >}} 26 | ## Left Content 27 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 28 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 29 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 30 | Miseratus fonte Ditis conubia. 31 | 32 | <---> 33 | 34 | ## Mid Content 35 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 36 | stringit, frustra Saturnius uteroque inter! 37 | 38 | <---> 39 | 40 | ## Right Content 41 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 42 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 43 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 44 | Miseratus fonte Ditis conubia. 45 | {{< /columns >}} 46 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_fonts.scss: -------------------------------------------------------------------------------- 1 | /* roboto-regular - latin */ 2 | @font-face { 3 | font-family: 'Roboto'; 4 | font-style: normal; 5 | font-weight: 400; 6 | font-display: swap; 7 | src: local(''), 8 | url('fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ 9 | url('fonts/roboto-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 10 | } 11 | /* roboto-700 - latin */ 12 | @font-face { 13 | font-family: 'Roboto'; 14 | font-style: normal; 15 | font-weight: 700; 16 | font-display: swap; 17 | src: local(''), 18 | url('fonts/roboto-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ 19 | url('fonts/roboto-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 20 | } 21 | 22 | /* roboto-mono-regular - latin */ 23 | @font-face { 24 | font-family: 'Roboto Mono'; 25 | font-style: normal; 26 | font-weight: 400; 27 | font-display: swap; 28 | src: local(''), 29 | url('fonts/roboto-mono-v13-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */ 30 | url('fonts/roboto-mono-v13-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */ 31 | } 32 | 33 | body { 34 | font-family: 'Roboto', sans-serif; 35 | } 36 | 37 | code { 38 | font-family: 'Roboto Mono', monospace; 39 | } 40 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/sw.js: -------------------------------------------------------------------------------- 1 | const cacheName = self.location.pathname 2 | const pages = [ 3 | {{ if eq .Site.Params.BookServiceWorker "precache" }} 4 | {{ range .Site.AllPages -}} 5 | "{{ .RelPermalink }}", 6 | {{ end -}} 7 | {{ end }} 8 | ]; 9 | 10 | self.addEventListener("install", function (event) { 11 | self.skipWaiting(); 12 | 13 | caches.open(cacheName).then((cache) => { 14 | return cache.addAll(pages); 15 | }); 16 | }); 17 | 18 | self.addEventListener("fetch", (event) => { 19 | const request = event.request; 20 | if (request.method !== "GET") { 21 | return; 22 | } 23 | 24 | /** 25 | * @param {Response} response 26 | * @returns {Promise} 27 | */ 28 | function saveToCache(response) { 29 | if (cacheable(response)) { 30 | return caches 31 | .open(cacheName) 32 | .then((cache) => cache.put(request, response.clone())) 33 | .then(() => response); 34 | } else { 35 | return response; 36 | } 37 | } 38 | 39 | /** 40 | * @param {Error} error 41 | */ 42 | function serveFromCache(error) { 43 | return caches.open(cacheName).then((cache) => cache.match(request.url)); 44 | } 45 | 46 | /** 47 | * @param {Response} response 48 | * @returns {Boolean} 49 | */ 50 | function cacheable(response) { 51 | return response.type === "basic" && response.ok && !response.headers.has("Content-Disposition") 52 | } 53 | 54 | event.respondWith(fetch(request).then(saveToCache).catch(serveFromCache)); 55 | }); 56 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_utils.scss: -------------------------------------------------------------------------------- 1 | .flex { 2 | display: flex; 3 | } 4 | 5 | .flex-auto { 6 | flex: 1 1 auto; 7 | } 8 | 9 | .flex-even { 10 | flex: 1 1; 11 | } 12 | 13 | .flex-wrap { 14 | flex-wrap: wrap; 15 | } 16 | 17 | .justify-start { 18 | justify-content: flex-start; 19 | } 20 | 21 | .justify-end { 22 | justify-content: flex-end; 23 | } 24 | 25 | .justify-center { 26 | justify-content: center; 27 | } 28 | 29 | .justify-between { 30 | justify-content: space-between; 31 | } 32 | 33 | .align-center { 34 | align-items: center; 35 | } 36 | 37 | .mx-auto { 38 | margin: 0 auto; 39 | } 40 | 41 | .text-center { 42 | text-align: center; 43 | } 44 | 45 | .text-left { 46 | text-align: left; 47 | } 48 | 49 | .text-right { 50 | text-align: right; 51 | } 52 | 53 | .hidden { 54 | display: none; 55 | } 56 | 57 | input.toggle { 58 | height: 0; 59 | width: 0; 60 | overflow: hidden; 61 | opacity: 0; 62 | position: absolute; 63 | } 64 | 65 | .clearfix::after { 66 | content: ""; 67 | display: table; 68 | clear: both; 69 | } 70 | 71 | @mixin spin($duration) { 72 | animation: spin $duration ease infinite; 73 | @keyframes spin { 74 | 100% { 75 | transform: rotate(360deg); 76 | } 77 | } 78 | } 79 | 80 | @mixin fixed { 81 | position: fixed; 82 | top: 0; 83 | bottom: 0; 84 | overflow-x: hidden; 85 | overflow-y: auto; 86 | } 87 | 88 | @mixin outline { 89 | outline-style: auto; 90 | outline-color: currentColor; 91 | outline-color: -webkit-focus-ring-color; 92 | } 93 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | The Supergraph Manifesto is supported by  Hasura 6 |
7 | 8 | {{ if and .GitInfo .Site.Params.BookRepo }} 9 |
10 | {{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}} 11 | {{- $commitPath := default "commit" .Site.Params.BookCommitPath -}} 12 | 13 | 14 | {{ $date }} 15 | 16 |
17 | {{ end }} 18 | 19 | {{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }} 20 |
21 | 22 | 23 | {{ i18n "Edit this page" }} 24 | 25 |
26 | {{ end }} 27 | 28 |
29 | 30 | {{ $script := resources.Get "clipboard.js" | resources.Minify }} 31 | {{ with $script.Content }} 32 | 33 | {{ end }} 34 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/collapsed/3rd-level/_index.md: -------------------------------------------------------------------------------- 1 | # 3rd Level of Menu 2 | 3 | Nefas discordemque domino montes numen tum humili nexilibusque exit, Iove. Quae 4 | miror esse, scelerisque Melaneus viribus. Miseri laurus. Hoc est proposita me 5 | ante aliquid, aura inponere candidioribus quidque accendit bella, sumpta. 6 | Intravit quam erat figentem hunc, motus de fontes parvo tempestate. 7 | 8 | iscsi_virus = pitch(json_in_on(eupViral), 9 | northbridge_services_troubleshooting, personal( 10 | firmware_rw.trash_rw_crm.device(interactive_gopher_personal, 11 | software, -1), megabit, ergonomicsSoftware(cmyk_usb_panel, 12 | mips_whitelist_duplex, cpa))); 13 | if (5) { 14 | managementNetwork += dma - boolean; 15 | kilohertz_token = 2; 16 | honeypot_affiliate_ergonomics = fiber; 17 | } 18 | mouseNorthbridge = byte(nybble_xmp_modem.horse_subnet( 19 | analogThroughputService * graphicPoint, drop(daw_bit, dnsIntranet), 20 | gateway_ospf), repository.domain_key.mouse(serverData(fileNetwork, 21 | trim_duplex_file), cellTapeDirect, token_tooltip_mashup( 22 | ripcordingMashup))); 23 | module_it = honeypot_driver(client_cold_dvr(593902, ripping_frequency) + 24 | coreLog.joystick(componentUdpLink), windows_expansion_touchscreen); 25 | bashGigabit.external.reality(2, server_hardware_codec.flops.ebookSampling( 26 | ciscNavigationBacklink, table + cleanDriver), indexProtocolIsp); 27 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/shortcodes/tabs.md: -------------------------------------------------------------------------------- 1 | # Tabs 2 | 3 | Tabs let you organize content by context, for example installation instructions for each supported platform. 4 | 5 | ```tpl 6 | {{}} 7 | {{}} # MacOS Content {{}} 8 | {{}} # Linux Content {{}} 9 | {{}} # Windows Content {{}} 10 | {{}} 11 | ``` 12 | 13 | ## Example 14 | 15 | {{< tabs "uniqueid" >}} 16 | {{< tab "MacOS" >}} 17 | # MacOS 18 | 19 | This is tab **MacOS** content. 20 | 21 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 22 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 23 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 24 | Miseratus fonte Ditis conubia. 25 | {{< /tab >}} 26 | 27 | {{< tab "Linux" >}} 28 | 29 | # Linux 30 | 31 | This is tab **Linux** content. 32 | 33 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 34 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 35 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 36 | Miseratus fonte Ditis conubia. 37 | {{< /tab >}} 38 | 39 | {{< tab "Windows" >}} 40 | 41 | # Windows 42 | 43 | This is tab **Windows** content. 44 | 45 | Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat 46 | stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa 47 | protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes. 48 | Miseratus fonte Ditis conubia. 49 | {{< /tab >}} 50 | {{< /tabs >}} 51 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_defaults.scss: -------------------------------------------------------------------------------- 1 | // Used in layout 2 | $padding-1: 1px !default; 3 | $padding-4: 0.25rem !default; 4 | $padding-8: 0.5rem !default; 5 | $padding-16: 1rem !default; 6 | 7 | $font-size-base: 16px !default; 8 | $font-size-12: 0.75rem !default; 9 | $font-size-14: 0.875rem !default; 10 | $font-size-16: 1rem !default; 11 | 12 | $border-radius: $padding-4 !default; 13 | 14 | $body-font-weight: normal !default; 15 | 16 | $body-min-width: 20rem !default; 17 | $container-max-width: 80rem !default; 18 | 19 | $header-height: 3.5rem !default; 20 | $menu-width: 16rem !default; 21 | $toc-width: 16rem !default; 22 | 23 | $mobile-breakpoint: $menu-width + $body-min-width * 1.2 + $toc-width !default; 24 | 25 | $hint-colors: ( 26 | info: #6bf, 27 | warning: #fd6, 28 | danger: #f66, 29 | ) !default; 30 | 31 | // Themes 32 | @mixin theme-light { 33 | --gray-100: #f8f9fa; 34 | --gray-200: #e9ecef; 35 | --gray-500: #adb5bd; 36 | 37 | --color-link: #0055bb; 38 | --color-visited-link: #8440f1; 39 | 40 | --body-background: white; 41 | --body-font-color: black; 42 | 43 | --icon-filter: none; 44 | 45 | --hint-color-info: #6bf; 46 | --hint-color-warning: #fd6; 47 | --hint-color-danger: #f66; 48 | } 49 | 50 | @mixin theme-dark { 51 | --gray-100: rgba(255, 255, 255, 0.1); 52 | --gray-200: rgba(255, 255, 255, 0.2); 53 | --gray-500: rgba(255, 255, 255, 0.5); 54 | 55 | --color-link: #84b2ff; 56 | --color-visited-link: #b88dff; 57 | 58 | --body-background: #343a40; 59 | --body-font-color: #e9ecef; 60 | 61 | --icon-filter: brightness(0) invert(1); 62 | 63 | --hint-color-info: #6bf; 64 | --hint-color-warning: #fd6; 65 | --hint-color-danger: #f66; 66 | } 67 | -------------------------------------------------------------------------------- /content/docs/articles/supergraph-in-disguise.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: When should you supergraph? 3 | --- 4 | 5 | # When should you supergraph? 6 | 7 | The root problem 8 | - Consuming data from multiple places requires integration or aggregation work 9 | - This increases the burden on the producer since it takes time to build and is fragile 10 | - The problem is combinatorially complex when there are multiple producers and multiple consumers 11 | 12 | Supergraph need 13 | 14 | ## Common symptoms 15 | 1. API consumers are frustrated by the lack of APIs that are optimized for their specific data retrieval use cases 16 | 2. API producers are not willing to take on the burden of maintaining and operationalizing API aggregation and composition problems 17 | 3. There is no operating model or ownership model for who should solve the integration problem 18 | 19 | ## Supergraph in disguise 20 | 21 | If you're working on any of the following projects or strategic initiatives, then you're likely already 22 | building a supergraph. 23 | 24 | 1. You're starting to evaluate the need of a **federated data access layer** 25 | 2. API consumers wish they had a **monolithic API view of their microservice APIs** 26 | 3. API consumers want GraphQL, but **API producers don't want to maintain GraphQL** services 27 | 5. You're trying to add **API integration or orchestration capabilities to your API gateway** 28 | 6. You're thinking about **API standardization** for creating flexible data APIs 29 | 7. You want to **replace direct database access with APIs** 30 | 8. You want to deliver **data products** or a **data mesh over an API** 31 | 9. You want to **create a knowledge graph** and enable data retrieval for **AI** applications 32 | 33 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/hidden.md: -------------------------------------------------------------------------------- 1 | --- 2 | bookHidden: true 3 | --- 4 | 5 | # This page is hidden in menu 6 | 7 | # Quondam non pater est dignior ille Eurotas 8 | 9 | ## Latent te facies 10 | 11 | Lorem markdownum arma ignoscas vocavit quoque ille texit mandata mentis ultimus, 12 | frementes, qui in vel. Hippotades Peleus [pennas 13 | conscia](http://gratia.net/tot-qua.php) cuiquam Caeneus quas. 14 | 15 | - Pater demittere evincitque reddunt 16 | - Maxime adhuc pressit huc Danaas quid freta 17 | - Soror ego 18 | - Luctus linguam saxa ultroque prior Tatiumque inquit 19 | - Saepe liquitur subita superata dederat Anius sudor 20 | 21 | ## Cum honorum Latona 22 | 23 | O fallor [in sustinui 24 | iussorum](http://www.spectataharundine.org/aquas-relinquit.html) equidem. 25 | Nymphae operi oris alii fronde parens dumque, in auro ait mox ingenti proxima 26 | iamdudum maius? 27 | 28 | reality(burnDocking(apache_nanometer), 29 | pad.property_data_programming.sectorBrowserPpga(dataMask, 37, 30 | recycleRup)); 31 | intellectualVaporwareUser += -5 * 4; 32 | traceroute_key_upnp /= lag_optical(android.smb(thyristorTftp)); 33 | surge_host_golden = mca_compact_device(dual_dpi_opengl, 33, 34 | commerce_add_ppc); 35 | if (lun_ipv) { 36 | verticalExtranet(1, thumbnail_ttl, 3); 37 | bar_graphics_jpeg(chipset - sector_xmp_beta); 38 | } 39 | 40 | ## Fronde cetera dextrae sequens pennis voce muneris 41 | 42 | Acta cretus diem restet utque; move integer, oscula non inspirat, noctisque 43 | scelus! Nantemque in suas vobis quamvis, et labori! 44 | 45 | var runtimeDiskCompiler = home - array_ad_software; 46 | if (internic > disk) { 47 | emoticonLockCron += 37 + bps - 4; 48 | wan_ansi_honeypot.cardGigaflops = artificialStorageCgi; 49 | simplex -= downloadAccess; 50 | } 51 | var volumeHardeningAndroid = pixel + tftp + onProcessorUnmount; 52 | sector(memory(firewire + interlaced, wired)); -------------------------------------------------------------------------------- /content/docs/references/FAQ.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FAQ 3 | bookToc: false 4 | --- 5 | 6 | # FAQ 7 | 8 | ### Supergraph vs alternative approaches 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
Connect domainsConsume APIsDiscover demand
Technology Connector CI/CDPerformanceAPI ComposabilityAPI portal Analytics Ecosystem integrations
API gatewayHighN/A (no API aggregation features) LowMediumMediumLow
IPaaSLowLowMediumMediumMediumLow
Data virtualization LowLow - medium (usually designed for analytical workloads)High (usually only for non-API sources)Low (not API driven, usually SQL) N/A (no API analytics)Medium
SupergraphMedium to High - depends on stackMedium to High - depends on stackMedium to High - depends on stackHighHighDepends on stack
67 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/menu-filetree.html: -------------------------------------------------------------------------------- 1 | {{ $bookSection := default "docs" .Site.Params.BookSection }} 2 | {{ if eq $bookSection "*" }} 3 | {{ $bookSection = "/" }}{{/* Backward compatibility */}} 4 | {{ end }} 5 | 6 | {{ with .Site.GetPage $bookSection }} 7 | {{ template "book-section-children" (dict "Section" . "CurrentPage" $) }} 8 | {{ end }} 9 | 10 | {{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}} 11 | 25 | {{ end }} 26 | 27 | {{ define "book-page-link" }}{{/* (dict "Page" .Page "CurrentPage" .CurrentPage) */}} 28 | {{ $current := eq .CurrentPage .Page }} 29 | {{ $ancestor := .Page.IsAncestor .CurrentPage }} 30 | 31 | {{ if .Page.Params.BookCollapseSection }} 32 | 33 | 38 | {{ else if .Page.Params.BookHref }} 39 | 40 | {{- partial "docs/title" .Page -}} 41 | 42 | {{ else if .Page.Content }} 43 | 44 | {{- partial "docs/title" .Page -}} 45 | 46 | {{ else }} 47 | {{- partial "docs/title" .Page -}} 48 | {{ end }} 49 | {{ end }} 50 | -------------------------------------------------------------------------------- /.github/workflows/hugo.yaml: -------------------------------------------------------------------------------- 1 | # Sample workflow for building and deploying a Hugo site to GitHub Pages 2 | name: Deploy Hugo site to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: 8 | - main 9 | 10 | # Allows you to run this workflow manually from the Actions tab 11 | workflow_dispatch: 12 | 13 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 14 | permissions: 15 | contents: read 16 | pages: write 17 | id-token: write 18 | 19 | # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 20 | # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 21 | concurrency: 22 | group: "pages" 23 | cancel-in-progress: false 24 | 25 | # Default to bash 26 | defaults: 27 | run: 28 | shell: bash 29 | 30 | jobs: 31 | # Build job 32 | build: 33 | runs-on: ubuntu-latest 34 | env: 35 | HUGO_VERSION: 0.126.0 36 | steps: 37 | - name: Install Hugo CLI 38 | run: | 39 | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ 40 | && sudo dpkg -i ${{ runner.temp }}/hugo.deb 41 | # - name: Install Dart Sass 42 | # run: sudo snap install dart-sass 43 | - name: Checkout 44 | uses: actions/checkout@v4 45 | with: 46 | submodules: recursive 47 | fetch-depth: 0 48 | - name: Setup Pages 49 | id: pages 50 | uses: actions/configure-pages@v4 51 | - name: Install Node.js dependencies 52 | run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" 53 | - name: Build with Hugo 54 | env: 55 | # For maximum backward compatibility with Hugo modules 56 | HUGO_ENVIRONMENT: production 57 | HUGO_ENV: production 58 | TZ: America/Los_Angeles 59 | run: | 60 | hugo \ 61 | --gc \ 62 | --minify \ 63 | --baseURL "${{ steps.pages.outputs.base_url }}/" 64 | - name: Upload artifact 65 | uses: actions/upload-pages-artifact@v3 66 | with: 67 | path: ./public 68 | 69 | # Deployment job 70 | deploy: 71 | environment: 72 | name: github-pages 73 | url: ${{ steps.deployment.outputs.page_url }} 74 | runs-on: ubuntu-latest 75 | needs: build 76 | steps: 77 | - name: Deploy to GitHub Pages 78 | id: deployment 79 | uses: actions/deploy-pages@v4 80 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "docs/html-head" . }} 5 | {{ partial "docs/inject/head" . }} 6 | 7 | 8 | 9 | 10 |
11 | 16 | 17 |
18 |
19 | {{ template "header" . }} 20 |
21 | 22 | {{ partial "docs/inject/content-before" . }} 23 | {{ template "main" . }} 24 | {{ partial "docs/inject/content-after" . }} 25 | 26 |
27 | {{ template "footer" . }} 28 | {{ partial "docs/inject/footer" . }} 29 |
30 | 31 | {{ template "comments" . }} 32 | 33 | 34 |
35 | 36 | {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} 37 | 42 | {{ end }} 43 |
44 | 45 | {{ partial "docs/inject/body" . }} 46 | 47 | 48 | 49 | {{ define "menu" }} 50 | {{ partial "docs/menu" . }} 51 | {{ end }} 52 | 53 | {{ define "header" }} 54 | {{ partial "docs/header" . }} 55 | 56 | {{ if default true (default .Site.Params.BookToC .Params.BookToC) }} 57 | 60 | {{ end }} 61 | {{ end }} 62 | 63 | {{ define "footer" }} 64 | {{ partial "docs/footer" . }} 65 | {{ end }} 66 | 67 | {{ define "comments" }} 68 | {{ if and .Content (default true (default .Site.Params.BookComments .Params.BookComments)) }} 69 |
70 | {{- partial "docs/comments" . -}} 71 |
72 | {{ end }} 73 | {{ end }} 74 | 75 | {{ define "main" }} 76 |
77 | {{- .Content -}} 78 |
79 | {{ end }} 80 | 81 | {{ define "toc" }} 82 | {{ partial "docs/toc" . }} 83 | {{ end }} 84 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_shortcodes.scss: -------------------------------------------------------------------------------- 1 | .markdown { 2 | // {{< expand "Label" "icon" >}} 3 | .book-expand { 4 | margin-top: $padding-16; 5 | margin-bottom: $padding-16; 6 | 7 | border: $padding-1 solid var(--gray-200); 8 | border-radius: $border-radius; 9 | 10 | overflow: hidden; 11 | 12 | .book-expand-head { 13 | background: var(--gray-100); 14 | padding: $padding-8 $padding-16; 15 | cursor: pointer; 16 | } 17 | 18 | .book-expand-content { 19 | display: none; 20 | padding: $padding-16; 21 | } 22 | 23 | input[type="checkbox"]:checked + .book-expand-content { 24 | display: block; 25 | } 26 | } 27 | 28 | // {{< tabs >}} 29 | .book-tabs { 30 | margin-top: $padding-16; 31 | margin-bottom: $padding-16; 32 | 33 | border: $padding-1 solid var(--gray-200); 34 | border-radius: $border-radius; 35 | 36 | overflow: hidden; 37 | 38 | display: flex; 39 | flex-wrap: wrap; 40 | 41 | label { 42 | display: inline-block; 43 | padding: $padding-8 $padding-16; 44 | border-bottom: $padding-1 transparent; 45 | cursor: pointer; 46 | } 47 | 48 | .book-tabs-content { 49 | order: 999; //Move content blocks to the end 50 | width: 100%; 51 | border-top: $padding-1 solid var(--gray-100); 52 | padding: $padding-16; 53 | display: none; 54 | } 55 | 56 | input[type="radio"]:checked + label { 57 | border-bottom: $padding-1 solid var(--color-link); 58 | } 59 | input[type="radio"]:checked + label + .book-tabs-content { 60 | display: block; 61 | } 62 | input[type="radio"]:focus + label { 63 | @include outline; 64 | } 65 | } 66 | 67 | // {{< columns >}} 68 | .book-columns { 69 | margin-left: -$padding-16; 70 | margin-right: -$padding-16; 71 | 72 | > div { 73 | margin: $padding-16 0; 74 | min-width: $body-min-width / 2; 75 | padding: 0 $padding-16; 76 | } 77 | } 78 | 79 | // {{< button >}} 80 | a.book-btn { 81 | display: inline-block; 82 | font-size: $font-size-14; 83 | color: var(--color-link); 84 | line-height: $padding-16 * 2; 85 | padding: 0 $padding-16; 86 | border: $padding-1 solid var(--color-link); 87 | border-radius: $border-radius; 88 | cursor: pointer; 89 | 90 | &:hover { 91 | text-decoration: none; 92 | } 93 | } 94 | 95 | // {{< hint >}} 96 | .book-hint { 97 | @each $name, $color in $hint-colors { 98 | &.#{$name} { 99 | border-color: $color; 100 | background-color: rgba($color, 0.1); 101 | } 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/table-of-contents/without-toc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Without ToC 3 | weight: 2 4 | bookToc: false 5 | --- 6 | 7 | # At me ipso nepotibus nunc celebratior genus 8 | 9 | ## Tanto oblite 10 | 11 | Lorem markdownum pectora novis patenti igne sua opus aurae feras materiaque 12 | illic demersit imago et aristas questaque posset. Vomit quoque suo inhaesuro 13 | clara. Esse cumque, per referri triste. Ut exponit solisque communis in tendens 14 | vincetis agisque iamque huic bene ante vetat omina Thebae rates. Aeacus servat 15 | admonitu concidit, ad resimas vultus et rugas vultu **dignamque** Siphnon. 16 | 17 | Quam iugulum regia simulacra, plus meruit humo pecorumque haesit, ab discedunt 18 | dixit: ritu pharetramque. Exul Laurenti orantem modo, per densum missisque labor 19 | manibus non colla unum, obiectat. Tu pervia collo, fessus quae Cretenque Myconon 20 | crate! Tegumenque quae invisi sudore per vocari quaque plus ventis fluidos. Nodo 21 | perque, fugisse pectora sorores. 22 | 23 | ## Summe promissa supple vadit lenius 24 | 25 | Quibus largis latebris aethera versato est, ait sentiat faciemque. Aequata alis 26 | nec Caeneus exululat inclite corpus est, ire **tibi** ostendens et tibi. Rigent 27 | et vires dique possent lumina; **eadem** dixit poma funeribus paret et felix 28 | reddebant ventis utile lignum. 29 | 30 | 1. Remansit notam Stygia feroxque 31 | 2. Et dabit materna 32 | 3. Vipereas Phrygiaeque umbram sollicito cruore conlucere suus 33 | 4. Quarum Elis corniger 34 | 5. Nec ieiunia dixit 35 | 36 | Vertitur mos ortu ramosam contudit dumque; placabat ac lumen. Coniunx Amoris 37 | spatium poenamque cavernis Thebae Pleiadasque ponunt, rapiare cum quae parum 38 | nimium rima. 39 | 40 | ## Quidem resupinus inducto solebat una facinus quae 41 | 42 | Credulitas iniqua praepetibus paruit prospexit, voce poena, sub rupit sinuatur, 43 | quin suum ventorumque arcadiae priori. Soporiferam erat formamque, fecit, 44 | invergens, nymphae mutat fessas ait finge. 45 | 46 | 1. Baculum mandataque ne addere capiti violentior 47 | 2. Altera duas quam hoc ille tenues inquit 48 | 3. Sicula sidereus latrantis domoque ratae polluit comites 49 | 4. Possit oro clausura namque se nunc iuvenisque 50 | 5. Faciem posuit 51 | 6. Quodque cum ponunt novercae nata vestrae aratra 52 | 53 | Ite extrema Phrygiis, patre dentibus, tonso perculit, enim blanda, manibus fide 54 | quos caput armis, posse! Nocendo fas Alcyonae lacertis structa ferarum manus 55 | fulmen dubius, saxa caelum effuge extremis fixum tumor adfecit **bella**, 56 | potentes? Dum nec insidiosa tempora tegit 57 | [spirarunt](http://mihiferre.net/iuvenes-peto.html). Per lupi pars foliis, 58 | porreximus humum negant sunt subposuere Sidone steterant auro. Memoraverit sine: 59 | ferrum idem Orion caelum heres gerebat fixis? 60 | -------------------------------------------------------------------------------- /themes/hugo-book/layouts/partials/docs/html-head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | {{- with .Page.Params.BookHref -}} 9 | 10 | {{- end -}} 11 | 12 | {{- template "_internal/opengraph.html" . -}} 13 | 14 | {{ partial "docs/html-head-title" . }} 15 | 16 | {{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }} 17 | 18 | 19 | 20 | 21 | {{- range .Translations }} 22 | 23 | {{- end -}} 24 | 25 | 26 | {{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }} 27 | 28 | 29 | {{- if default true .Site.Params.BookSearch -}} 30 | {{- $searchJSFile := printf "%s.search.js" .Language.Lang }} 31 | {{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} 32 | 33 | 34 | {{ end -}} 35 | 36 | {{- if .Site.Params.BookServiceWorker -}} 37 | {{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} 38 | 39 | {{ end -}} 40 | 41 | {{- template "_internal/google_analytics.html" . -}} 42 | 43 | 44 | {{- with .OutputFormats.Get "rss" -}} 45 | {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} 46 | {{ end -}} 47 | 48 | {{ "" | safeHTML }} 52 | 53 | {{- define "integrity" -}} 54 | {{- if (urls.Parse .Permalink).Host -}} 55 | integrity="{{ .Data.Integrity }}" crossorigin="anonymous" 56 | {{- end -}} 57 | {{- end -}} 58 | 59 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/posts/hugoisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Getting Started with Hugo" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "hugo", 8 | "development", 9 | ] 10 | date = "2014-04-02" 11 | categories = [ 12 | "Development", 13 | "golang", 14 | ] 15 | menu = "main" 16 | +++ 17 | 18 | ## Step 1. Install Hugo 19 | 20 | Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the 21 | appropriate version for your OS and architecture. 22 | 23 | Save it somewhere specific as we will be using it in the next step. 24 | 25 | More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/) 26 | 27 | ## Step 2. Build the Docs 28 | 29 | Hugo has its own example site which happens to also be the documentation site 30 | you are reading right now. 31 | 32 | Follow the following steps: 33 | 34 | 1. Clone the [Hugo repository](http://github.com/spf13/hugo) 35 | 2. Go into the repo 36 | 3. Run hugo in server mode and build the docs 37 | 4. Open your browser to http://localhost:1313 38 | 39 | Corresponding pseudo commands: 40 | 41 | git clone https://github.com/spf13/hugo 42 | cd hugo 43 | /path/to/where/you/installed/hugo server --source=./docs 44 | > 29 pages created 45 | > 0 tags index created 46 | > in 27 ms 47 | > Web Server is available at http://localhost:1313 48 | > Press ctrl+c to stop 49 | 50 | Once you've gotten here, follow along the rest of this page on your local build. 51 | 52 | ## Step 3. Change the docs site 53 | 54 | Stop the Hugo process by hitting Ctrl+C. 55 | 56 | Now we are going to run hugo again, but this time with hugo in watch mode. 57 | 58 | /path/to/hugo/from/step/1/hugo server --source=./docs --watch 59 | > 29 pages created 60 | > 0 tags index created 61 | > in 27 ms 62 | > Web Server is available at http://localhost:1313 63 | > Watching for changes in /Users/spf13/Code/hugo/docs/content 64 | > Press ctrl+c to stop 65 | 66 | 67 | Open your [favorite editor](http://vim.spf13.com) and change one of the source 68 | content pages. How about changing this very file to *fix the typo*. How about changing this very file to *fix the typo*. 69 | 70 | Content files are found in `docs/content/`. Unless otherwise specified, files 71 | are located at the same relative location as the url, in our case 72 | `docs/content/overview/quickstart.md`. 73 | 74 | Change and save this file.. Notice what happened in your terminal. 75 | 76 | > Change detected, rebuilding site 77 | 78 | > 29 pages created 79 | > 0 tags index created 80 | > in 26 ms 81 | 82 | Refresh the browser and observe that the typo is now fixed. 83 | 84 | Notice how quick that was. Try to refresh the site before it's finished building. I double dare you. 85 | Having nearly instant feedback enables you to have your creativity flow without waiting for long builds. 86 | 87 | ## Step 4. Have fun 88 | 89 | The best way to learn something is to play with it. 90 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | weight: 1 3 | bookFlatSection: true 4 | title: "Example Site" 5 | --- 6 | 7 | # Introduction 8 | 9 | ## Ferre hinnitibus erat accipitrem dixi Troiae tollens 10 | 11 | Lorem markdownum, a quoque nutu est *quodcumque mandasset* veluti. Passim 12 | inportuna totidemque nympha fert; repetens pendent, poenarum guttura sed vacet 13 | non, mortali undas. Omnis pharetramque gramen portentificisque membris servatum 14 | novabis fallit de nubibus atque silvas mihi. **Dixit repetitaque Quid**; verrit 15 | longa; sententia [mandat](http://pastor-ad.io/questussilvas) quascumque nescio 16 | solebat [litore](http://lacrimas-ab.net/); noctes. *Hostem haerentem* circuit 17 | [plenaque tamen](http://www.sine.io/in). 18 | 19 | - Pedum ne indigenae finire invergens carpebat 20 | - Velit posses summoque 21 | - De fumos illa foret 22 | 23 | ## Est simul fameque tauri qua ad 24 | 25 | Locum nullus nisi vomentes. Ab Persea sermone vela, miratur aratro; eandem 26 | Argolicas gener. 27 | 28 | ## Me sol 29 | 30 | Nec dis certa fuit socer, Nonacria **dies** manet tacitaque sibi? Sucis est 31 | iactata Castrumque iudex, et iactato quoque terraeque es tandem et maternos 32 | vittis. Lumina litus bene poenamque animos callem ne tuas in leones illam dea 33 | cadunt genus, et pleno nunc in quod. Anumque crescentesque sanguinis 34 | [progenies](http://www.late.net/alimentavirides) nuribus rustica tinguet. Pater 35 | omnes liquido creditis noctem. 36 | 37 | if (mirrored(icmp_dvd_pim, 3, smbMirroredHard) != lion(clickImportQueue, 38 | viralItunesBalancing, bankruptcy_file_pptp)) { 39 | file += ip_cybercrime_suffix; 40 | } 41 | if (runtimeSmartRom == netMarketingWord) { 42 | virusBalancingWin *= scriptPromptBespoke + raster(post_drive, 43 | windowsSli); 44 | cd = address_hertz_trojan; 45 | soap_ccd.pcbServerGigahertz(asp_hardware_isa, offlinePeopleware, nui); 46 | } else { 47 | megabyte.api = modem_flowchart - web + syntaxHalftoneAddress; 48 | } 49 | if (3 < mebibyteNetworkAnimated) { 50 | pharming_regular_error *= jsp_ribbon + algorithm * recycleMediaKindle( 51 | dvrSyntax, cdma); 52 | adf_sla *= hoverCropDrive; 53 | templateNtfs = -1 - vertical; 54 | } else { 55 | expressionCompressionVariable.bootMulti = white_eup_javascript( 56 | table_suffix); 57 | guidPpiPram.tracerouteLinux += rtfTerabyteQuicktime(1, 58 | managementRosetta(webcamActivex), 740874); 59 | } 60 | var virusTweetSsl = nullGigo; 61 | 62 | ## Trepident sitimque 63 | 64 | Sentiet et ferali errorem fessam, coercet superbus, Ascaniumque in pennis 65 | mediis; dolor? Vidit imi **Aeacon** perfida propositos adde, tua Somni Fluctibus 66 | errante lustrat non. 67 | 68 | Tamen inde, vos videt e flammis Scythica parantem rupisque pectora umbras. Haec 69 | ficta canistris repercusso simul ego aris Dixit! Esse Fama trepidare hunc 70 | crescendo vigor ululasse vertice *exspatiantur* celer tepidique petita aversata 71 | oculis iussa est me ferro. 72 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/docs/example/table-of-contents/with-toc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: With ToC 3 | weight: 1 4 | --- 5 | # Caput vino delphine in tamen vias 6 | 7 | ## Cognita laeva illo fracta 8 | 9 | Lorem markdownum pavent auras, surgit nunc cingentibus libet **Laomedonque que** 10 | est. Pastor [An](http://est.org/ire.aspx) arbor filia foedat, ne [fugit 11 | aliter](http://www.indiciumturbam.org/moramquid.php), per. Helicona illas et 12 | callida neptem est *Oresitrophos* caput, dentibus est venit. Tenet reddite 13 | [famuli](http://www.antro-et.net/) praesentem fortibus, quaeque vis foret si 14 | frondes *gelidos* gravidae circumtulit [inpulit armenta 15 | nativum](http://incurvasustulit.io/illi-virtute.html). 16 | 17 | 1. Te at cruciabere vides rubentis manebo 18 | 2. Maturuit in praetemptat ruborem ignara postquam habitasse 19 | 3. Subitarum supplevit quoque fontesque venabula spretis modo 20 | 4. Montis tot est mali quasque gravis 21 | 5. Quinquennem domus arsit ipse 22 | 6. Pellem turis pugnabant locavit 23 | 24 | ## Natus quaerere 25 | 26 | Pectora et sine mulcere, coniuge dum tincta incurvae. Quis iam; est dextra 27 | Peneosque, metuis a verba, primo. Illa sed colloque suis: magno: gramen, aera 28 | excutiunt concipit. 29 | 30 | > Phrygiae petendo suisque extimuit, super, pars quod audet! Turba negarem. 31 | > Fuerat attonitus; et dextra retinet sidera ulnas undas instimulat vacuae 32 | > generis? *Agnus* dabat et ignotis dextera, sic tibi pacis **feriente at mora** 33 | > euhoeque *comites hostem* vestras Phineus. Vultuque sanguine dominoque [metuit 34 | > risi](http://iuvat.org/eundem.php) fama vergit summaque meus clarissimus 35 | > artesque tinguebat successor nominis cervice caelicolae. 36 | 37 | ## Limitibus misere sit 38 | 39 | Aurea non fata repertis praerupit feruntur simul, meae hosti lentaque *citius 40 | levibus*, cum sede dixit, Phaethon texta. *Albentibus summos* multifidasque 41 | iungitur loquendi an pectore, mihi ursaque omnia adfata, aeno parvumque in animi 42 | perlucentes. Epytus agis ait vixque clamat ornum adversam spondet, quid sceptra 43 | ipsum **est**. Reseret nec; saeva suo passu debentia linguam terga et aures et 44 | cervix [de](http://www.amnem.io/pervenit.aspx) ubera. Coercet gelidumque manus, 45 | doluit volvitur induta? 46 | 47 | ## Enim sua 48 | 49 | Iuvenilior filia inlustre templa quidem herbis permittat trahens huic. In 50 | cruribus proceres sole crescitque *fata*, quos quos; merui maris se non tamen 51 | in, mea. 52 | 53 | ## Germana aves pignus tecta 54 | 55 | Mortalia rudibusque caelum cognosceret tantum aquis redito felicior texit, nec, 56 | aris parvo acre. Me parum contulerant multi tenentem, gratissime suis; vultum tu 57 | occupat deficeret corpora, sonum. E Actaea inplevit Phinea concepit nomenque 58 | potest sanguine captam nulla et, in duxisses campis non; mercede. Dicere cur 59 | Leucothoen obitum? 60 | 61 | Postibus mittam est *nubibus principium pluma*, exsecratur facta et. Iunge 62 | Mnemonidas pallamque pars; vere restitit alis flumina quae **quoque**, est 63 | ignara infestus Pyrrha. Di ducis terris maculatum At sede praemia manes 64 | nullaque! 65 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/search.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | {{ $searchDataFile := printf "%s.search-data.json" .Language.Lang }} 4 | {{ $searchData := resources.Get "search-data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }} 5 | {{ $searchConfig := i18n "bookSearchConfig" | default "{}" }} 6 | 7 | (function () { 8 | const searchDataURL = '{{ $searchData.RelPermalink }}'; 9 | const indexConfig = Object.assign({{ $searchConfig }}, { 10 | includeScore: true, 11 | useExtendedSearch: true, 12 | fieldNormWeight: 1.5, 13 | threshold: 0.2, 14 | ignoreLocation: true, 15 | keys: [ 16 | { 17 | name: 'title', 18 | weight: 0.7 19 | }, 20 | { 21 | name: 'content', 22 | weight: 0.3 23 | } 24 | ] 25 | }); 26 | 27 | const input = document.querySelector('#book-search-input'); 28 | const results = document.querySelector('#book-search-results'); 29 | 30 | if (!input) { 31 | return 32 | } 33 | 34 | input.addEventListener('focus', init); 35 | input.addEventListener('keyup', search); 36 | 37 | document.addEventListener('keypress', focusSearchFieldOnKeyPress); 38 | 39 | /** 40 | * @param {Event} event 41 | */ 42 | function focusSearchFieldOnKeyPress(event) { 43 | if (event.target.value !== undefined) { 44 | return; 45 | } 46 | 47 | if (input === document.activeElement) { 48 | return; 49 | } 50 | 51 | const characterPressed = String.fromCharCode(event.charCode); 52 | if (!isHotkey(characterPressed)) { 53 | return; 54 | } 55 | 56 | input.focus(); 57 | event.preventDefault(); 58 | } 59 | 60 | /** 61 | * @param {String} character 62 | * @returns {Boolean} 63 | */ 64 | function isHotkey(character) { 65 | const dataHotkeys = input.getAttribute('data-hotkeys') || ''; 66 | return dataHotkeys.indexOf(character) >= 0; 67 | } 68 | 69 | function init() { 70 | input.removeEventListener('focus', init); // init once 71 | input.required = true; 72 | 73 | fetch(searchDataURL) 74 | .then(pages => pages.json()) 75 | .then(pages => { 76 | window.bookSearchIndex = new Fuse(pages, indexConfig); 77 | }) 78 | .then(() => input.required = false) 79 | .then(search); 80 | } 81 | 82 | function search() { 83 | while (results.firstChild) { 84 | results.removeChild(results.firstChild); 85 | } 86 | 87 | if (!input.value) { 88 | return; 89 | } 90 | 91 | const searchHits = window.bookSearchIndex.search(input.value).slice(0,10); 92 | searchHits.forEach(function (page) { 93 | const li = element('
  • '); 94 | const a = li.querySelector('a'), small = li.querySelector('small'); 95 | 96 | a.href = page.item.href; 97 | a.textContent = page.item.title; 98 | small.textContent = page.item.section; 99 | 100 | results.appendChild(li); 101 | }); 102 | } 103 | 104 | /** 105 | * @param {String} content 106 | * @returns {Node} 107 | */ 108 | function element(content) { 109 | const div = document.createElement('div'); 110 | div.innerHTML = content; 111 | return div.firstChild; 112 | } 113 | })(); 114 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content.zh/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 介绍 3 | type: docs 4 | --- 5 | 6 | # 中文索引页 7 | 8 | {{< columns >}} 9 | ## Astris ipse furtiva 10 | 11 | Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut 12 | olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, 13 | modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies 14 | 15 | <---> 16 | 17 | ## Suis quot vota 18 | 19 | Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: 20 | miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod 21 | nunc! Fragosis suae dextra geruntur functus vulgata. 22 | {{< /columns >}} 23 | 24 | 25 | ## Tempora nisi nunc 26 | 27 | Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, 28 | tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis 29 | sequens! 30 | 31 | var panel = ram_design; 32 | if (backup + system) { 33 | file.readPoint = network_native; 34 | sidebar_engine_device(cell_tftp_raster, 35 | dual_login_paper.adf_vci.application_reader_design( 36 | graphicsNvramCdma, lpi_footer_snmp, integer_model)); 37 | } 38 | public_keyboard_docking += error.controller_gibibyte_plug.ip(4, 39 | asciiPetaflops, software(supercomputer_compatible_status + 4)); 40 | dynamic_disk.indexModeLaptop = bufferTftpReality; 41 | var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( 42 | -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); 43 | 44 | ## Locis suis novi cum suoque decidit eadem 45 | 46 | Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes 47 | versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota 48 | macies domoque caelestia cadit tantummodo scelus procul, corde! 49 | 50 | 1. Dolentem capi parte rostro alvum habentem pudor 51 | 2. Fulgentia sanguine paret 52 | 3. E punior consurgit lentus 53 | 4. Vox hasta eras micantes 54 | 55 | ## Facibus pharetrae indetonsusque indulsit sic incurrite foliis 56 | 57 | Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ 58 | Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e 59 | at ademptae, mira. 60 | 61 | direct *= font(inputScareware(sliHome), crossplatform.byte( 62 | ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, 63 | floating_speakers.media_printer(us, yahoo, primaryPhp))); 64 | friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); 65 | if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { 66 | adf -= operation_cdma_samba; 67 | imapGif.switch += torrent; 68 | } else { 69 | pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); 70 | ajax_service += grayscalePythonLock; 71 | google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; 72 | } 73 | drive_rw = zipTftp; 74 | var suffix = software_router_extension.dimm_ddr(-5, 75 | kernel_digital_minisite); 76 | 77 | Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam 78 | tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis 79 | innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? 80 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content.bn/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ভূমিকা 3 | type: docs 4 | --- 5 | 6 | # বাংলা ভাষায় শুরু করুন 7 | 8 | {{< columns >}} 9 | ## অস্ট্রিস চিপসে ফুর্তিভা 10 | 11 | Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut 12 | olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, 13 | modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies 14 | 15 | <---> 16 | 17 | ## সুইস কোটা ভোটে 18 | 19 | Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: 20 | miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod 21 | nunc! Fragosis suae dextra geruntur functus vulgata. 22 | {{< /columns >}} 23 | 24 | 25 | ## টেম্পোরার নিশি 26 | 27 | Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, 28 | tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis 29 | sequens! 30 | 31 | var panel = ram_design; 32 | if (backup + system) { 33 | file.readPoint = network_native; 34 | sidebar_engine_device(cell_tftp_raster, 35 | dual_login_paper.adf_vci.application_reader_design( 36 | graphicsNvramCdma, lpi_footer_snmp, integer_model)); 37 | } 38 | public_keyboard_docking += error.controller_gibibyte_plug.ip(4, 39 | asciiPetaflops, software(supercomputer_compatible_status + 4)); 40 | dynamic_disk.indexModeLaptop = bufferTftpReality; 41 | var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( 42 | -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); 43 | 44 | ## Locis suis novi cum suoque decidit eadem 45 | 46 | Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes 47 | versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota 48 | macies domoque caelestia cadit tantummodo scelus procul, corde! 49 | 50 | 1. Dolentem capi parte rostro alvum habentem pudor 51 | 2. Fulgentia sanguine paret 52 | 3. E punior consurgit lentus 53 | 4. Vox hasta eras micantes 54 | 55 | ## Facibus pharetrae indetonsusque indulsit sic incurrite foliis 56 | 57 | Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ 58 | Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e 59 | at ademptae, mira. 60 | 61 | direct *= font(inputScareware(sliHome), crossplatform.byte( 62 | ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, 63 | floating_speakers.media_printer(us, yahoo, primaryPhp))); 64 | friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); 65 | if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { 66 | adf -= operation_cdma_samba; 67 | imapGif.switch += torrent; 68 | } else { 69 | pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); 70 | ajax_service += grayscalePythonLock; 71 | google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; 72 | } 73 | drive_rw = zipTftp; 74 | var suffix = software_router_extension.dimm_ddr(-5, 75 | kernel_digital_minisite); 76 | 77 | Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam 78 | tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis 79 | innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? 80 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content.ru/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Введение 3 | type: docs 4 | --- 5 | 6 | # Стартовая страница на русском языке 7 | 8 | {{< columns >}} 9 | ## Astris ipse furtiva 10 | 11 | Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut 12 | olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis, 13 | modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies 14 | 15 | <---> 16 | 17 | ## Suis quot vota 18 | 19 | Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat: 20 | miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod 21 | nunc! Fragosis suae dextra geruntur functus vulgata. 22 | {{< /columns >}} 23 | 24 | 25 | ## Tempora nisi nunc 26 | 27 | Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei, 28 | tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis 29 | sequens! 30 | 31 | var panel = ram_design; 32 | if (backup + system) { 33 | file.readPoint = network_native; 34 | sidebar_engine_device(cell_tftp_raster, 35 | dual_login_paper.adf_vci.application_reader_design( 36 | graphicsNvramCdma, lpi_footer_snmp, integer_model)); 37 | } 38 | public_keyboard_docking += error.controller_gibibyte_plug.ip(4, 39 | asciiPetaflops, software(supercomputer_compatible_status + 4)); 40 | dynamic_disk.indexModeLaptop = bufferTftpReality; 41 | var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj( 42 | -1, toolbar_powerpoint_query, -2 / multiprocessing_impression); 43 | 44 | ## Locis suis novi cum suoque decidit eadem 45 | 46 | Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes 47 | versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota 48 | macies domoque caelestia cadit tantummodo scelus procul, corde! 49 | 50 | 1. Dolentem capi parte rostro alvum habentem pudor 51 | 2. Fulgentia sanguine paret 52 | 3. E punior consurgit lentus 53 | 4. Vox hasta eras micantes 54 | 55 | ## Facibus pharetrae indetonsusque indulsit sic incurrite foliis 56 | 57 | Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_ 58 | Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e 59 | at ademptae, mira. 60 | 61 | direct *= font(inputScareware(sliHome), crossplatform.byte( 62 | ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual, 63 | floating_speakers.media_printer(us, yahoo, primaryPhp))); 64 | friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored); 65 | if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) { 66 | adf -= operation_cdma_samba; 67 | imapGif.switch += torrent; 68 | } else { 69 | pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram); 70 | ajax_service += grayscalePythonLock; 71 | google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1; 72 | } 73 | drive_rw = zipTftp; 74 | var suffix = software_router_extension.dimm_ddr(-5, 75 | kernel_digital_minisite); 76 | 77 | Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam 78 | tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis 79 | innumeris miraturus amplectique collo sustinet quemque! Litora ante turba? 80 | -------------------------------------------------------------------------------- /themes/hugo-book/static/katex/auto-render.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n 51 | # Github uses 'commit', Bitbucket uses 'commits' 52 | # BookCommitPath = 'commit' 53 | 54 | # Enable "Edit this page" links for 'doc' page type. 55 | # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. 56 | # Edit path must point to root directory of repo. 57 | BookEditPath = '' 58 | 59 | # Configure the date format used on the pages 60 | # - In git information 61 | # - In blog posts 62 | BookDateFormat = 'January 2, 2006' 63 | 64 | # (Optional, default true) Enables search function with flexsearch, 65 | # Index is built on fly, therefore it might slowdown your website. 66 | # Configuration for indexing can be adjusted in i18n folder per language. 67 | BookSearch = true 68 | 69 | # (Optional, default true) Enables comments template on pages 70 | # By default partals/docs/comments.html includes Disqus template 71 | # See https://gohugo.io/content-management/comments/#configure-disqus 72 | # Can be overwritten by same param in page frontmatter 73 | BookComments = true 74 | 75 | # /!\ This is an experimental feature, might be removed or changed at any time 76 | # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. 77 | # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode 78 | # Theme will print warning if page referenced in markdown does not exists. 79 | BookPortableLinks = true 80 | 81 | # /!\ This is an experimental feature, might be removed or changed at any time 82 | # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. 83 | # BookServiceWorker = true 84 | 85 | # /!\ This is an experimental feature, might be removed or changed at any time 86 | # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. 87 | BookTranslatedOnly = false 88 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_markdown.scss: -------------------------------------------------------------------------------- 1 | @import "variables"; 2 | 3 | .markdown { 4 | line-height: 1.6; 5 | 6 | // remove padding at the beginning of page 7 | > :first-child { 8 | margin-top: 0; 9 | } 10 | 11 | h1, 12 | h2, 13 | h3, 14 | h4, 15 | h5, 16 | h6 { 17 | font-weight: normal; 18 | line-height: 1; 19 | margin-top: 1.5em; 20 | margin-bottom: $padding-16; 21 | 22 | a.anchor { 23 | opacity: 0; 24 | font-size: 0.75em; 25 | vertical-align: middle; 26 | text-decoration: none; 27 | } 28 | 29 | &:hover a.anchor, 30 | a.anchor:focus { 31 | opacity: initial; 32 | } 33 | } 34 | 35 | h4, 36 | h5, 37 | h6 { 38 | font-weight: bolder; 39 | } 40 | 41 | h5 { 42 | font-size: 0.875em; 43 | } 44 | 45 | h6 { 46 | font-size: 0.75em; 47 | } 48 | 49 | b, 50 | optgroup, 51 | strong { 52 | font-weight: bolder; 53 | } 54 | 55 | a { 56 | text-decoration: none; 57 | 58 | &:hover { 59 | text-decoration: underline; 60 | } 61 | &:visited { 62 | color: var(--color-visited-link); 63 | } 64 | } 65 | 66 | img { 67 | max-width: 100%; 68 | height: auto; 69 | } 70 | 71 | code { 72 | direction: ltr; 73 | unicode-bidi: embed; 74 | padding: 0 $padding-4; 75 | background: var(--gray-200); 76 | border-radius: $border-radius; 77 | font-size: 0.875em; 78 | } 79 | 80 | pre { 81 | direction: ltr; 82 | unicode-bidi: embed; 83 | padding: $padding-16; 84 | background: var(--gray-100); 85 | border-radius: $border-radius; 86 | overflow-x: auto; 87 | 88 | code { 89 | padding: 0; 90 | background: none; 91 | } 92 | } 93 | 94 | p { 95 | word-wrap: break-word; 96 | } 97 | 98 | blockquote { 99 | margin: $padding-16 0; 100 | padding: $padding-8 $padding-16 $padding-8 ($padding-16 - $padding-4); //to keep total left space 16dp 101 | 102 | border-inline-start: $padding-4 solid var(--gray-200); 103 | border-radius: $border-radius; 104 | 105 | :first-child { 106 | margin-top: 0; 107 | } 108 | :last-child { 109 | margin-bottom: 0; 110 | } 111 | } 112 | 113 | table { 114 | overflow: auto; 115 | display: block; 116 | border-spacing: 0; 117 | border-collapse: collapse; 118 | margin-top: $padding-16; 119 | margin-bottom: $padding-16; 120 | 121 | tr th, 122 | tr td { 123 | padding: $padding-8 $padding-16; 124 | border: $padding-1 solid var(--gray-200); 125 | } 126 | 127 | tr:nth-child(2n) { 128 | background: var(--gray-100); 129 | } 130 | } 131 | 132 | hr { 133 | height: $padding-1; 134 | border: none; 135 | background: var(--gray-200); 136 | } 137 | 138 | ul, 139 | ol { 140 | padding-inline-start: $padding-16 * 2; 141 | word-wrap: break-word; 142 | } 143 | 144 | dl { 145 | dt { 146 | font-weight: bolder; 147 | margin-top: $padding-16; 148 | } 149 | 150 | dd { 151 | margin-inline-start: 0; 152 | margin-bottom: $padding-16; 153 | } 154 | } 155 | 156 | // Special case for highlighted code with line numbers 157 | .highlight { 158 | direction: ltr; 159 | unicode-bidi: embed; 160 | } 161 | 162 | .highlight table tr { 163 | td:nth-child(1) pre { 164 | margin: 0; 165 | padding-inline-end: 0; 166 | } 167 | td:nth-child(2) pre { 168 | margin: 0; 169 | padding-inline-start: 0; 170 | } 171 | } 172 | 173 | details { 174 | padding: $padding-16; 175 | border: $padding-1 solid var(--gray-200); 176 | border-radius: $border-radius; 177 | 178 | summary { 179 | line-height: 1; 180 | padding: $padding-16; 181 | margin: -$padding-16; 182 | cursor: pointer; 183 | } 184 | 185 | &[open] summary { 186 | margin-bottom: 0; 187 | } 188 | } 189 | 190 | figure { 191 | margin: $padding-16 0; 192 | figcaption p { 193 | margin-top: 0; 194 | } 195 | } 196 | } 197 | 198 | .markdown-inner { 199 | // Util class to remove extra margin in nested markdown content 200 | > :first-child { 201 | margin-top: 0; 202 | } 203 | > :last-child { 204 | margin-bottom: 0; 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /content/docs/use-cases/federated-data-access-layer.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Federated Data Access Layer 3 | --- 4 | 5 | # Federated Data Access Layer 6 | 7 | A federated data access layer (FDAL) is a data access layer that allows flexible and secure access to multiple, independently governed data sources. 8 | 9 | ## Typical consumers 10 | 11 | FDAL consumers range from consumers that need low-latency, high-concurrency access to realtime data to consumers that need access to analytical data. 12 | 13 | - Experience layer products & microservices 14 | - BFFs - Backend for frontends 15 | - Internal products & services - reporting, BI etc. 16 | - 3rd party developers 17 | - Emerging: LLMs, AI applications 18 | 19 | ![Federated data access layer consumers](https://github.com/hasura/supergraph-io/assets/131160/a1056635-3f45-4a7a-aac1-b1f4bf5a6e39) 20 | 21 | ## Benefits of a FDAL 22 | 23 | 1. **Decrease cost, retire legacy / redundant technology and increase efficiency:** 24 | - Avoid moving data around across multiple platforms and layers - especially premature ETL 25 | - Create data consistency and quality controls 26 | - Prevent data duplication 27 | 2. **Improve compliance and governance:** 28 | - Enforce a consistent, and if required, a centralized authorization model 29 | - Realtime data access: Provide access to data as soon as it is created 30 | - Create a standardized API for different types of workloads 31 | 3. **Improve productivity and collaboration:** 32 | - Provide a stable API to decouple storage layer & physical modelling from domain modelling 33 | - Provide an operating model to incorporate cross-domain business logic, often referred to as the "process layer" or "orchestration layer" 34 | - Codify performance & stability expectations as SLAs 35 | - Incoporate marketplace dynamics: usage analytics and producer / consumer collaboration to drive improvements in the underlying data sources 36 | 37 | ## Supergraph platform checklist 38 | 39 | There are 6 key aspects to building a federated data access layer with a supergraph reference architecture. 40 | A supergraph platform and its technology stack must 41 | support the following capabilities in order to help create a federated data access layer. 42 | 43 | ### I. Unified semantic model 44 | 45 | A unified semantic model to understand the various entities in the supergraph (resources, business methods, authorization policies). 46 | 47 | ### II. Data modelling & business logic 48 | 49 | Subgraph connectors should allow domain or API modelling by leveraging the language of the underlying data-source, while allowing the addition of business logic to handle transformation, validation & authorization. 50 | 51 | This ensures subgraphs are "thin" in that its performance characteristics are determined by that of the underlying data source in highly predictable ways. 52 | This also allows subgraphs to be "thick" enough to incorporate the required business logic to expose stable domain concepts. 53 | 54 | ### III. Authorization 55 | 56 | An authorization policy engine that supports: 57 | - Rule / policy composition 58 | - Field (column) level visbility 59 | - Entity (row) level access control 60 | - Optimized integration with data fetching (eg: projection & predicate push-down) 61 | 62 | ### IV. API design 63 | 64 | A standardized API design that can handle (domain driven): 65 | 1. Querying resources & invoking business methods 66 | 2. Filtering, sorting, pagination & aggregation operations on resources 67 | 3. Conventions for relational, event, KV and graph workloads 68 | 69 | Aggregation & orchestration layer API needs like (consumer driven): 70 | 1. Joining data 71 | 2. Nested filtering, sorting pagination & aggregations 72 | 3. Orchestration business logic that requires querying resources or invoking methods across multiple domains 73 | 74 | ### V. Performance & observability 75 | 76 | Query planning: 77 | 1. Visiblity / explainability in lower environments (development, staging) 78 | 2. Tracing in production 79 | 3. Data source specific optimizations to reduce load on the upstream data source 80 | 81 | Latency tax: 82 | 1. Measure and optimize added latency on top of the underlying data source 83 | 84 | ### VI. Federated ownership 85 | 86 | - Independent CI/CD for domain (data source) owners 87 | - Composability (aggregation, orchestration) across domains 88 | - Analytics & collaboration tooling for producers and consumers 89 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/hugo.yaml: -------------------------------------------------------------------------------- 1 | # hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/ 2 | 3 | baseURL: https://example.com/ 4 | title: Hugo Book 5 | theme: hugo-book 6 | 7 | # Book configuration 8 | disablePathToLower: true 9 | enableGitInfo: true 10 | 11 | # Needed for mermaid/katex shortcodes 12 | markup: 13 | goldmark: 14 | renderer: 15 | unsafe: true 16 | tableOfContents: 17 | startLevel: 1 18 | 19 | # Multi-lingual mode config 20 | # There are different options to translate files 21 | # See https://gohugo.io/content-management/multilingual/#translation-by-filename 22 | # And https://gohugo.io/content-management/multilingual/#translation-by-content-directory 23 | languages: 24 | en: 25 | languageName: English 26 | contentDir: content.en 27 | weight: 1 28 | ru: 29 | languageName: Russian 30 | contentDir: content.ru 31 | weight: 2 32 | zh: 33 | languageName: Chinese 34 | contentDir: content.zh 35 | weight: 3 36 | 37 | menu: 38 | # before: [] 39 | after: 40 | - name: "Github" 41 | url: "https://github.com/alex-shpak/hugo-book" 42 | weight: 10 43 | - name: "Hugo Themes" 44 | url: "https://themes.gohugo.io/themes/hugo-book/" 45 | weight: 20 46 | 47 | params: 48 | # (Optional, default light) Sets color theme: light, dark or auto. 49 | # Theme 'auto' switches between dark and light modes based on browser/os preferences 50 | BookTheme: "light" 51 | 52 | # (Optional, default true) Controls table of contents visibility on right side of pages. 53 | # Start and end levels can be controlled with markup.tableOfContents setting. 54 | # You can also specify this parameter per page in front matter. 55 | BookToC: true 56 | 57 | # (Optional, default favicon.png) Set the path to a favicon file. 58 | # If the favicon is /static/favicon.png then the path would be favicon.png 59 | # BookFavicon: "favicon.png" 60 | 61 | # (Optional, default none) Set the path to a logo for the book. 62 | # If the logo is /static/logo.png then the path would be logo.png 63 | # BookLogo: /logo.png 64 | 65 | # (Optional, default none) Set leaf bundle to render as side menu 66 | # When not specified file structure and weights will be used 67 | # BookMenuBundle: /menu 68 | 69 | # (Optional, default docs) Specify root page to render child pages as menu. 70 | # Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/ 71 | # For backward compatibility you can set '*' to render all sections to menu. Acts same as '/' 72 | BookSection: docs 73 | 74 | # Set source repository location. 75 | # Used for 'Last Modified' and 'Edit this page' links. 76 | BookRepo: https://github.com/alex-shpak/hugo-book 77 | 78 | # (Optional, default 'commit') Specifies commit portion of the link to the page's last modified 79 | # commit hash for 'doc' page type. 80 | # Requires 'BookRepo' param. 81 | # Value used to construct a URL consisting of BookRepo/BookCommitPath/ 82 | # Github uses 'commit', Bitbucket uses 'commits' 83 | # BookCommitPath: commit 84 | 85 | # Enable "Edit this page" links for 'doc' page type. 86 | # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. 87 | # Edit path must point to root directory of repo. 88 | BookEditPath: edit/main/exampleSite 89 | 90 | # Configure the date format used on the pages 91 | # - In git information 92 | # - In blog posts 93 | BookDateFormat: "January 2, 2006" 94 | 95 | # (Optional, default true) Enables search function with flexsearch, 96 | # Index is built on fly, therefore it might slowdown your website. 97 | # Configuration for indexing can be adjusted in i18n folder per language. 98 | BookSearch: true 99 | 100 | # (Optional, default true) Enables comments template on pages 101 | # By default partals/docs/comments.html includes Disqus template 102 | # See https://gohugo.io/content-management/comments/#configure-disqus 103 | # Can be overwritten by same param in page frontmatter 104 | BookComments: true 105 | 106 | # /!\ This is an experimental feature, might be removed or changed at any time 107 | # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. 108 | # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode 109 | # Theme will print warning if page referenced in markdown does not exists. 110 | BookPortableLinks: true 111 | 112 | # /!\ This is an experimental feature, might be removed or changed at any time 113 | # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. 114 | BookServiceWorker: true 115 | 116 | # /!\ This is an experimental feature, might be removed or changed at any time 117 | # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. 118 | BookTranslatedOnly: false 119 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/hugo.toml: -------------------------------------------------------------------------------- 1 | # hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/ 2 | 3 | baseURL = 'https://example.com/' 4 | title = 'Hugo Book' 5 | theme = 'hugo-book' 6 | 7 | # Book configuration 8 | disablePathToLower = true 9 | enableGitInfo = true 10 | 11 | # Needed for mermaid/katex shortcodes 12 | [markup] 13 | [markup.goldmark.renderer] 14 | unsafe = true 15 | 16 | [markup.tableOfContents] 17 | startLevel = 1 18 | 19 | # Multi-lingual mode config 20 | # There are different options to translate files 21 | # See https://gohugo.io/content-management/multilingual/#translation-by-filename 22 | # And https://gohugo.io/content-management/multilingual/#translation-by-content-directory 23 | [languages] 24 | [languages.en] 25 | languageName = 'English' 26 | contentDir = 'content.en' 27 | weight = 1 28 | 29 | [languages.ru] 30 | languageName = 'Russian' 31 | contentDir = 'content.ru' 32 | weight = 2 33 | 34 | [languages.zh] 35 | languageName = 'Chinese' 36 | contentDir = 'content.zh' 37 | weight = 3 38 | 39 | [menu] 40 | # [[menu.before]] 41 | [[menu.after]] 42 | name = "Github" 43 | url = "https://github.com/alex-shpak/hugo-book" 44 | weight = 10 45 | 46 | [[menu.after]] 47 | name = "Hugo Themes" 48 | url = "https://themes.gohugo.io/themes/hugo-book/" 49 | weight = 20 50 | 51 | [params] 52 | # (Optional, default light) Sets color theme: light, dark or auto. 53 | # Theme 'auto' switches between dark and light modes based on browser/os preferences 54 | BookTheme = 'light' 55 | 56 | # (Optional, default true) Controls table of contents visibility on right side of pages. 57 | # Start and end levels can be controlled with markup.tableOfContents setting. 58 | # You can also specify this parameter per page in front matter. 59 | BookToC = true 60 | 61 | # (Optional, default favicon.png) Set the path to a favicon file. 62 | # If the favicon is /static/favicon.png then the path would be favicon.png 63 | # BookFavicon = 'favicon.png' 64 | 65 | # (Optional, default none) Set the path to a logo for the book. 66 | # If the logo is /static/logo.png then the path would be logo.png 67 | # BookLogo = 'logo.png' 68 | 69 | # (Optional, default none) Set leaf bundle to render as side menu 70 | # When not specified file structure and weights will be used 71 | # BookMenuBundle = '/menu' 72 | 73 | # (Optional, default docs) Specify root page to render child pages as menu. 74 | # Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/ 75 | # For backward compatibility you can set '*' to render all sections to menu. Acts same as '/' 76 | BookSection = 'docs' 77 | 78 | # Set source repository location. 79 | # Used for 'Last Modified' and 'Edit this page' links. 80 | BookRepo = 'https://github.com/alex-shpak/hugo-book' 81 | 82 | # (Optional, default 'commit') Specifies commit portion of the link to the page's last modified 83 | # commit hash for 'doc' page type. 84 | # Requires 'BookRepo' param. 85 | # Value used to construct a URL consisting of BookRepo/BookCommitPath/ 86 | # Github uses 'commit', Bitbucket uses 'commits' 87 | # BookCommitPath = 'commit' 88 | 89 | # Enable "Edit this page" links for 'doc' page type. 90 | # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. 91 | # Edit path must point to root directory of repo. 92 | BookEditPath = 'edit/main/exampleSite' 93 | 94 | # Configure the date format used on the pages 95 | # - In git information 96 | # - In blog posts 97 | BookDateFormat = 'January 2, 2006' 98 | 99 | # (Optional, default true) Enables search function with flexsearch, 100 | # Index is built on fly, therefore it might slowdown your website. 101 | # Configuration for indexing can be adjusted in i18n folder per language. 102 | BookSearch = true 103 | 104 | # (Optional, default true) Enables comments template on pages 105 | # By default partals/docs/comments.html includes Disqus template 106 | # See https://gohugo.io/content-management/comments/#configure-disqus 107 | # Can be overwritten by same param in page frontmatter 108 | BookComments = true 109 | 110 | # /!\ This is an experimental feature, might be removed or changed at any time 111 | # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. 112 | # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode 113 | # Theme will print warning if page referenced in markdown does not exists. 114 | BookPortableLinks = true 115 | 116 | # /!\ This is an experimental feature, might be removed or changed at any time 117 | # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. 118 | BookServiceWorker = true 119 | 120 | # /!\ This is an experimental feature, might be removed or changed at any time 121 | # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. 122 | BookTranslatedOnly = false 123 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/_main.scss: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: $font-size-base; 3 | scroll-behavior: smooth; 4 | touch-action: manipulation; 5 | } 6 | 7 | body { 8 | min-width: $body-min-width; 9 | color: var(--body-font-color); 10 | background: var(--body-background); 11 | 12 | letter-spacing: 0.33px; 13 | font-weight: $body-font-weight; 14 | text-rendering: optimizeLegibility; 15 | -webkit-font-smoothing: antialiased; 16 | -moz-osx-font-smoothing: grayscale; 17 | 18 | box-sizing: border-box; 19 | * { 20 | box-sizing: inherit; 21 | } 22 | } 23 | 24 | h1, 25 | h2, 26 | h3, 27 | h4, 28 | h5 { 29 | font-weight: $body-font-weight; 30 | } 31 | 32 | a { 33 | text-decoration: none; 34 | color: var(--color-link); 35 | } 36 | 37 | img { 38 | vertical-align: baseline; 39 | } 40 | 41 | :focus { 42 | @include outline; 43 | } 44 | 45 | aside nav ul { 46 | padding: 0; 47 | margin: 0; 48 | list-style: none; 49 | 50 | li { 51 | margin: 1em 0; 52 | position: relative; 53 | } 54 | 55 | a { 56 | display: block; 57 | } 58 | 59 | a:hover { 60 | opacity: 0.5; 61 | } 62 | 63 | ul { 64 | padding-inline-start: $padding-16; 65 | } 66 | } 67 | 68 | ul.pagination { 69 | display: flex; 70 | justify-content: center; 71 | list-style-type: none; 72 | padding-inline-start: 0px; 73 | 74 | .page-item a { 75 | padding: $padding-16; 76 | } 77 | } 78 | 79 | .container { 80 | max-width: $container-max-width; 81 | margin: 0 auto; 82 | } 83 | 84 | .book-icon { 85 | filter: var(--icon-filter); 86 | } 87 | 88 | .book-brand { 89 | margin-top: 0; 90 | margin-bottom: $padding-16; 91 | 92 | img { 93 | height: 1.5em; 94 | width: 1.5em; 95 | margin-inline-end: $padding-8; 96 | } 97 | } 98 | 99 | .book-menu { 100 | flex: 0 0 $menu-width; 101 | font-size: $font-size-14; 102 | 103 | .book-menu-content { 104 | width: $menu-width; 105 | padding: $padding-16; 106 | background: var(--body-background); 107 | 108 | @include fixed; 109 | } 110 | 111 | a, 112 | label { 113 | color: inherit; 114 | cursor: pointer; 115 | word-wrap: break-word; 116 | } 117 | 118 | a.active { 119 | color: var(--color-link); 120 | } 121 | 122 | input.toggle + label + ul { 123 | display: none; 124 | } 125 | 126 | input.toggle:checked + label + ul { 127 | display: block; 128 | } 129 | 130 | input.toggle + label::after { 131 | content: "▸"; 132 | } 133 | 134 | input.toggle:checked + label::after { 135 | content: "▾"; 136 | } 137 | } 138 | 139 | // for RTL support 140 | body[dir="rtl"] .book-menu { 141 | input.toggle + label::after { 142 | content: "◂"; 143 | } 144 | 145 | input.toggle:checked + label::after { 146 | content: "▾"; 147 | } 148 | } 149 | 150 | .book-section-flat { 151 | margin: $padding-16 * 2 0; 152 | 153 | > a, 154 | > span, 155 | > label { 156 | font-weight: bolder; 157 | } 158 | 159 | > ul { 160 | padding-inline-start: 0; 161 | } 162 | } 163 | 164 | .book-page { 165 | min-width: $body-min-width; 166 | flex-grow: 1; 167 | padding: $padding-16; 168 | } 169 | 170 | .book-post { 171 | margin-bottom: $padding-16 * 3; 172 | } 173 | 174 | .book-header { 175 | display: none; 176 | margin-bottom: $padding-16; 177 | 178 | label { 179 | line-height: 0; 180 | } 181 | 182 | img.book-icon { 183 | height: 1.5em; 184 | width: 1.5em; 185 | } 186 | } 187 | 188 | .book-search { 189 | position: relative; 190 | margin: $padding-16 0; 191 | border-bottom: 1px solid transparent; 192 | 193 | input { 194 | width: 100%; 195 | padding: $padding-8; 196 | 197 | border: 0; 198 | border-radius: $border-radius; 199 | 200 | background: var(--gray-100); 201 | color: var(--body-font-color); 202 | 203 | &:required + .book-search-spinner { 204 | display: block; 205 | } 206 | } 207 | 208 | .book-search-spinner { 209 | position: absolute; 210 | top: 0; 211 | margin: $padding-8; 212 | margin-inline-start: calc(100% - #{$padding-16 + $padding-8}); 213 | 214 | width: $padding-16; 215 | height: $padding-16; 216 | 217 | border: $padding-1 solid transparent; 218 | border-top-color: var(--body-font-color); 219 | border-radius: 50%; 220 | 221 | @include spin(1s); 222 | } 223 | 224 | small { 225 | opacity: 0.5; 226 | } 227 | } 228 | 229 | .book-toc { 230 | flex: 0 0 $toc-width; 231 | font-size: $font-size-12; 232 | 233 | .book-toc-content { 234 | width: $toc-width; 235 | padding: $padding-16; 236 | 237 | @include fixed; 238 | } 239 | 240 | img { 241 | height: 1em; 242 | width: 1em; 243 | } 244 | 245 | nav > ul > li:first-child { 246 | margin-top: 0; 247 | } 248 | } 249 | 250 | .book-footer { 251 | padding-top: $padding-16; 252 | font-size: $font-size-14; 253 | 254 | img { 255 | height: 1em; 256 | width: 1em; 257 | margin-inline-end: $padding-8; 258 | } 259 | } 260 | 261 | .book-comments { 262 | margin-top: $padding-16; 263 | } 264 | 265 | .book-languages { 266 | margin-block-end: $padding-16 * 2; 267 | 268 | .book-icon { 269 | height: 1em; 270 | width: 1em; 271 | margin-inline-end: .5em; 272 | } 273 | 274 | ul { 275 | padding-inline-start: 1.5em; 276 | } 277 | } 278 | 279 | // Responsive styles 280 | .book-menu-content, 281 | .book-toc-content, 282 | .book-page, 283 | .book-header aside, 284 | .markdown { 285 | transition: 0.2s ease-in-out; 286 | transition-property: transform, margin, opacity, visibility; 287 | will-change: transform, margin, opacity; 288 | } 289 | 290 | @media screen and (max-width: $mobile-breakpoint) { 291 | #menu-control, 292 | #toc-control { 293 | display: inline; 294 | } 295 | 296 | .book-menu { 297 | visibility: hidden; 298 | margin-inline-start: -$menu-width; 299 | font-size: $font-size-base; 300 | z-index: 1; 301 | } 302 | 303 | .book-toc { 304 | display: none; 305 | } 306 | 307 | .book-header { 308 | display: block; 309 | } 310 | 311 | #menu-control:focus ~ main label[for="menu-control"] { 312 | @include outline; 313 | } 314 | 315 | #menu-control:checked ~ main { 316 | .book-menu { 317 | visibility: initial; 318 | } 319 | 320 | .book-menu .book-menu-content { 321 | transform: translateX($menu-width); 322 | box-shadow: 0 0 $padding-8 rgba(0, 0, 0, 0.1); 323 | } 324 | 325 | .book-page { 326 | opacity: 0.25; 327 | } 328 | 329 | .book-menu-overlay { 330 | display: block; 331 | position: absolute; 332 | top: 0; 333 | bottom: 0; 334 | left: 0; 335 | right: 0; 336 | } 337 | } 338 | 339 | #toc-control:focus ~ main label[for="toc-control"] { 340 | @include outline; 341 | } 342 | 343 | #toc-control:checked ~ main { 344 | .book-header aside { 345 | display: block; 346 | } 347 | } 348 | 349 | // for RTL support 350 | body[dir="rtl"] #menu-control:checked ~ main { 351 | .book-menu .book-menu-content { 352 | transform: translateX(-$menu-width); 353 | } 354 | } 355 | } 356 | 357 | // Extra space for big screens 358 | @media screen and (min-width: $container-max-width) { 359 | .book-page, 360 | .book-menu .book-menu-content, 361 | .book-toc .book-toc-content { 362 | padding: $padding-16 * 2 $padding-16; 363 | } 364 | } 365 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/posts/migrate-from-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2014-03-10 3 | linktitle: Migrating from Jekyll 4 | menu: 5 | main: 6 | parent: tutorials 7 | prev: /tutorials/mathjax 8 | title: Migrate to Hugo from Jekyll 9 | weight: 10 10 | --- 11 | 12 | ## Move static content to `static` 13 | Jekyll has a rule that any directory not starting with `_` will be copied as-is to the `_site` output. Hugo keeps all static content under `static`. You should therefore move it all there. 14 | With Jekyll, something that looked like 15 | 16 | ▾ / 17 | ▾ images/ 18 | logo.png 19 | 20 | should become 21 | 22 | ▾ / 23 | ▾ static/ 24 | ▾ images/ 25 | logo.png 26 | 27 | Additionally, you'll want any files that should reside at the root (such as `CNAME`) to be moved to `static`. 28 | 29 | ## Create your Hugo configuration file 30 | Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the [Hugo configuration documentation](/overview/configuration/) for details. 31 | 32 | ## Set your configuration publish folder to `_site` 33 | The default is for Jekyll to publish to `_site` and for Hugo to publish to `public`. If, like me, you have [`_site` mapped to a git submodule on the `gh-pages` branch](http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html), you'll want to do one of two alternatives: 34 | 35 | 1. Change your submodule to point to map `gh-pages` to public instead of `_site` (recommended). 36 | 37 | git submodule deinit _site 38 | git rm _site 39 | git submodule add -b gh-pages git@github.com:your-username/your-repo.git public 40 | 41 | 2. Or, change the Hugo configuration to use `_site` instead of `public`. 42 | 43 | { 44 | .. 45 | "publishdir": "_site", 46 | .. 47 | } 48 | 49 | ## Convert Jekyll templates to Hugo templates 50 | That's the bulk of the work right here. The documentation is your friend. You should refer to [Jekyll's template documentation](http://jekyllrb.com/docs/templates/) if you need to refresh your memory on how you built your blog and [Hugo's template](/layout/templates/) to learn Hugo's way. 51 | 52 | As a single reference data point, converting my templates for [heyitsalex.net](http://heyitsalex.net/) took me no more than a few hours. 53 | 54 | ## Convert Jekyll plugins to Hugo shortcodes 55 | Jekyll has [plugins](http://jekyllrb.com/docs/plugins/); Hugo has [shortcodes](/doc/shortcodes/). It's fairly trivial to do a port. 56 | 57 | ### Implementation 58 | As an example, I was using a custom [`image_tag`](https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb) plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing. 59 | 60 | Jekyll's plugin: 61 | 62 | module Jekyll 63 | class ImageTag < Liquid::Tag 64 | @url = nil 65 | @caption = nil 66 | @class = nil 67 | @link = nil 68 | // Patterns 69 | IMAGE_URL_WITH_CLASS_AND_CAPTION = 70 | IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i 71 | IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i 72 | IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i 73 | IMAGE_URL = /((https?:\/\/|\/)(\S+))/i 74 | def initialize(tag_name, markup, tokens) 75 | super 76 | if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK 77 | @class = $1 78 | @url = $3 79 | @caption = $7 80 | @link = $9 81 | elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION 82 | @class = $1 83 | @url = $3 84 | @caption = $7 85 | elsif markup =~ IMAGE_URL_WITH_CAPTION 86 | @url = $1 87 | @caption = $5 88 | elsif markup =~ IMAGE_URL_WITH_CLASS 89 | @class = $1 90 | @url = $3 91 | elsif markup =~ IMAGE_URL 92 | @url = $1 93 | end 94 | end 95 | def render(context) 96 | if @class 97 | source = "
    " 98 | else 99 | source = "
    " 100 | end 101 | if @link 102 | source += "" 103 | end 104 | source += "" 105 | if @link 106 | source += "" 107 | end 108 | source += "
    #{@caption}
    " if @caption 109 | source += "
    " 110 | source 111 | end 112 | end 113 | end 114 | Liquid::Template.register_tag('image', Jekyll::ImageTag) 115 | 116 | is written as this Hugo shortcode: 117 | 118 | 119 |
    120 | {{ with .Get "link"}}{{ end }} 121 | 122 | {{ if .Get "link"}}{{ end }} 123 | {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} 124 |
    {{ if isset .Params "title" }} 125 | {{ .Get "title" }}{{ end }} 126 | {{ if or (.Get "caption") (.Get "attr")}}

    127 | {{ .Get "caption" }} 128 | {{ with .Get "attrlink"}} {{ end }} 129 | {{ .Get "attr" }} 130 | {{ if .Get "attrlink"}} {{ end }} 131 |

    {{ end }} 132 |
    133 | {{ end }} 134 |
    135 | 136 | 137 | ### Usage 138 | I simply changed: 139 | 140 | {% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} 141 | 142 | to this (this example uses a slightly extended version named `fig`, different than the built-in `figure`): 143 | 144 | {{%/* fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" */%}} 145 | 146 | As a bonus, the shortcode named parameters are, arguably, more readable. 147 | 148 | ## Finishing touches 149 | ### Fix content 150 | Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that `hugo server --watch` is your friend. Test your changes and fix errors as needed. 151 | 152 | ### Clean up 153 | You'll want to remove the Jekyll configuration at this point. If you have anything else that isn't used, delete it. 154 | 155 | ## A practical example in a diff 156 | [Hey, it's Alex](http://heyitsalex.net/) was migrated in less than a _father-with-kids day_ from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this [diff](https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610). 157 | -------------------------------------------------------------------------------- /themes/hugo-book/assets/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html { 12 | line-height: 1.15; /* 1 */ 13 | -webkit-text-size-adjust: 100%; /* 2 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers. 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Render the `main` element consistently in IE. 29 | */ 30 | 31 | main { 32 | display: block; 33 | } 34 | 35 | /** 36 | * Correct the font size and margin on `h1` elements within `section` and 37 | * `article` contexts in Chrome, Firefox, and Safari. 38 | */ 39 | 40 | h1 { 41 | font-size: 2em; 42 | margin: 0.67em 0; 43 | } 44 | 45 | /* Grouping content 46 | ========================================================================== */ 47 | 48 | /** 49 | * 1. Add the correct box sizing in Firefox. 50 | * 2. Show the overflow in Edge and IE. 51 | */ 52 | 53 | hr { 54 | box-sizing: content-box; /* 1 */ 55 | height: 0; /* 1 */ 56 | overflow: visible; /* 2 */ 57 | } 58 | 59 | /** 60 | * 1. Correct the inheritance and scaling of font size in all browsers. 61 | * 2. Correct the odd `em` font sizing in all browsers. 62 | */ 63 | 64 | pre { 65 | font-family: monospace, monospace; /* 1 */ 66 | font-size: 1em; /* 2 */ 67 | } 68 | 69 | /* Text-level semantics 70 | ========================================================================== */ 71 | 72 | /** 73 | * Remove the gray background on active links in IE 10. 74 | */ 75 | 76 | a { 77 | background-color: transparent; 78 | } 79 | 80 | /** 81 | * 1. Remove the bottom border in Chrome 57- 82 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 83 | */ 84 | 85 | abbr[title] { 86 | border-bottom: none; /* 1 */ 87 | text-decoration: underline; /* 2 */ 88 | text-decoration: underline dotted; /* 2 */ 89 | } 90 | 91 | /** 92 | * Add the correct font weight in Chrome, Edge, and Safari. 93 | */ 94 | 95 | b, 96 | strong { 97 | font-weight: bolder; 98 | } 99 | 100 | /** 101 | * 1. Correct the inheritance and scaling of font size in all browsers. 102 | * 2. Correct the odd `em` font sizing in all browsers. 103 | */ 104 | 105 | code, 106 | kbd, 107 | samp { 108 | font-family: monospace, monospace; /* 1 */ 109 | font-size: 1em; /* 2 */ 110 | } 111 | 112 | /** 113 | * Add the correct font size in all browsers. 114 | */ 115 | 116 | small { 117 | font-size: 80%; 118 | } 119 | 120 | /** 121 | * Prevent `sub` and `sup` elements from affecting the line height in 122 | * all browsers. 123 | */ 124 | 125 | sub, 126 | sup { 127 | font-size: 75%; 128 | line-height: 0; 129 | position: relative; 130 | vertical-align: baseline; 131 | } 132 | 133 | sub { 134 | bottom: -0.25em; 135 | } 136 | 137 | sup { 138 | top: -0.5em; 139 | } 140 | 141 | /* Embedded content 142 | ========================================================================== */ 143 | 144 | /** 145 | * Remove the border on images inside links in IE 10. 146 | */ 147 | 148 | img { 149 | border-style: none; 150 | } 151 | 152 | /* Forms 153 | ========================================================================== */ 154 | 155 | /** 156 | * 1. Change the font styles in all browsers. 157 | * 2. Remove the margin in Firefox and Safari. 158 | */ 159 | 160 | button, 161 | input, 162 | optgroup, 163 | select, 164 | textarea { 165 | font-family: inherit; /* 1 */ 166 | font-size: 100%; /* 1 */ 167 | line-height: 1.15; /* 1 */ 168 | margin: 0; /* 2 */ 169 | } 170 | 171 | /** 172 | * Show the overflow in IE. 173 | * 1. Show the overflow in Edge. 174 | */ 175 | 176 | button, 177 | input { /* 1 */ 178 | overflow: visible; 179 | } 180 | 181 | /** 182 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 183 | * 1. Remove the inheritance of text transform in Firefox. 184 | */ 185 | 186 | button, 187 | select { /* 1 */ 188 | text-transform: none; 189 | } 190 | 191 | /** 192 | * Correct the inability to style clickable types in iOS and Safari. 193 | */ 194 | 195 | button, 196 | [type="button"], 197 | [type="reset"], 198 | [type="submit"] { 199 | -webkit-appearance: button; 200 | } 201 | 202 | /** 203 | * Remove the inner border and padding in Firefox. 204 | */ 205 | 206 | button::-moz-focus-inner, 207 | [type="button"]::-moz-focus-inner, 208 | [type="reset"]::-moz-focus-inner, 209 | [type="submit"]::-moz-focus-inner { 210 | border-style: none; 211 | padding: 0; 212 | } 213 | 214 | /** 215 | * Restore the focus styles unset by the previous rule. 216 | */ 217 | 218 | button:-moz-focusring, 219 | [type="button"]:-moz-focusring, 220 | [type="reset"]:-moz-focusring, 221 | [type="submit"]:-moz-focusring { 222 | outline: 1px dotted ButtonText; 223 | } 224 | 225 | /** 226 | * Correct the padding in Firefox. 227 | */ 228 | 229 | fieldset { 230 | padding: 0.35em 0.75em 0.625em; 231 | } 232 | 233 | /** 234 | * 1. Correct the text wrapping in Edge and IE. 235 | * 2. Correct the color inheritance from `fieldset` elements in IE. 236 | * 3. Remove the padding so developers are not caught out when they zero out 237 | * `fieldset` elements in all browsers. 238 | */ 239 | 240 | legend { 241 | box-sizing: border-box; /* 1 */ 242 | color: inherit; /* 2 */ 243 | display: table; /* 1 */ 244 | max-width: 100%; /* 1 */ 245 | padding: 0; /* 3 */ 246 | white-space: normal; /* 1 */ 247 | } 248 | 249 | /** 250 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 251 | */ 252 | 253 | progress { 254 | vertical-align: baseline; 255 | } 256 | 257 | /** 258 | * Remove the default vertical scrollbar in IE 10+. 259 | */ 260 | 261 | textarea { 262 | overflow: auto; 263 | } 264 | 265 | /** 266 | * 1. Add the correct box sizing in IE 10. 267 | * 2. Remove the padding in IE 10. 268 | */ 269 | 270 | [type="checkbox"], 271 | [type="radio"] { 272 | box-sizing: border-box; /* 1 */ 273 | padding: 0; /* 2 */ 274 | } 275 | 276 | /** 277 | * Correct the cursor style of increment and decrement buttons in Chrome. 278 | */ 279 | 280 | [type="number"]::-webkit-inner-spin-button, 281 | [type="number"]::-webkit-outer-spin-button { 282 | height: auto; 283 | } 284 | 285 | /** 286 | * 1. Correct the odd appearance in Chrome and Safari. 287 | * 2. Correct the outline style in Safari. 288 | */ 289 | 290 | [type="search"] { 291 | -webkit-appearance: textfield; /* 1 */ 292 | outline-offset: -2px; /* 2 */ 293 | } 294 | 295 | /** 296 | * Remove the inner padding in Chrome and Safari on macOS. 297 | */ 298 | 299 | [type="search"]::-webkit-search-decoration { 300 | -webkit-appearance: none; 301 | } 302 | 303 | /** 304 | * 1. Correct the inability to style clickable types in iOS and Safari. 305 | * 2. Change font properties to `inherit` in Safari. 306 | */ 307 | 308 | ::-webkit-file-upload-button { 309 | -webkit-appearance: button; /* 1 */ 310 | font: inherit; /* 2 */ 311 | } 312 | 313 | /* Interactive 314 | ========================================================================== */ 315 | 316 | /* 317 | * Add the correct display in Edge, IE 10+, and Firefox. 318 | */ 319 | 320 | details { 321 | display: block; 322 | } 323 | 324 | /* 325 | * Add the correct display in all browsers. 326 | */ 327 | 328 | summary { 329 | display: list-item; 330 | } 331 | 332 | /* Misc 333 | ========================================================================== */ 334 | 335 | /** 336 | * Add the correct display in IE 10+. 337 | */ 338 | 339 | template { 340 | display: none; 341 | } 342 | 343 | /** 344 | * Add the correct display in IE 10. 345 | */ 346 | 347 | [hidden] { 348 | display: none; 349 | } 350 | -------------------------------------------------------------------------------- /content/docs/use-cases/api-composition.md: -------------------------------------------------------------------------------- 1 | # API Composition: API Integration, Aggregation & Orchestration 2 | 3 | We use the term API composition to encompass three main aspects of working with multiple API endpoints: integration, orchestration, and aggregation. 4 | 5 | A key driver for the Supergraph is the need for API composition. GraphQL (monolithic or federated) is a special case of this need. 6 | 7 | ## What is API composition & why is it hard? 8 | While domain owners (producers) are owners of a domain API, in a multi-consumer and multi-producer scenario, API consumers often also need specialized APIs that are optimized for their use cases. 9 | 10 | ![Screen Shot 2024-05-13 at 10 22 07 PM](https://github.com/hasura/supergraph-io/assets/131160/53f3de0c-1f35-4032-a63d-9c2602566073) 11 | 12 | This creates a tension between "domain-driven" API design and ownership and "consumer-driven" API design. 13 | 14 | | Design & Ownership | Benefits | Challenges | 15 | | ------------- | ------------- | ----- | 16 | | **Domain-driven** | Consistent, standardized API for multiple consumers | Not optimized for consumer needs | 17 | | **Consumer-driven** | Optimized for single consumer and can incorporate consumer-specific business logic | Hard to standardize and needs to be purpose-built for every consumer | 18 | 19 | A supergraph allows both these API design and ownership models to co-exist. A supergraph platform brings in domain APIs via its subgraph connectors and provides a self-serve API orchestration and aggregation layer across the various domains. This allows domain owners to design and evolve their domain API, and other supergraph stakeholders to aggregate APIs on-demand and add custom orchestration workflows. 20 | 21 | A supergraph platform solves the following three API composition problems: 22 | 1. Integration 23 | 2. Aggregation 24 | 3. Orchestration 25 | 26 | ## Solving API Integration 27 | 28 | Given that domains and domain APIs exist, API integration remains challenging for API consumers for the following reasons: 29 | 1. The API output format or protocol is not ideal or optimal for a consumer. 30 | 2. The API does not have a typed schema and/or does not provide an SDK experience for the consumer. 31 | 3. The API's documentation is missing or out of date. 32 | 4. The API does not have standardized conventions or follow a consistent design. 33 | 5. API versioning creates tension with high-velocity development 34 | 35 | A supergraph provides a systematic way to address these challenges because it provides a common semantic layer and registry for the underlying domains and their APIs. A well-setup supergraph platform provides out-of-the-box solutions for the challenges mentioned above. 36 | 37 | ## Solving API Aggregation (or batching) 38 | 39 | API consumers often need to fetch data from multiple API endpoints. API aggregation or batching, performed closer to the domains, can prevent excessive data transfer and reduce network round trips. 40 | 41 | API aggregation is challenging because: 42 | 1. Explosive creation of new aggregation API endpoints: Different consumers have different needs, and their needs evolve rapidly in a high-velocity environment. 43 | 2. Fuzzy ownership: Domain APIs are owned and designed by domain owners, but often it is not clear who builds, designs, and operates API endpoints that aggregate data across these endpoints. 44 | 45 | A supergraph provides a self-service model for API aggregation and batching by modeling the underlying domains as a "graph" and then allowing API consumers to fetch whatever slice of data they need on-demand without requiring the development and maintenance of new aggregate endpoints. 46 | 47 | A well-setup supergraph platform provides a high level of composability that makes different types of API aggregation possible on demand. For example: 48 | 1. Joins: Fetch data from A and related data from B. 49 | 2. Nested filters: Fetch data from A, filtered by a property value of its related data B. 50 | 51 | ## Solving API Orchestration 52 | 53 | API consumers often need to create reliable workflows that require sequencing multiple API calls interspersed with business logic. Even if the underlying domain APIs exist, API orchestration is challenging because it is the part of the API that is consumer-defined and potentially spans multiple domains. 54 | 55 | This makes it challenging to create a unified technology approach and identify owners to build and operate these workflows. 56 | 57 | Related: Sagas, Distributed transactions, state machines. 58 | 59 | A supergraph platform should provide a clear operating model and technology best practices to manage API orchestration, beyond 60 | simple aggregation/batching use-cases. 61 | 62 | 63 | ## Supergraph checklist for API composition 64 | 65 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 85 | 86 | 87 | 93 | 94 | 95 | 96 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 113 | 114 | 115 | 116 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 133 | 134 | 135 |
    1. IntegrationMaking it easy for API consumers to integrate APIs into their services
    1.1 Multiple API formats 80 |
      81 |
    • Can the supergraph platform to automatically provide output formats beyond GraphQL? Eg: REST/OpenAPI, gRPC.
    • 82 |
    83 | This is required to prevent a lock in to the GraphQL protocol as needs change over time. 84 |
    1.2 Documentation 88 |
      89 |
    • Does the supergraph platform help domain owners maintain documentation?
    • 90 |
    • If the underlying domain (database, code or APIs) are already documented, are those automatically picked up by the supergraph platform?
    • 91 |
    92 |
    1.3 Standardization 97 |
      98 |
    • Does the supergraph platform provide or enforce a standardized domain API design? (Eg: pagination, filtering, sorting etc)
    • 99 |
    100 |
    2. AggregationMaking it easy for API consumers to aggregate/batch multiple API calls into one
    2.1 Relationships 109 |
      110 |
    • Does the supergraph provide a way of creating relationships between any 2 entities or endpoints without requiring changes from the domain owners
    • 111 |
    112 |
    2.2 Composability 117 |
      118 |
    • How many "join" features does the supergraph provide, given a relationship between 2 entities in the supergraph? Examples
    • 119 |
    120 |
    3. OrchestrationMaking it easy for supergraph stakeholders to author custom API orchestration
    3.1 Custom orchestration business logic 129 |
      130 |
    • Does the supergraph provide a way to author orchestration flows within or across underlying domains?
    • 131 |
    132 |
    136 | 137 | ## Federated GraphQL Anti-patterns 138 | 139 | Building a federated GraphQL API with a supergraph is a strategic decision. When the key desired benefit of GraphQL is to solve an API composition problem on top of existing domains, then the key expected ROI is to improve API integration, aggregation, and orchestration. In this case, the following anti-patterns should be avoided. Building a federated GraphQL API with a supergraph is a strategic decision, and the wrong choice can create thousands of person-hours of technical debt and legacy that become hard to unwind. 140 | 141 | 1. ❌ **Pure schema-driven implementation**: 142 | - The situation: The entire GraphQL schema is hand-written to, purportedly meet the goal of a "consumer first" API design. 143 | - The problem: Domains and domain APIs are already designed keeping the needs of one or more consumers in mind. Recreating these parts of API in the GraphQL schema is essentially complete duplication of effort and results in the creation of a parallel standard. A consumer driven approach is only important for the parts of the API that require API aggregation and custom API orchestration workflows. 144 | - Symptoms: 145 | - A parallel API standards group starts to exist. 146 | - Existing domain owners are not willing to own their subgraph GraphQL servers and find it tedious. 147 | - A new squad or team is spending their entire development time building and maintaining a GraphQL wrapper. 148 | - The solution: 149 | - Domain-driven subgraphs: Auto-generate subgraphs that accurately reflect the domain. Subgraph improvements are driven by domain design improvements. 150 | - Consumer-driven additions to the supergraph: Create a tech stack and an operating model for making high-velocity additions to the supergraph based on the needs of a specific consumer. 151 | 2. ❌ **Forcing subgraph owners to own inter-subgraph relationships**: 152 | - The situation: Relationships between subgraphs can only be specified by subgraph owners. 153 | - The problem: While this approach allows subgraph owners to extend and connect their subgraphs to other subgraphs, it requires domain owners (subgraph owners) to understand other subgraphs. 154 | - Symptoms: 155 | - Disconnected supergraphs. Inefficient query execution plans if relationships are hard to implement in some directions. 156 | - API consumers who are frustrated at not being able to participate in creating inter-subgraph relationships. 157 | - The solution: In addition to allowing subgraph owners to create inter-subgraph relationships, allow the creation of relationships in the supergraph engine outside the subgraphs as well. 158 | 3. ❌ **Requiring an additional API registry to create custom resolvers (eg: federated mutations)**: 159 | - The situation: Mutations can only originate from a domain subgraph. 160 | - The problem: Supergraph stakeholders are forced to create a new subgraph that directly connects to underlying domains. This requires stakeholders to refer to another API registry to understand how to connect to the underlying subgraph domains (eg: database, REST). 161 | - Symptoms: 162 | - API consumers are frustrated at not being able to easily create custom resolvers that represent some unique business logic and workflow for their specific need. 163 | - Lack of an operating model around federating mutations, or API sagas, or distributed transactions. 164 | - The solution: The supergraph platform should provide a way for supergraph stakeholders to author custom API workflows interspersed with business logic without having to refer to APIs outside of the supergraph. 165 | 166 | -------------------------------------------------------------------------------- /themes/hugo-book/exampleSite/content/posts/goisforlovers.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "(Hu)go Template Primer" 3 | description = "" 4 | tags = [ 5 | "go", 6 | "golang", 7 | "templates", 8 | "themes", 9 | "development", 10 | ] 11 | date = "2014-04-02" 12 | categories = [ 13 | "Development", 14 | "golang", 15 | ] 16 | menu = "main" 17 | +++ 18 | 19 | Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for 20 | its template engine. It is an extremely lightweight engine that provides a very 21 | small amount of logic. In our experience that it is just the right amount of 22 | logic to be able to create a good static website. If you have used other 23 | template systems from different languages or frameworks you will find a lot of 24 | similarities in Go templates. 25 | 26 | This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] 27 | provide more details. 28 | 29 | ## Introduction to Go Templates 30 | 31 | Go templates provide an extremely simple template language. It adheres to the 32 | belief that only the most basic of logic belongs in the template or view layer. 33 | One consequence of this simplicity is that Go templates parse very quickly. 34 | 35 | A unique characteristic of Go templates is they are content aware. Variables and 36 | content will be sanitized depending on the context of where they are used. More 37 | details can be found in the [Go docs][gohtmltemplate]. 38 | 39 | ## Basic Syntax 40 | 41 | Golang templates are HTML files with the addition of variables and 42 | functions. 43 | 44 | **Go variables and functions are accessible within {{ }}** 45 | 46 | Accessing a predefined variable "foo": 47 | 48 | {{ foo }} 49 | 50 | **Parameters are separated using spaces** 51 | 52 | Calling the add function with input of 1, 2: 53 | 54 | {{ add 1 2 }} 55 | 56 | **Methods and fields are accessed via dot notation** 57 | 58 | Accessing the Page Parameter "bar" 59 | 60 | {{ .Params.bar }} 61 | 62 | **Parentheses can be used to group items together** 63 | 64 | {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} 65 | 66 | 67 | ## Variables 68 | 69 | Each Go template has a struct (object) made available to it. In hugo each 70 | template is passed either a page or a node struct depending on which type of 71 | page you are rendering. More details are available on the 72 | [variables](/layout/variables) page. 73 | 74 | A variable is accessed by referencing the variable name. 75 | 76 | {{ .Title }} 77 | 78 | Variables can also be defined and referenced. 79 | 80 | {{ $address := "123 Main St."}} 81 | {{ $address }} 82 | 83 | 84 | ## Functions 85 | 86 | Go template ship with a few functions which provide basic functionality. The Go 87 | template system also provides a mechanism for applications to extend the 88 | available functions with their own. [Hugo template 89 | functions](/layout/functions) provide some additional functionality we believe 90 | are useful for building websites. Functions are called by using their name 91 | followed by the required parameters separated by spaces. Template 92 | functions cannot be added without recompiling hugo. 93 | 94 | **Example:** 95 | 96 | {{ add 1 2 }} 97 | 98 | ## Includes 99 | 100 | When including another template you will pass to it the data it will be 101 | able to access. To pass along the current context please remember to 102 | include a trailing dot. The templates location will always be starting at 103 | the /layout/ directory within Hugo. 104 | 105 | **Example:** 106 | 107 | {{ template "chrome/header.html" . }} 108 | 109 | 110 | ## Logic 111 | 112 | Go templates provide the most basic iteration and conditional logic. 113 | 114 | ### Iteration 115 | 116 | Just like in Go, the Go templates make heavy use of range to iterate over 117 | a map, array or slice. The following are different examples of how to use 118 | range. 119 | 120 | **Example 1: Using Context** 121 | 122 | {{ range array }} 123 | {{ . }} 124 | {{ end }} 125 | 126 | **Example 2: Declaring value variable name** 127 | 128 | {{range $element := array}} 129 | {{ $element }} 130 | {{ end }} 131 | 132 | **Example 2: Declaring key and value variable name** 133 | 134 | {{range $index, $element := array}} 135 | {{ $index }} 136 | {{ $element }} 137 | {{ end }} 138 | 139 | ### Conditionals 140 | 141 | If, else, with, or, & and provide the framework for handling conditional 142 | logic in Go Templates. Like range, each statement is closed with `end`. 143 | 144 | 145 | Go Templates treat the following values as false: 146 | 147 | * false 148 | * 0 149 | * any array, slice, map, or string of length zero 150 | 151 | **Example 1: If** 152 | 153 | {{ if isset .Params "title" }}

    {{ index .Params "title" }}

    {{ end }} 154 | 155 | **Example 2: If -> Else** 156 | 157 | {{ if isset .Params "alt" }} 158 | {{ index .Params "alt" }} 159 | {{else}} 160 | {{ index .Params "caption" }} 161 | {{ end }} 162 | 163 | **Example 3: And & Or** 164 | 165 | {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 166 | 167 | **Example 4: With** 168 | 169 | An alternative way of writing "if" and then referencing the same value 170 | is to use "with" instead. With rebinds the context `.` within its scope, 171 | and skips the block if the variable is absent. 172 | 173 | The first example above could be simplified as: 174 | 175 | {{ with .Params.title }}

    {{ . }}

    {{ end }} 176 | 177 | **Example 5: If -> Else If** 178 | 179 | {{ if isset .Params "alt" }} 180 | {{ index .Params "alt" }} 181 | {{ else if isset .Params "caption" }} 182 | {{ index .Params "caption" }} 183 | {{ end }} 184 | 185 | ## Pipes 186 | 187 | One of the most powerful components of Go templates is the ability to 188 | stack actions one after another. This is done by using pipes. Borrowed 189 | from unix pipes, the concept is simple, each pipeline's output becomes the 190 | input of the following pipe. 191 | 192 | Because of the very simple syntax of Go templates, the pipe is essential 193 | to being able to chain together function calls. One limitation of the 194 | pipes is that they only can work with a single value and that value 195 | becomes the last parameter of the next pipeline. 196 | 197 | A few simple examples should help convey how to use the pipe. 198 | 199 | **Example 1 :** 200 | 201 | {{ if eq 1 1 }} Same {{ end }} 202 | 203 | is the same as 204 | 205 | {{ eq 1 1 | if }} Same {{ end }} 206 | 207 | It does look odd to place the if at the end, but it does provide a good 208 | illustration of how to use the pipes. 209 | 210 | **Example 2 :** 211 | 212 | {{ index .Params "disqus_url" | html }} 213 | 214 | Access the page parameter called "disqus_url" and escape the HTML. 215 | 216 | **Example 3 :** 217 | 218 | {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} 219 | Stuff Here 220 | {{ end }} 221 | 222 | Could be rewritten as 223 | 224 | {{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }} 225 | Stuff Here 226 | {{ end }} 227 | 228 | 229 | ## Context (aka. the dot) 230 | 231 | The most easily overlooked concept to understand about Go templates is that {{ . }} 232 | always refers to the current context. In the top level of your template this 233 | will be the data set made available to it. Inside of a iteration it will have 234 | the value of the current item. When inside of a loop the context has changed. . 235 | will no longer refer to the data available to the entire page. If you need to 236 | access this from within the loop you will likely want to set it to a variable 237 | instead of depending on the context. 238 | 239 | **Example:** 240 | 241 | {{ $title := .Site.Title }} 242 | {{ range .Params.tags }} 243 |
  • {{ . }} - {{ $title }}
  • 244 | {{ end }} 245 | 246 | Notice how once we have entered the loop the value of {{ . }} has changed. We 247 | have defined a variable outside of the loop so we have access to it from within 248 | the loop. 249 | 250 | # Hugo Parameters 251 | 252 | Hugo provides the option of passing values to the template language 253 | through the site configuration (for sitewide values), or through the meta 254 | data of each specific piece of content. You can define any values of any 255 | type (supported by your front matter/config format) and use them however 256 | you want to inside of your templates. 257 | 258 | 259 | ## Using Content (page) Parameters 260 | 261 | In each piece of content you can provide variables to be used by the 262 | templates. This happens in the [front matter](/content/front-matter). 263 | 264 | An example of this is used in this documentation site. Most of the pages 265 | benefit from having the table of contents provided. Sometimes the TOC just 266 | doesn't make a lot of sense. We've defined a variable in our front matter 267 | of some pages to turn off the TOC from being displayed. 268 | 269 | Here is the example front matter: 270 | 271 | ``` 272 | --- 273 | title: "Permalinks" 274 | date: "2013-11-18" 275 | aliases: 276 | - "/doc/permalinks/" 277 | groups: ["extras"] 278 | groups_weight: 30 279 | notoc: true 280 | --- 281 | ``` 282 | 283 | Here is the corresponding code inside of the template: 284 | 285 | {{ if not .Params.notoc }} 286 |
    287 | {{ .TableOfContents }} 288 |
    289 | {{ end }} 290 | 291 | 292 | 293 | ## Using Site (config) Parameters 294 | In your top-level configuration file (eg, `config.yaml`) you can define site 295 | parameters, which are values which will be available to you in chrome. 296 | 297 | For instance, you might declare: 298 | 299 | ```yaml 300 | params: 301 | CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved." 302 | TwitterUser: "spf13" 303 | SidebarRecentLimit: 5 304 | ``` 305 | 306 | Within a footer layout, you might then declare a `