├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .github ├── CODEOWNERS ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── gh-pages.yaml │ └── pull_request-shared-actions.yaml ├── .gitignore ├── .goreleaser.yml ├── .prettierignore ├── .prettierrc.yaml ├── .releaserc.yaml ├── .tool-versions ├── .vscode ├── extensions.json ├── launch.json ├── outreach.code-snippets ├── private.env └── settings.json ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── cmd └── stencil │ ├── configure.go │ ├── configure_module.go │ ├── configure_test.go │ ├── create.go │ ├── create_module.go │ ├── describe.go │ ├── describe_test.go │ ├── docs.go │ ├── docs_generate.go │ └── stencil.go ├── cortex.yaml ├── devenv.yaml ├── docs ├── .editorconfig ├── .gitignore ├── .markdownlint.yaml ├── .tool-versions ├── Makefile ├── README.md ├── _vendor │ ├── github.com │ │ └── gohugoio │ │ │ └── gohugoioTheme │ │ │ ├── assets │ │ │ ├── css │ │ │ │ ├── _animation.css │ │ │ │ ├── _carousel.css │ │ │ │ ├── _chroma.css │ │ │ │ ├── _code.css │ │ │ │ ├── _color-scheme.css │ │ │ │ ├── _columns.css │ │ │ │ ├── _content-tables.css │ │ │ │ ├── _content.css │ │ │ │ ├── _definition-lists.css │ │ │ │ ├── _documentation-styles.css │ │ │ │ ├── _fluid-type.css │ │ │ │ ├── _font-family.css │ │ │ │ ├── _header-link.css │ │ │ │ ├── _hljs.css │ │ │ │ ├── _hugo-internal-template-styling.css │ │ │ │ ├── _no-js.css │ │ │ │ ├── _social-icons.css │ │ │ │ ├── _stickyheader.css │ │ │ │ ├── _svg.css │ │ │ │ ├── _tabs.css │ │ │ │ ├── _tachyons.css │ │ │ │ ├── _variables.css │ │ │ │ └── main.css │ │ │ ├── index.js │ │ │ ├── js │ │ │ │ ├── clipboardjs.js │ │ │ │ ├── codeblocks.js │ │ │ │ ├── docsearch.js │ │ │ │ ├── filesaver.js │ │ │ │ ├── hljs.js │ │ │ │ ├── lazysizes.js │ │ │ │ ├── main.js │ │ │ │ ├── menutoggle.js │ │ │ │ ├── nojs.js │ │ │ │ ├── scrolldir.js │ │ │ │ ├── smoothscroll.js │ │ │ │ └── tabs.js │ │ │ ├── opengraph │ │ │ │ ├── gohugoio-card-base-1.png │ │ │ │ └── mulish-black.ttf │ │ │ └── output │ │ │ │ ├── css │ │ │ │ └── app.css │ │ │ │ └── js │ │ │ │ └── app.js │ │ │ ├── config.toml │ │ │ ├── data │ │ │ └── sponsors.toml │ │ │ ├── layouts │ │ │ ├── 404.html │ │ │ ├── _default │ │ │ │ ├── _markup │ │ │ │ │ └── render-heading.html │ │ │ │ ├── baseof.html │ │ │ │ ├── documentation-home.html │ │ │ │ ├── list.html │ │ │ │ ├── page.html │ │ │ │ ├── single.html │ │ │ │ ├── taxonomy.html │ │ │ │ └── terms.html │ │ │ ├── index.headers │ │ │ ├── index.html │ │ │ ├── index.redir │ │ │ ├── news │ │ │ │ ├── list.html │ │ │ │ └── single.html │ │ │ ├── partials │ │ │ │ ├── boxes-section-summaries.html │ │ │ │ ├── boxes-small-news.html │ │ │ │ ├── components │ │ │ │ │ ├── author-github-data-card.html │ │ │ │ │ └── author-github-data.html │ │ │ │ ├── docs │ │ │ │ │ ├── functions-signature.html │ │ │ │ │ └── page-meta-data.html │ │ │ │ ├── entry-summary.html │ │ │ │ ├── gtag.html │ │ │ │ ├── head-additions.html │ │ │ │ ├── hero.html │ │ │ │ ├── home-page-sections │ │ │ │ │ ├── features-icons.html │ │ │ │ │ ├── features-single.html │ │ │ │ │ ├── installation.html │ │ │ │ │ ├── open-source-involvement.html │ │ │ │ │ └── showcase.html │ │ │ │ ├── hooks │ │ │ │ │ ├── after-body-start.html │ │ │ │ │ └── before-body-end.html │ │ │ │ ├── icon-link.html │ │ │ │ ├── nav-links-docs-mobile.html │ │ │ │ ├── nav-links-docs.html │ │ │ │ ├── nav-links-global-mobile.html │ │ │ │ ├── nav-links.html │ │ │ │ ├── nav-mobile.html │ │ │ │ ├── nav-top.html │ │ │ │ ├── opengraph │ │ │ │ │ ├── get-featured-image.html │ │ │ │ │ ├── opengraph.html │ │ │ │ │ └── twitter_cards.html │ │ │ │ ├── page-edit.html │ │ │ │ ├── page-header.html │ │ │ │ ├── pagelayout.html │ │ │ │ ├── previous-next-links-in-section-with-title.html │ │ │ │ ├── previous-next-links-in-section.html │ │ │ │ ├── previous-next-links.html │ │ │ │ ├── related.html │ │ │ │ ├── site-footer.html │ │ │ │ ├── site-manifest.html │ │ │ │ ├── site-nav.html │ │ │ │ ├── site-scripts.html │ │ │ │ ├── site-search.html │ │ │ │ ├── social-follow.html │ │ │ │ ├── summary.html │ │ │ │ ├── svg │ │ │ │ │ ├── Twitter_Logo_Blue.svg │ │ │ │ │ ├── apple.svg │ │ │ │ │ ├── clipboard.svg │ │ │ │ │ ├── clippy.svg │ │ │ │ │ ├── cloud.svg │ │ │ │ │ ├── content.svg │ │ │ │ │ ├── design.svg │ │ │ │ │ ├── exclamation.svg │ │ │ │ │ ├── facebook.svg │ │ │ │ │ ├── focus.svg │ │ │ │ │ ├── freebsd.svg │ │ │ │ │ ├── functions.svg │ │ │ │ │ ├── github-corner.svg │ │ │ │ │ ├── github-squared.svg │ │ │ │ │ ├── gitter.svg │ │ │ │ │ ├── gme.svg │ │ │ │ │ ├── godoc-icon.html │ │ │ │ │ ├── gopher-2.svg │ │ │ │ │ ├── gopher-front.svg │ │ │ │ │ ├── gopher-homepage.svg │ │ │ │ │ ├── gopher-side_path.svg │ │ │ │ │ ├── gopher-small.svg │ │ │ │ │ ├── gopher.svg │ │ │ │ │ ├── hugo-h-only.svg │ │ │ │ │ ├── hugo.svg │ │ │ │ │ ├── ic_arrow_drop_down.svg │ │ │ │ │ ├── ic_arrow_drop_up.svg │ │ │ │ │ ├── ic_chevron_left_black_24px.svg │ │ │ │ │ ├── ic_chevron_right_black_24px.svg │ │ │ │ │ ├── idea.svg │ │ │ │ │ ├── instagram.svg │ │ │ │ │ ├── javascript.svg │ │ │ │ │ ├── json.svg │ │ │ │ │ ├── link-ext.svg │ │ │ │ │ ├── link-permalink.svg │ │ │ │ │ ├── md.svg │ │ │ │ │ ├── mdsolid.svg │ │ │ │ │ ├── newlogo.svg │ │ │ │ │ ├── sass.svg │ │ │ │ │ ├── search.svg │ │ │ │ │ ├── twitter.svg │ │ │ │ │ ├── website.svg │ │ │ │ │ ├── windows.svg │ │ │ │ │ └── yaml.svg │ │ │ │ ├── tags.html │ │ │ │ └── toc.html │ │ │ ├── robots.txt │ │ │ ├── shortcodes │ │ │ │ ├── articlelist.html │ │ │ │ ├── code-toggle.html │ │ │ │ ├── code.html │ │ │ │ ├── datatable.html │ │ │ │ ├── directoryindex.html │ │ │ │ ├── docfile.html │ │ │ │ ├── exfile.html │ │ │ │ ├── exfm.html │ │ │ │ ├── gh.html │ │ │ │ ├── ghrepo.html │ │ │ │ ├── nohighlight.html │ │ │ │ ├── note.html │ │ │ │ ├── output.html │ │ │ │ ├── readfile.html │ │ │ │ ├── tip.html │ │ │ │ ├── warning.html │ │ │ │ └── yt.html │ │ │ └── showcase │ │ │ │ ├── list.html │ │ │ │ └── single.html │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── static │ │ │ ├── apple-touch-icon-114x114.png │ │ │ ├── apple-touch-icon-120x120.png │ │ │ ├── apple-touch-icon-144x144.png │ │ │ ├── apple-touch-icon-152x152.png │ │ │ ├── apple-touch-icon-57x57.png │ │ │ ├── apple-touch-icon-60x60.png │ │ │ ├── apple-touch-icon-72x72.png │ │ │ ├── apple-touch-icon-76x76.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-128.png │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-196x196.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── favicon.ico │ │ │ ├── fonts │ │ │ │ ├── muli-latin-200.woff │ │ │ │ ├── muli-latin-200.woff2 │ │ │ │ ├── muli-latin-200italic.woff │ │ │ │ ├── muli-latin-200italic.woff2 │ │ │ │ ├── muli-latin-300.woff │ │ │ │ ├── muli-latin-300.woff2 │ │ │ │ ├── muli-latin-300italic.woff │ │ │ │ ├── muli-latin-300italic.woff2 │ │ │ │ ├── muli-latin-400.woff │ │ │ │ ├── muli-latin-400.woff2 │ │ │ │ ├── muli-latin-400italic.woff │ │ │ │ ├── muli-latin-400italic.woff2 │ │ │ │ ├── muli-latin-600.woff │ │ │ │ ├── muli-latin-600.woff2 │ │ │ │ ├── muli-latin-600italic.woff │ │ │ │ ├── muli-latin-600italic.woff2 │ │ │ │ ├── muli-latin-700.woff │ │ │ │ ├── muli-latin-700.woff2 │ │ │ │ ├── muli-latin-700italic.woff │ │ │ │ ├── muli-latin-700italic.woff2 │ │ │ │ ├── muli-latin-800.woff │ │ │ │ ├── muli-latin-800.woff2 │ │ │ │ ├── muli-latin-800italic.woff │ │ │ │ ├── muli-latin-800italic.woff2 │ │ │ │ ├── muli-latin-900.woff │ │ │ │ ├── muli-latin-900.woff2 │ │ │ │ ├── muli-latin-900italic.woff │ │ │ │ └── muli-latin-900italic.woff2 │ │ │ ├── images │ │ │ │ ├── GitHub-Mark-64px.png │ │ │ │ ├── gopher-hero.svg │ │ │ │ ├── gopher-side_color.svg │ │ │ │ ├── hugo-logo-wide.svg │ │ │ │ ├── icon-built-in-templates.svg │ │ │ │ ├── icon-fast.svg │ │ │ │ ├── icon-multilingual.svg │ │ │ │ ├── icon-shortcodes.svg │ │ │ │ └── site-hierarchy.svg │ │ │ ├── mstile-144x144.png │ │ │ ├── mstile-150x150.png │ │ │ ├── mstile-310x150.png │ │ │ ├── mstile-310x310.png │ │ │ └── mstile-70x70.png │ │ │ ├── theme.toml │ │ │ └── webpack.config.js │ └── modules.txt ├── archetypes │ ├── command.md │ └── functions.md ├── config.toml ├── config │ ├── _default │ │ ├── config.toml │ │ ├── languages.toml │ │ ├── markup.toml │ │ ├── menus │ │ │ └── menus.en.toml │ │ ├── params.toml │ │ └── security.toml │ ├── development │ │ └── params.toml │ └── production │ │ ├── config.toml │ │ └── params.toml ├── content │ └── en │ │ ├── _index.md │ │ ├── about │ │ ├── license.md │ │ └── what-is-stencil.md │ │ ├── commands │ │ ├── _index.md │ │ ├── stencil.md │ │ ├── stencil_create.md │ │ ├── stencil_create_module.md │ │ ├── stencil_describe.md │ │ ├── stencil_docs.md │ │ ├── stencil_docs_generate.md │ │ ├── stencil_updater.md │ │ ├── stencil_updater_get-channel.md │ │ ├── stencil_updater_get-channels.md │ │ ├── stencil_updater_list-releases.md │ │ ├── stencil_updater_rollback.md │ │ ├── stencil_updater_set-channel.md │ │ ├── stencil_updater_status.md │ │ └── stencil_updater_use.md │ │ ├── contribute │ │ ├── _index.md │ │ ├── development.md │ │ └── documentation.md │ │ ├── documentation.md │ │ ├── functions │ │ ├── _index.md │ │ ├── file.Block.md │ │ ├── file.Create.md │ │ ├── file.Delete.md │ │ ├── file.Path.md │ │ ├── file.RemoveAll.md │ │ ├── file.SetContents.md │ │ ├── file.SetPath.md │ │ ├── file.Skip.md │ │ ├── file.Static.md │ │ ├── stencil.AddToModuleHook.md │ │ ├── stencil.ApplyTemplate.md │ │ ├── stencil.Arg.md │ │ ├── stencil.Args.md │ │ ├── stencil.Exists.md │ │ ├── stencil.GetGlobal.md │ │ ├── stencil.GetModuleHook.md │ │ ├── stencil.ReadBlocks.md │ │ ├── stencil.ReadFile.md │ │ └── stencil.SetGlobal.md │ │ ├── getting-started │ │ ├── _index.md │ │ ├── installing.md │ │ ├── module-quick-start.md │ │ ├── native-extension-quick-start.md │ │ └── quick-start.md │ │ ├── maintenance │ │ └── _index.md │ │ └── reference │ │ ├── _index.md │ │ ├── modules.md │ │ ├── native-extensions.md │ │ ├── service.yaml.md │ │ └── template-module.md ├── gen │ ├── commands │ │ ├── main.go │ │ └── markdown.md.tpl │ └── functions │ │ ├── functions.md.tpl │ │ └── main.go ├── go.mod ├── go.sum ├── layouts │ ├── _default │ │ └── _markup │ │ │ └── render-codeblock-mermaid.html │ ├── maintenance │ │ └── list.html │ ├── partials │ │ ├── hooks │ │ │ └── before-body-end.html │ │ └── maintenance-pages-table.html │ ├── shortcodes │ │ ├── asciicast.html │ │ ├── chroma-lexers.html │ │ ├── code-toggle.html │ │ ├── code.html │ │ ├── content-tree.html │ │ ├── datatable.html │ │ ├── directoryindex.html │ │ ├── docfile.html │ │ ├── exfile.html │ │ ├── exfm.html │ │ ├── funcsig.html │ │ ├── getcontent.html │ │ ├── gh.html │ │ ├── ghrepo.html │ │ ├── gomodules-info.html │ │ ├── imgproc.html │ │ ├── new-in.html │ │ ├── nohighlight.html │ │ ├── note.html │ │ ├── output.html │ │ ├── page-kinds.html │ │ ├── params.html │ │ ├── readfile.html │ │ ├── tip.html │ │ ├── todo.html │ │ ├── warning.html │ │ └── yt.html │ └── template-func │ │ └── page.html ├── netlify.toml ├── resources │ ├── .gitattributes │ └── _gen │ │ └── assets │ │ ├── css │ │ └── output │ │ │ └── css │ │ │ ├── app.css_d11fe7b62c27961c87ecd0f2490357b9.content │ │ │ └── app.css_d11fe7b62c27961c87ecd0f2490357b9.json │ │ └── js │ │ └── output │ │ └── js │ │ ├── app.js_8848f55d07695b7ff7188138f23d69e3.content │ │ └── app.js_8848f55d07695b7ff7188138f23d69e3.json ├── src │ ├── css │ │ └── _chroma.css │ └── package-lock.json └── static │ ├── css │ ├── hugofont.css │ └── style.css │ ├── fonts │ ├── hugo.eot │ ├── hugo.svg │ └── hugo.ttf │ ├── images │ ├── icon-custom-outputs.svg │ └── site-hierarchy.svg │ └── img │ ├── stencil-logo-med.png │ ├── stencil-logo.png │ ├── stencil.png │ └── stencilSM.png ├── glados.hcl ├── go.mod ├── go.sum ├── internal ├── cmd │ └── stencil │ │ ├── stencil.go │ │ └── stencil_test.go ├── codegen │ ├── blocks.go │ ├── blocks_test.go │ ├── doc.go │ ├── file.go │ ├── file_test.go │ ├── functions.go │ ├── functions_test.go │ ├── stencil.go │ ├── stencil_test.go │ ├── template.go │ ├── template_test.go │ ├── test_helpers.go │ ├── testdata │ │ ├── apply-template-passthrough.tpl │ │ ├── args │ │ │ └── test.tpl │ │ ├── blockinsideblock-test.txt │ │ ├── blocks-test.txt │ │ ├── danglingblock-test.txt │ │ ├── danglingendblock-test.txt │ │ ├── generated-block │ │ │ ├── fake.txt │ │ │ └── template.txt.tpl │ │ ├── module-hook │ │ │ ├── m1.tpl │ │ │ └── m2.tpl │ │ ├── multi-file-input.tpl │ │ ├── multi-file.tpl │ │ ├── v2blocks-invalid.txt │ │ ├── v2blocks-test.txt │ │ ├── values │ │ │ └── values.tpl │ │ └── wrongendblock-test.txt │ ├── tpl.go │ ├── tpl_file.go │ ├── tpl_stencil.go │ ├── tpl_stencil_arg.go │ ├── tpl_stencil_arg_test.go │ ├── tpl_stencil_test.go │ ├── values.go │ └── values_test.go ├── dotnotation │ ├── dotnotation.go │ └── dotnotation_test.go ├── git │ └── git.go ├── gitauth │ └── gitauth.go └── modules │ ├── module.go │ ├── module_test.go │ ├── modules.go │ ├── modulestest │ └── modulestest.go │ ├── testdata │ ├── manifest.yaml │ ├── nested_constraint │ │ └── manifest.yaml │ └── nested_modules │ │ ├── a │ │ └── manifest.yaml │ │ └── b │ │ └── manifest.yaml │ └── worklist.go ├── manifest.yaml ├── migrations └── README.md ├── package.json ├── pkg ├── configuration │ ├── configuration.go │ ├── configuration_test.go │ ├── testdata │ │ └── service.yaml │ ├── type.go │ └── type_test.go ├── extensions │ ├── apiv1 │ │ ├── apiv1.go │ │ ├── client.go │ │ ├── logger.go │ │ ├── rpc.go │ │ ├── rpc_transport_client.go │ │ ├── rpc_transport_server.go │ │ ├── server.go │ │ └── transport.go │ ├── caller.go │ ├── extensions.go │ └── extensions_test.go ├── stencil │ ├── stencil.go │ ├── stencil_test.go │ └── testdata │ │ └── stencil.lock └── stenciltest │ ├── inproc_ext.go │ ├── stenciltest.go │ ├── stenciltest_test.go │ └── testdata │ ├── args.tpl │ ├── error.tpl │ └── test.tpl ├── scripts ├── air-runner.sh ├── devbase.sh ├── golangci.yml ├── lib │ └── install-node.sh └── shell-wrapper.sh ├── service.yaml ├── stencil.lock ├── versions.yaml └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | # Unix-style newlines with a newline ending every file 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | 8 | [*.go,Makefile] 9 | indent_style = tab 10 | 11 | [*.{bash,rb,sh,slim,yml,yaml}] 12 | indent_style = space 13 | indent_size = 2 14 | 15 | ## <> 16 | 17 | ## <> 18 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | go.sum linguist-generated 2 | *_pb.d.ts linguist-generated 3 | *.pb.go linguist-generated 4 | *_pb.js linguist-generated 5 | *_pb.rb linguist-generated 6 | internal/ent linguist-generated 7 | internal/ent/schema/*.go -text diff=golang 8 | bootstrap.lock linguist-generated 9 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/about-codeowners/ 2 | * @getoutreach/fnd-dt 3 | 4 | ## <> 5 | 6 | ## <> 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Golang dependencies 4 | - package-ecosystem: "gomod" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | # stencil-golang managed dependencies 9 | ignore: 10 | - dependency-name: github.com/getoutreach/gobox 11 | - dependency-name: github.com/getoutreach/stencil-golang/pkg 12 | - dependency-name: github.com/urfave/cli/v2 13 | 14 | # Ignore semantic-release, this code is only executed in CI. 15 | - package-ecosystem: "npm" 16 | directory: "/" 17 | schedule: 18 | interval: "daily" 19 | ignore: 20 | - dependency-name: "*" 21 | 22 | ## <> 23 | 24 | ## <> 25 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | Please read [CONTRIBUTING.md](CONTRIBUTING.md) for additional information on contributing to this repository! 10 | 11 | 12 | ## What this PR does / why we need it 13 | 14 | 15 | 16 | 17 | ## Jira ID 18 | 19 | [XX-XX] 20 | 21 | 22 | 23 | 24 | ## Notes for your reviewers 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yaml: -------------------------------------------------------------------------------- 1 | name: github pages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main # Set a branch to deploy 7 | pull_request: 8 | 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-24.04 12 | steps: 13 | - uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | - uses: jdx/mise-action@v2 17 | with: 18 | install_args: hugo 19 | working_directory: ./docs 20 | - name: Build 21 | working-directory: ./docs 22 | run: hugo --minify 23 | 24 | - name: Deploy 25 | uses: peaceiris/actions-gh-pages@v3 26 | if: github.ref == 'refs/heads/main' 27 | with: 28 | github_token: ${{ secrets.GITHUB_TOKEN }} 29 | publish_dir: ./docs/public 30 | -------------------------------------------------------------------------------- /.github/workflows/pull_request-shared-actions.yaml: -------------------------------------------------------------------------------- 1 | name: Pull Request Shared Actions 2 | on: 3 | pull_request: 4 | types: [opened, synchronize, reopened, edited] # Add edited to the default list for title changes event 5 | 6 | jobs: 7 | conventional_commit: 8 | name: Conventional Commit 9 | uses: getoutreach/actions/.github/workflows/conventional_commit.yaml@main 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Editor files 9 | *.swp 10 | *~ 11 | \#*\# 12 | .idea/* 13 | TAGS 14 | *.sublime-project 15 | *.sublime-workspace 16 | .\#* 17 | .dir-locals.el 18 | 19 | # Test binary, build with "go test -c" 20 | *.test 21 | 22 | # Output of the go coverage tool, specifically when used with LiteIDE 23 | *.out 24 | 25 | # Log files 26 | *.log 27 | 28 | # Releases and other binaries 29 | bin/ 30 | dist/ 31 | 32 | # Don't. Commit. Vendor. Or other package manager dep directories 33 | node_modules 34 | vendor 35 | 36 | # Fetched by make 37 | concourse/jsonnet-libs 38 | 39 | # pulumi secrets, obtained from vault 40 | Pulumi.*.yaml 41 | 42 | # terraform 43 | .terraform 44 | 45 | # macOS 46 | .DS_Store 47 | 48 | # Ruby gRPC client 49 | *.gem 50 | 51 | # bootstrap libs 52 | .bootstrap 53 | 54 | # CircleCI cache version 55 | /cache-version.txt 56 | 57 | # DevSpace files 58 | /.devspace 59 | /deployments/stencil.yaml 60 | 61 | # Documentation output 62 | /apidocs 63 | 64 | # Terraform lock files 65 | .terraform.lock.hcl 66 | 67 | ### Start ignores inserted by other modules 68 | ### End ignores inserted by other modules 69 | 70 | ## <> 71 | 72 | ## <> 73 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://goreleaser.com/static/schema.json 2 | before: 3 | hooks: 4 | - make dep 5 | builds: 6 | - main: ./cmd/stencil 7 | id: &name stencil 8 | binary: *name 9 | goos: 10 | - linux 11 | - darwin 12 | goarch: 13 | - amd64 14 | - arm64 15 | ldflags: 16 | - '-w -s -X "github.com/getoutreach/gobox/pkg/app.Version=v{{ .Version }}"' 17 | - '-X "main.HoneycombTracingKey={{ .Env.HONEYCOMB_APIKEY }}"' 18 | - '-X "main.TeleforkAPIKey={{ .Env.TELEFORK_APIKEY }}"' 19 | env: 20 | - CGO_ENABLED=0 21 | ## <> 22 | 23 | ## <> 24 | 25 | archives: [] 26 | checksum: 27 | name_template: "checksums.txt" 28 | release: 29 | # We handle releasing via semantic-release 30 | disable: true 31 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore all markdown formatting by default. If you want prettier to format 2 | # your markdown files, manually include them by adding prefixed ! entries. 3 | *.md 4 | 5 | ## <> 6 | 7 | ## <> 8 | -------------------------------------------------------------------------------- /.prettierrc.yaml: -------------------------------------------------------------------------------- 1 | bracketSpacing: false 2 | -------------------------------------------------------------------------------- /.releaserc.yaml: -------------------------------------------------------------------------------- 1 | preset: conventionalcommits 2 | branches: 3 | - name: main 4 | prerelease: "rc" 5 | - name: release 6 | plugins: 7 | - - "@semantic-release/commit-analyzer" 8 | - releaseRules: 9 | - type: revert 10 | release: patch 11 | - type: perf 12 | release: patch 13 | # Build the binaries 14 | - - "@semantic-release/exec" 15 | # We use generateNotesCmd instead of a different step because it has access 16 | # to last/nextRelease due to when the step runs. 17 | - generateNotesCmd: "make release APP_VERSION=${nextRelease.version}" 18 | 19 | # This creates fancy release notes in our Github release 20 | - "@semantic-release/release-notes-generator" 21 | # Create the Github Release 22 | - - "@semantic-release/github" 23 | - assets: 24 | - "dist/*.tar.gz" 25 | - "dist/checksums.txt" 26 | 27 | ## <> 28 | 29 | ## <> 30 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | # This file contains tool versions for use with asdf 2 | # Note: Versions in this block override the default versions below. 3 | # Be EXTREMELY CAREFUL with this. If you override a standard version 4 | # you are reducing compatibility guarantees. 5 | ## <> 6 | ## <> 7 | protoc 21.5 8 | nodejs 20.16.0 9 | golang 1.23.4 10 | # Note: Versions in this block do not override the default versions above 11 | # but sometimes you have to declare additional versions of the same tool 12 | # while leaving the 'default' version intact for the infra. 13 | # The most common case is nodejs. 14 | ## <> 15 | terraform 1.6.2 16 | ## <> 17 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "editorconfig.editorconfig", 4 | "esbenp.prettier-vscode", 5 | "hashicorp.terraform", 6 | "golang.go", 7 | "Grafana.vscode-jsonnet", 8 | "timonwong.shellcheck", 9 | "zxh404.vscode-proto3", 10 | "redhat.vscode-yaml", 11 | "ms-azuretools.vscode-docker", 12 | "foxundermoon.shell-format", 13 | 14 | // Please consider contributing back all recommended 15 | // extensions to stencil! 16 | // <> 17 | "ms-kubernetes-tools.vscode-kubernetes-tools" 18 | // <> 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.vscode/outreach.code-snippets: -------------------------------------------------------------------------------- 1 | { 2 | "Outreach E2E Test Build Tags": { 3 | "scope": "go", 4 | "prefix": "build-tag-e2e", 5 | "body": [ 6 | "//go:build or_e2e", 7 | "// +build or_e2e\n\n" 8 | ], 9 | "description": "Build tags for end-to-end test files" 10 | }, 11 | "Outreach Unit Test Build Tags": { 12 | "scope": "go", 13 | "prefix": "build-tag-unit", 14 | "body": [ 15 | "//go:build or_test", 16 | "// +build or_test\n\n" 17 | ], 18 | "description": "Build tags for unit test files" 19 | }, 20 | "Outreach Copyright and Description": { 21 | "scope": "go", 22 | "prefix": "copyright", 23 | "body": [ 24 | "// Copyright ${CURRENT_YEAR} Outreach Corporation. All Rights Reserved.\n", 25 | "// Description: $0" 26 | ], 27 | "description": "Outreach Copyright and Description" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.vscode/private.env: -------------------------------------------------------------------------------- 1 | MY_NAMESPACE="stencil--bento1a" 2 | // <> 3 | 4 | // <> 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # stencil 2 | 3 | 4 | 5 | 6 | 7 | ## Prerequisites 8 | 9 | 10 | 11 | 12 | 13 | ## Building and Testing 14 | 15 | This project uses devbase, which exposes the following build tooling: [devbase/docs/makefile.md](https://github.com/getoutreach/devbase/blob/main/docs/makefile.md) 16 | 17 | 18 | 19 | 20 | 21 | ### Replacing a Remote Version of the a Package with Local Version 22 | 23 | _This is only applicable if this repository exposes a public package_. 24 | 25 | If you want to test a package exposed in this repository in a project that uses it, you can 26 | add the following `replace` directive to that project's `go.mod` file: 27 | 28 | ``` 29 | replace github.com/getoutreach/stencil => /path/to/local/version/stencil 30 | ``` 31 | 32 | **_Note_**: This repository may have postfixed it's module path with a version, go check the first 33 | line of the `go.mod` file in this repository to see if that is the case. If that is the case, 34 | you will need to modify the first part of the replace directive (the part before the `=>`) with 35 | that postfixed path. 36 | 37 | ### Linting and Unit Testing 38 | 39 | You can run the linters and unit tests with: 40 | 41 | ```bash 42 | make test 43 | ``` 44 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | APP := stencil 2 | OSS := true 3 | _ := $(shell ./scripts/devbase.sh) 4 | 5 | include .bootstrap/root/Makefile 6 | 7 | ## <> 8 | post-stencil:: 9 | ./scripts/shell-wrapper.sh catalog-sync.sh 10 | make fmt 11 | yarn upgrade 12 | ## <> 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # stencil 2 | [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/getoutreach/stencil) 3 | [![Generated via Bootstrap](https://img.shields.io/badge/Outreach-Bootstrap-%235951ff)](https://github.com/getoutreach/bootstrap) 4 | [![Coverage Status](https://coveralls.io/repos/github/getoutreach/stencil/badge.svg?branch=main)](https://coveralls.io/github//getoutreach/stencil?branch=main) 5 | 6 | 7 | 8 | 9 | > [!WARNING] 10 | > This version of Stencil is in maintenance mode. That is, there is not enough time to maintain this aside from bug fixes and Outreach-specific features. The next-generation of this tool is currently located at [`rgst-io/stencil`](https://github.com/rgst-io/stencil). 11 | 12 | microservice lifecycle manager 13 | 14 | ## Contributing 15 | 16 | Please read the [CONTRIBUTING.md](CONTRIBUTING.md) document for guidelines on developing and contributing changes. 17 | 18 | ## High-level Overview 19 | 20 | 21 | 22 | Stencil is a smart templating engine for service/library development aimed to reduce the use of boilerplate code. 23 | 24 | Check out our [documentation](https://engineering.outreach.io/stencil/) for more information! 25 | 26 | 27 | -------------------------------------------------------------------------------- /cmd/stencil/configure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains code for the update command 4 | 5 | package main 6 | 7 | import ( 8 | "github.com/urfave/cli/v2" 9 | ) 10 | 11 | // NewCreateCommand returns a new urfave/cli.Command for the 12 | // create command 13 | func NewConfigureCommand() *cli.Command { 14 | return &cli.Command{ 15 | Name: "module", 16 | Description: "Commands to configure template repositories for native-extension functionality, or stencil powered repositories", 17 | Subcommands: []*cli.Command{ 18 | NewConfigureModuleCmd(), 19 | }, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cmd/stencil/create.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains code for the create command 4 | 5 | package main 6 | 7 | import ( 8 | "github.com/urfave/cli/v2" 9 | ) 10 | 11 | // NewCreateCommand returns a new urfave/cli.Command for the 12 | // create command 13 | func NewCreateCommand() *cli.Command { 14 | return &cli.Command{ 15 | Name: "create", 16 | Description: "Commands to create template repositories, or stencil powered repositories", 17 | Subcommands: []*cli.Command{ 18 | NewCreateModule(), 19 | }, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cmd/stencil/docs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains code for the docs command 4 | 5 | package main 6 | 7 | import ( 8 | "github.com/urfave/cli/v2" 9 | ) 10 | 11 | // NewDocsCommand returns a new urfave/cli.Command for the 12 | // docs command 13 | func NewDocsCommand() *cli.Command { 14 | return &cli.Command{ 15 | Name: "docs", 16 | Description: "Commands for generating documentation", 17 | Subcommands: []*cli.Command{ 18 | NewDocsGenerateCommand(), 19 | }, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /cmd/stencil/docs_generate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains code for the docs generate command 4 | 5 | package main 6 | 7 | import ( 8 | "github.com/urfave/cli/v2" 9 | ) 10 | 11 | // NewDocsGenerateCommand returns a new urfave/cli.Command for the 12 | // docs generate command 13 | func NewDocsGenerateCommand() *cli.Command { 14 | return &cli.Command{ 15 | Name: "generate", 16 | Usage: "Generate documentation", 17 | Description: "Generates documentation for the current stencil module", 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /devenv.yaml: -------------------------------------------------------------------------------- 1 | service: false 2 | dependencies: 3 | optional: [] 4 | required: [] 5 | -------------------------------------------------------------------------------- /docs/.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | trim_trailing_whitespace = true 11 | 12 | [*.js] 13 | insert_final_newline = true 14 | 15 | [*.md] 16 | indent_style = tab 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | public 4 | node_modules 5 | nohup.out 6 | .DS_Store 7 | trace.out 8 | .hugo_build.lock 9 | resources/_gen/images/ -------------------------------------------------------------------------------- /docs/.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | # https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md 2 | 3 | MD013: false # Line length 4 | MD033: false # Inline HTML 5 | -------------------------------------------------------------------------------- /docs/.tool-versions: -------------------------------------------------------------------------------- 1 | golang 1.23.4 2 | hugo 0.108.0 3 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: gogenerate 3 | gogenerate: 4 | @go run ./gen/commands/main.go 5 | @go run ./gen/functions/main.go -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_animation.css: -------------------------------------------------------------------------------- 1 | .animated { 2 | animation-duration: .5s; 3 | animation-fill-mode: forwards; 4 | animation-timing-function: ease-in-out; 5 | } 6 | 7 | @keyframes fadeIn { 8 | from { 9 | opacity: 0; 10 | } 11 | 12 | to { 13 | opacity: 1; 14 | } 15 | } 16 | .fadeIn { 17 | animation-name: fadeIn; 18 | } 19 | .animated-delay-1 { 20 | animation-delay: 0.5s; 21 | } 22 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_carousel.css: -------------------------------------------------------------------------------- 1 | /* These styles enhance the home page carousel, located here: themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html */ 2 | .overflow-x-scroll{ 3 | -webkit-overflow-scrolling: touch; 4 | } 5 | .row { 6 | transition: 450ms transform; 7 | font-size: 0; 8 | } 9 | .tile { 10 | transition: 450ms all; 11 | } 12 | .details { 13 | background: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.9)), to(rgba(0,0,0,0))); 14 | background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); 15 | transition: 450ms opacity; 16 | } 17 | .tile:hover .details { 18 | opacity: 1; 19 | } 20 | .row:hover .tile { 21 | opacity: 0.3; 22 | } 23 | .row:hover .tile:hover { 24 | opacity: 1; 25 | } 26 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_columns.css: -------------------------------------------------------------------------------- 1 | .column-count-2 {column-count: 1} 2 | .column-gap-1 {column-gap: 0} 3 | .break-inside-avoid {break-inside: auto} 4 | 5 | 6 | @media (--breakpoint-large) { 7 | .column-count-3-l {column-count: 3} 8 | .column-count-2-l {column-count: 2} 9 | .column-gap-1-l {column-gap: 1} 10 | .break-inside-avoid-l {break-inside: avoid} 11 | } 12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_content-tables.css: -------------------------------------------------------------------------------- 1 | .prose table { 2 | width: 100%; 3 | margin-bottom: 3em; 4 | border-collapse: collapse; 5 | border-spacing: 0; 6 | font-size: 1em; 7 | border: 1px solid var(--light-gray); 8 | & th { 9 | background-color: var(--primary-color); 10 | border-bottom: 1px solid var(--primary-color); 11 | color: white; 12 | font-weight: 400; 13 | 14 | text-align: left; 15 | padding: .375em .5em; 16 | } 17 | 18 | & td, & tc { 19 | padding: .75em .5em; 20 | text-align: left; 21 | border-right: 1px solid var(--light-gray); 22 | } 23 | 24 | } 25 | 26 | .prose table tr:nth-child(even) { 27 | background-color: var(--light-gray); 28 | } 29 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_content.css: -------------------------------------------------------------------------------- 1 | .prose ul, .prose ol { 2 | margin-bottom: 2em; 3 | } 4 | .prose ul li, .prose ol li { 5 | margin-bottom: .5em; 6 | } 7 | .prose li:hover { 8 | background-color: var(--light-gray) 9 | } 10 | .prose ::selection { 11 | background: var(--primary-color); /* WebKit/Blink Browsers */ 12 | color: white; 13 | } 14 | 15 | 16 | body { 17 | 18 | line-height: 1.45; 19 | 20 | } 21 | 22 | p {margin-bottom: 1.3em;} 23 | 24 | h1, h2, h3, h4 { 25 | margin: 1.414em 0 0.5em; 26 | 27 | line-height: 1.2; 28 | } 29 | 30 | h1 { 31 | margin-top: 0; 32 | font-size: 2.441em; 33 | } 34 | 35 | h2 {font-size: 1.953em;} 36 | 37 | h3 {font-size: 1.563em;} 38 | 39 | h4 {font-size: 1.25em;} 40 | 41 | small, .font_small {font-size: 0.8em;} 42 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_definition-lists.css: -------------------------------------------------------------------------------- 1 | 2 | dl dt { 3 | font-weight: bold; 4 | font-size: 1.125rem; 5 | } 6 | dd { 7 | margin: .5em 0 2em 0; 8 | padding: 0; 9 | } 10 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_documentation-styles.css: -------------------------------------------------------------------------------- 1 | .note, 2 | .warning { 3 | 4 | border-left-width: 4px; 5 | border-left-style: solid; 6 | position: relative; 7 | border-color: var(--primary-color); 8 | 9 | display: block; 10 | } 11 | .note #exclamation-icon, 12 | .warning #exclamation-icon { 13 | 14 | fill: var(--primary-color); 15 | position: absolute; 16 | top: 35%; 17 | left: -12px; 18 | /*background-color: white;*/ 19 | } 20 | 21 | .admonition-content { 22 | display: block; 23 | margin: 0px; 24 | padding: .125em 1em; 25 | /*margin-left: 1em;*/ 26 | margin-top: 2em; 27 | margin-bottom: 2em; 28 | overflow-x: auto; 29 | /*font-size: .9375em;*/ 30 | background-color: var(--black-05); 31 | } 32 | 33 | 34 | .hide-child-menu .child-menu { 35 | display: none; 36 | } 37 | .hide-child-menu:hover .child-menu, 38 | .hide-child-menu:focus .child-menu, 39 | .hide-child-menu:active .child-menu { 40 | display: block; 41 | } 42 | 43 | 44 | /*documentation-copy headings exaggerate spacing and size to chunk content */ 45 | .documentation-copy h2 { 46 | margin-top: 3em; 47 | &.minor { 48 | font-size: inherit; 49 | margin-top: inherit; 50 | border-bottom: none; 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_fluid-type.css: -------------------------------------------------------------------------------- 1 | .f2-fluid { 2 | font-size: 2.25rem; 3 | } 4 | 5 | @media (--breakpoint-large) { 6 | .f2-fluid { 7 | font-size: 1.25rem; 8 | font-size: calc(0.875rem + 0.5 * ((100vw - 20rem) / 60)); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_header-link.css: -------------------------------------------------------------------------------- 1 | .header-link:after { 2 | position: relative; 3 | left: 0.5em; 4 | opacity: 0; 5 | font-size: 0.8em; 6 | -moz-transition: opacity 0.2s ease-in-out 0.1s; 7 | -ms-transition: opacity 0.2s ease-in-out 0.1s; 8 | } 9 | h2:hover .header-link, 10 | h3:hover .header-link, 11 | h4:hover .header-link, 12 | h5:hover .header-link, 13 | h6:hover .header-link { 14 | opacity: 1; 15 | } 16 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_hljs.css: -------------------------------------------------------------------------------- 1 | /* modified from:*/ 2 | @import 'highlight.js/styles/atom-one-light.css'; 3 | 4 | /* hljs-template-variable covers the handlebars templating*/ 5 | .hljs-template-variable { 6 | color: var(--primary-color); 7 | } 8 | 9 | .hljs-attr { 10 | color: var(--accent-color-light); 11 | } 12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_hugo-internal-template-styling.css: -------------------------------------------------------------------------------- 1 | /* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */ 2 | .pagination { 3 | margin: 3rem 0; 4 | } 5 | 6 | .pagination li { 7 | display: inline-block; 8 | margin-right: .375rem; 9 | font-size: .875rem; 10 | margin-bottom: 2.5em; 11 | } 12 | .pagination li a { 13 | padding: .5rem .625rem; 14 | background-color: white; 15 | color: #333; 16 | border: 1px solid #ddd; 17 | border-radius: 3px; 18 | text-decoration: none; 19 | } 20 | .pagination li.disabled { 21 | display: none; 22 | } 23 | .pagination li.active a:link, 24 | .pagination li.active a:active, 25 | .pagination li.active a:visited { 26 | background-color: #ddd; 27 | } 28 | 29 | /* Hides non-meaningful TOC items*/ 30 | #TableOfContents ul li ul li ul li{ 31 | display: none; 32 | } 33 | 34 | 35 | #TableOfContents ul li { 36 | color: black; 37 | display: block; 38 | margin-bottom: .375em; 39 | line-height: 1.375; 40 | } 41 | 42 | #TableOfContents ul li a{ 43 | width: 100%; 44 | padding: .25em .375em; 45 | margin-left: -.375em; 46 | 47 | } 48 | #TableOfContents ul li a:hover { 49 | background-color: #999; 50 | color: white; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_no-js.css: -------------------------------------------------------------------------------- 1 | .no-js .needs-js { 2 | opacity: 0 3 | } 4 | .js .needs-js { 5 | opacity: 1; 6 | transition: opacity .15s ease-in; 7 | } 8 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_social-icons.css: -------------------------------------------------------------------------------- 1 | .facebook, .twitter, .instagram, .youtube { 2 | fill: #BABABA; 3 | } 4 | .facebook:hover { 5 | fill: #3b5998; 6 | } 7 | 8 | .twitter { 9 | fill: #55acee; 10 | } 11 | 12 | .twitter:hover { 13 | fill: #BABABA; 14 | } 15 | 16 | 17 | .instagram:hover { 18 | fill: #e95950; 19 | } 20 | 21 | .youtube:hover { 22 | fill: #bb0000; 23 | } 24 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_stickyheader.css: -------------------------------------------------------------------------------- 1 | 2 | @media (min-width: 75em) { 3 | 4 | [data-scrolldir="down"] .sticky { 5 | position: fixed; 6 | top:100px; 7 | right:0; 8 | } 9 | 10 | [data-scrolldir="up"] .sticky { 11 | position: fixed; 12 | top:100px; 13 | right:0; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_svg.css: -------------------------------------------------------------------------------- 1 | .fill-current { fill: currentColor; } 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_tabs.css: -------------------------------------------------------------------------------- 1 | .tab-button{ 2 | margin-bottom:1px; 3 | position: relative; 4 | z-index: 1; 5 | color:#333; 6 | border-color:#ccc; 7 | outline: none; 8 | background-color:white; 9 | } 10 | .tab-pane code{ 11 | background:#f1f2f2; 12 | border-radius:0; 13 | } 14 | .tab-pane .chroma{ 15 | background:none; 16 | padding:0; 17 | } 18 | .tab-button.active{ 19 | border-bottom-color:#f1f2f2; 20 | background-color: #f1f2f2; 21 | } 22 | .tab-content .tab-pane{ 23 | display: none; 24 | } 25 | .tab-content .tab-pane.active{ 26 | display: block; 27 | } 28 | /* Treatment of copy buttons inside a tab module */ 29 | .tab-content .copy, .tab-content .copied{ 30 | display: none; 31 | } 32 | .tab-content .tab-pane.active + .copy, .tab-content .tab-pane.active + .copied{ 33 | display: block; 34 | } -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/_variables.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --primary-color: #0594CB; 3 | --primary-color-dark: #0A1922; 4 | --primary-color-light: #f9f9f9; 5 | --accent-color: #EBB951; 6 | --accent-color-light: #FF4088; 7 | --accent-color-dark: #33ba91; 8 | --text-color-primary: #373737; 9 | --text-on-primary-color: #fff; 10 | --text-color-secondary: #ccc; 11 | --text-color-disabled: #F7f7f7; 12 | --divider-color: #f6f6f6; 13 | --warn-color: red; 14 | 15 | --blue: var(--primary-color); 16 | } 17 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /*Base Styles*/ 2 | @import '_tachyons'; 3 | 4 | @import '@docsearch/css'; 5 | 6 | /* purgecss start ignore */ 7 | @import '_header-link'; 8 | @import '_animation'; 9 | @import '_documentation-styles'; 10 | 11 | @import '_carousel'; 12 | @import '_code'; 13 | @import '_tabs'; 14 | @import '_color-scheme'; 15 | @import '_columns'; 16 | @import '_content'; 17 | @import '_content-tables'; 18 | @import '_definition-lists'; 19 | @import '_fluid-type'; 20 | @import '_font-family'; 21 | @import '_hugo-internal-template-styling'; 22 | @import '_no-js'; 23 | @import '_social-icons'; 24 | @import '_stickyheader'; 25 | 26 | @import '_svg'; 27 | @import '_chroma'; 28 | @import '_variables'; 29 | 30 | .nested-blockquote blockquote { 31 | border-left: 4px solid var(--primary-color); 32 | padding-left: 1em; 33 | /*margin: 0;*/ 34 | } 35 | 36 | 37 | .mw-90 { 38 | max-width:90%; 39 | } 40 | /* purgecss end ignore */ 41 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/index.js: -------------------------------------------------------------------------------- 1 | require("typeface-muli") 2 | import styles from './css/main.css'; 3 | import './js/clipboardjs.js' 4 | import './js/codeblocks.js' 5 | import './js/docsearch.js' 6 | import './js/hljs.js' 7 | import './js/lazysizes.js' 8 | import './js/menutoggle.js' 9 | import './js/scrolldir.js' 10 | import './js/smoothscroll.js' 11 | import './js/tabs.js' 12 | import './js/nojs.js' 13 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/clipboardjs.js: -------------------------------------------------------------------------------- 1 | var Clipboard = require('clipboard/dist/clipboard.js'); 2 | new Clipboard('.copy', { 3 | target: function(trigger) { 4 | if(trigger.classList.contains('copy-toggle')){ 5 | return trigger.previousElementSibling; 6 | } 7 | return trigger.nextElementSibling; 8 | } 9 | }).on('success', function(e) { 10 | successMessage(e.trigger, 'Copied!'); 11 | e.clearSelection(); 12 | }).on('error', function(e) { 13 | successMessage(e.trigger, fallbackMessage(e.action)); 14 | }); 15 | 16 | function successMessage(elem, msg) { 17 | elem.setAttribute('class', 'copied bg-primary-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2'); 18 | elem.setAttribute('aria-label', msg); 19 | } 20 | 21 | function fallbackMessage(elem, action) { 22 | var actionMsg = ''; 23 | var actionKey = (action === 'cut' ? 'X' : 'C'); 24 | if (isMac) { 25 | actionMsg = 'Press ⌘-' + actionKey; 26 | } else { 27 | actionMsg = 'Press Ctrl-' + actionKey; 28 | } 29 | return actionMsg; 30 | } 31 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/codeblocks.js: -------------------------------------------------------------------------------- 1 | let article = document.getElementById('prose') 2 | 3 | if (article) { 4 | let codeBlocks = article.getElementsByTagName('code') 5 | for (let [key, codeBlock] of Object.entries(codeBlocks)){ 6 | var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth 7 | if (widthDif > 0) 8 | codeBlock.parentNode.classList.add('expand') 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/docsearch.js: -------------------------------------------------------------------------------- 1 | import docsearch from '@docsearch/js'; 2 | 3 | import '@docsearch/css'; 4 | 5 | docsearch({ 6 | container: '#search-input', 7 | appId: '3LKIQPX0OJ', 8 | indexName: 'stencil', 9 | apiKey: 'e847aae6cb1cb8619d70123e6be76b47', 10 | }); 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/filesaver.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/filesaver.js -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/lazysizes.js: -------------------------------------------------------------------------------- 1 | var lazysizes = require('lazysizes'); 2 | // var lsnoscript = require('lazysizes/plugins/noscript/ls.noscript.js'); 3 | var unveilhooks = require('lazysizes/plugins/unveilhooks/ls.unveilhooks.js'); 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/main.js: -------------------------------------------------------------------------------- 1 | import styles from './../css/main.css'; 2 | import './clipboardjs.js' 3 | import './codeblocks.js' 4 | import './docsearch.js' 5 | import './lazysizes.js' 6 | import './menutoggle.js' 7 | import './scrolldir.js' 8 | import './smoothscroll.js' 9 | import './tabs.js' 10 | import './nojs.js' 11 | 12 | // TO use jQuery, just call the modules you want 13 | // var $ = require('jquery/src/core'); 14 | // require('jquery/src/core/init'); 15 | // require('jquery/src/manipulation'); 16 | 17 | // OR, use all of them 18 | // var $ = require('jquery/src/jquery'); 19 | 20 | // And write your code 21 | // $('body').append('

Jquery is working

'); 22 | // 23 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/nojs.js: -------------------------------------------------------------------------------- 1 | document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, 'js'); 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/scrolldir.js: -------------------------------------------------------------------------------- 1 | var scrollDir = require('scrolldir/dist/scrolldir.auto.min.js'); 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/js/tabs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Scripts which manages Code Toggle tabs. 3 | */ 4 | var i; 5 | // store tabs variable 6 | var allTabs = document.querySelectorAll("[data-toggle-tab]"); 7 | var allPanes = document.querySelectorAll("[data-pane]"); 8 | 9 | function toggleTabs(event) { 10 | 11 | if(event.target){ 12 | event.preventDefault(); 13 | var clickedTab = event.currentTarget; 14 | var targetKey = clickedTab.getAttribute("data-toggle-tab") 15 | }else { 16 | var targetKey = event 17 | } 18 | // We store the config language selected in users' localStorage 19 | if(window.localStorage){ 20 | window.localStorage.setItem("configLangPref", targetKey) 21 | } 22 | var selectedTabs = document.querySelectorAll("[data-toggle-tab='" + targetKey + "']"); 23 | var selectedPanes = document.querySelectorAll("[data-pane='" + targetKey + "']"); 24 | 25 | for (var i = 0; i < allTabs.length; i++) { 26 | allTabs[i].classList.remove("active"); 27 | allPanes[i].classList.remove("active"); 28 | } 29 | 30 | for (var i = 0; i < selectedTabs.length; i++) { 31 | selectedTabs[i].classList.add("active"); 32 | selectedPanes[i].classList.add("active"); 33 | } 34 | 35 | } 36 | 37 | for (i = 0; i < allTabs.length; i++) { 38 | allTabs[i].addEventListener("click", toggleTabs) 39 | } 40 | // Upon page load, if user has a preferred language in its localStorage, tabs are set to it. 41 | if(window.localStorage.getItem('configLangPref')) { 42 | toggleTabs(window.localStorage.getItem('configLangPref')) 43 | } 44 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/gohugoio-card-base-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/gohugoio-card-base-1.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/mulish-black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/assets/opengraph/mulish-black.ttf -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/config.toml: -------------------------------------------------------------------------------- 1 | 2 | [module] 3 | [module.hugoVersion] 4 | min = "0.56.0" 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |

The page you're looking for doesn't exist. Perhaps you'd like to gopher something else? Sorry.

4 |
5 | 6 |
7 | 8 | {{ .Content }} 9 |
10 | {{ end }} 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{ .Text | safeHTML }} 2 | {{- if and (ge .Level 2) (le .Level 4) }}{{" " -}} 3 | 4 | {{- end -}} 5 | 6 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/documentation-home.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ $section_to_display := (.Site.Taxonomies.categories.fundamentals).Pages | lang.Merge (.Sites.First.Taxonomies.categories.fundamentals).Pages }} 3 | {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) }} 3 | {{ $section_to_display := .Sections | default $paginator.Pages }} 4 | {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/page.html: -------------------------------------------------------------------------------- 1 |
2 | {{ if .Params.categories }} 3 | {{ range .Params.categories }} 4 | 5 | {{ humanize . | upper }} 6 | 7 | {{ end }} 8 | {{end}} 9 |

10 | {{- if eq .Section "functions" -}} 11 | {{ .LinkTitle }} 12 | {{- else -}} 13 | {{ .Title }} 14 | {{- end -}} 15 |

16 |
17 | 18 | 29 | 30 | {{ with .Params.featured_image_path }} 31 | Featured Image for {{ $.Title }} 32 | {{ end }} 33 | 34 |
35 | {{- partial "docs/functions-signature.html" . -}} 36 | {{ .Content }} 37 |
38 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 | 5 |
6 | {{- partial "toc.html" . -}} 7 |
8 | 9 | 17 |
18 | {{ partial "nav-links-docs.html" . }} 19 |
20 | 21 |
22 |
23 | 24 |
25 |
26 | {{ partial "docs/page-meta-data.html" . }} 27 | {{ partial "page-edit.html" . }} 28 | {{ partial "tags.html" . }} 29 |
30 |
31 | {{ end }} 32 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ $section_to_display := .Pages }} 3 | {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ $section_to_display := .Pages }} 3 |
4 | 5 |
6 |
7 | {{ partial "nav-links-docs.html" . }} 8 |
9 | 10 |
11 | 16 |
17 | {{ range $key, $value := .Data.Terms }} 18 |
19 |

20 | 21 | {{ $key }} 22 | 23 |

24 | {{ range $value.Pages }} 25 |

26 | 27 | {{ .Title }} 28 | 29 |

30 | {{ end }} 31 |
32 | 33 | {{ end }} 34 | 35 |
36 | 37 | 38 | 39 | 40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 |
48 | {{ end }} 49 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.headers: -------------------------------------------------------------------------------- 1 | /* 2 | X-Frame-Options: DENY 3 | X-XSS-Protection: 1; mode=block 4 | X-Content-Type-Options: nosniff 5 | Referrer-Policy: origin-when-cross-origin 6 | /* 7 | Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script 8 | Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style 9 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ define "header" }} 2 | {{ partial "hero" . }} 3 | {{ partial "boxes-small-news" . }} 4 | {{ end }} 5 | 6 | {{ define "main" }} 7 |
8 | {{- partial "home-page-sections/features-icons" . -}} 9 |
10 | 11 | 12 | 13 | 14 | 15 |
16 | {{- partial "home-page-sections/installation" . -}} 17 |
18 | 19 |
20 | {{- partial "home-page-sections/open-source-involvement" . -}} 21 |
22 | {{ end }} 23 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.redir: -------------------------------------------------------------------------------- 1 | # Netlify redirects. See https://www.netlify.com/docs/redirects/ 2 | {{ range $p := .Site.Pages -}} 3 | {{ range .Aliases }} 4 | {{ . | printf "%-35s" }} {{ $p.RelPermalink -}} 5 | {{ end -}} 6 | {{- end -}} 7 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/news/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | 4 |
5 |

6 | {{ .Title }} 7 |

8 |
9 | {{ .Content }} 10 |
11 |
12 | 13 | 14 | 15 |
16 | {{/* [wip] add archive lists 17 |
18 | 25 |
*/}} 26 | 27 | {{ $interior_classes := $.Site.Params.flex_box_interior_classes }} 28 |
29 | {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) -}} 30 | {{ range $paginator.Pages }} 31 | {{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" false) }} 32 | {{ end }} 33 |
34 |
35 | 39 | 40 |
41 | {{ end }} 42 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/boxes-section-summaries.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | {{ if eq .context.Section "news" }} 5 | 6 | {{ .context.Date.Format "January 2, 2006" }} 7 | 8 | {{ end }} 9 | 10 |

11 | 12 | {{- if eq .context.Section "functions" -}} 13 | {{ .context.LinkTitle }} 14 | {{- else -}} 15 | {{ .context.Title }} 16 | {{- end -}} 17 | 18 |

19 | 20 | 32 | 33 | 34 |
35 |
36 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/boxes-small-news.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 | {{ range first 4 ( sort (where .Site.RegularPages "Section" "news") "Date" "desc" ) }} 7 | 8 | {{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }} 9 | 10 | 11 | {{ .Date.Format "January 2, 2006" }} 12 | 13 | {{ .Params.description | markdownify | truncate 100 "…"}} 14 | 15 | {{ end }} 16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/components/author-github-data-card.html: -------------------------------------------------------------------------------- 1 | {{ $author := .context.Params.author }} 2 | {{ if $author }} 3 | 33 | {{ end }} 34 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/components/author-github-data.html: -------------------------------------------------------------------------------- 1 | {{ $author := .context.Params.author }} 2 | {{ if $author }} 3 | 21 | {{ end }} 22 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/functions-signature.html: -------------------------------------------------------------------------------- 1 | {{ if isset .Params "signature" -}} 2 | {{- with .Params.signature }} 3 |

Syntax

4 | {{- range . }} 5 |
 6 |         {{- . -}}
 7 |       
8 | {{- end }} 9 | {{- end -}} 10 | {{ end }} 11 | {{/* The inline style overrides `pre` styling defaults */}} 12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html: -------------------------------------------------------------------------------- 1 |
2 | Last updated: {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}: {{ .Subject }} ({{ .AbbreviatedHash }}){{end }} 3 |
4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/entry-summary.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ humanize .Section }} 4 |

5 | 6 | {{ .Title }} 7 | 8 |

9 | 12 |
13 |
14 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.GoogleAnalytics }} 2 | 3 | 25 | {{ end }} 26 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/head-additions.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/hero.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/features-single.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.sections }} 2 | {{ range .Params.sections }} 3 | {{ $.Scratch.Add "i" 1 }}{{ $i := $.Scratch.Get "i" }} 4 | 5 |
6 |
7 | 8 |
9 |
10 | image depicting an example of {{ .heading }} 11 |
12 |
13 | 14 |
15 |
16 |

{{ .heading }}

17 |

18 | {{ .copy }} 19 |

20 |

21 | 22 | {{ .cta }} {{ partial "svg/link-ext.svg" (dict "fill" "#333" "size" "14") }} 23 | 24 |

25 |
26 |
27 | 28 |
29 |
30 | 31 | {{ end }} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |
6 |

Install in seconds, build in milliseconds.

7 |

Stencil works on macOS, Windows and Linux.

8 |
9 |
10 | 11 | 12 | 20 |
21 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/hooks/after-body-start.html: -------------------------------------------------------------------------------- 1 | {{/* Deliberately empty */}} 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/hooks/before-body-end.html: -------------------------------------------------------------------------------- 1 | {{/* Deliberately empty */}} 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/icon-link.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 | {{ $menu := .Site.Menus.docs.ByWeight }} 3 |
    4 | {{ range $menu }}{{ $post := printf "%s" .Post }} 5 |
  • 6 | 7 | {{ .Name }} 8 | 9 |
  • 10 | {{end}} 11 |
12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 | 24 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 | {{ $menu := .Site.Menus.global }} 3 | 12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html: -------------------------------------------------------------------------------- 1 | 4 |
5 | {{ partial "nav-links-docs-mobile.html" . }} 6 |
7 | 8 |
9 | 10 | 11 | 12 |
13 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-top.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 |
3 | 11 | 12 | {{ partial "nav-links" .}} 13 |
14 | {{ partial "nav-button-open" .}} 15 |
16 |
17 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/get-featured-image.html: -------------------------------------------------------------------------------- 1 | {{ $images := $.Resources.ByType "image" }} 2 | {{ $featured := $images.GetMatch "*feature*" }} 3 | {{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }} 4 | {{ if not $featured }} 5 | {{ $featured = resources.Get "/opengraph/gohugoio-card-base-1.png" }} 6 | {{ $size := 80 }} 7 | {{ $title := $.LinkTitle }} 8 | {{ if gt (len $title) 20 }} 9 | {{ $size = 70 }} 10 | {{ end }} 11 | 12 | {{ $text := $title }} 13 | {{ $textOptions := dict 14 | "color" "#FFF" 15 | "size" $size 16 | "lineSpacing" 10 17 | "x" 65 "y" 80 18 | "font" (resources.Get "/opengraph/mulish-black.ttf") 19 | }} 20 | 21 | {{ $featured = $featured | images.Filter (images.Text $text $textOptions) }} 22 | {{ end }} 23 | 24 | {{ return $featured }} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html: -------------------------------------------------------------------------------- 1 | {{- with $.Params.images -}} 2 | 3 | 4 | {{ else -}} 5 | {{- $featured := partial "opengraph/get-featured-image.html" . }} 6 | {{- with $featured -}} 7 | 8 | 9 | {{- else -}} 10 | {{- with $.Site.Params.images -}} 11 | 12 | 13 | {{ else -}} 14 | 15 | {{- end -}} 16 | {{- end -}} 17 | {{- end }} 18 | 19 | 20 | {{ with .Site.Social.twitter -}} 21 | 22 | {{ end -}} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/page-edit.html: -------------------------------------------------------------------------------- 1 | Improve this page 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/page-header.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 | {{ $currentURL := .RelPermalink }} 3 |
4 | 20 |
21 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/pagelayout.html: -------------------------------------------------------------------------------- 1 | {{ $section_to_display := .section_to_display }} 2 |
3 | 4 |
5 |
6 | {{ partial "nav-links-docs.html" .context }} 7 |
8 | 9 |
10 | 18 | 19 | 20 | 21 |
22 | {{ $interior_classes := .context.Site.Params.flex_box_interior_classes }} 23 |
24 | {{ range $section_to_display }} 25 | {{ partial "boxes-section-summaries" (dict "context" . "classes" $interior_classes "fullcontent" true) }} 26 | {{ end }} 27 |
28 |
29 | 30 |
31 | 32 |
33 | 34 |
35 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/previous-next-links-in-section-with-title.html: -------------------------------------------------------------------------------- 1 | {{ if or .PrevInSection .NextInSection }} 2 | {{/* this div holds these a tags as a unit for flex-box display */}} 3 | 14 | {{ end }} 15 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/previous-next-links-in-section.html: -------------------------------------------------------------------------------- 1 | {{ if or .PrevInSection .NextInSection }} 2 | {{/* this div holds these a tags as a unit for flex-box display */}} 3 | 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/previous-next-links.html: -------------------------------------------------------------------------------- 1 | {{if .Prev }} 2 | 3 | {{ partial "svg/ic_chevron_left_black_24px.svg" (dict "size" "30px") }} {{ .Prev.Title }} 4 | 5 | {{end}} 6 | 7 | {{if .Next }} 8 | 9 | {{ .Next.Title }} {{ partial "svg/ic_chevron_right_black_24px.svg" (dict "size" "30px") }} 10 | 11 | {{end}} 12 | 13 | 14 | 26 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/related.html: -------------------------------------------------------------------------------- 1 | {{ $related := .Site.RegularPages.Related . | first 5 }} 2 | {{ with $related }} 3 |

See Also

4 | 9 | {{ end }} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-manifest.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-nav.html: -------------------------------------------------------------------------------- 1 | {{ $currentPage := . }} 2 | 39 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-scripts.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $scripts := resources.Get "output/js/app.js" }} 3 | {{ $isDev := eq hugo.Environment "development" }} 4 | {{ if not $isDev }} 5 | {{ $scripts = $scripts | fingerprint }} 6 | {{ end }} 7 | {{ with $scripts }} 8 | {{ if $isDev }} 9 | 10 | {{ else }} 11 | 12 | {{ end }} 13 | {{ $.Scratch.Set "scripts" . }} 14 | {{end}} 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/social-follow.html: -------------------------------------------------------------------------------- 1 | 2 | {{ with .Site.Social.twitter }} 3 | 6 | {{ end }} 7 | Star 8 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/summary.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ humanize .Section }} 4 |

5 | 6 | {{ .Title }} 7 | 8 |

9 | 12 |
13 |
14 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/Twitter_Logo_Blue.svg: -------------------------------------------------------------------------------- 1 | Twitter_Logo_Blue 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/apple.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/clipboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/clippy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/design.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/exclamation.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/exclamation.svg -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/focus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/freebsd.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/hugo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/ic_arrow_drop_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/ic_arrow_drop_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/ic_chevron_left_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/ic_chevron_right_black_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/link-ext.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/link-permalink.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/md.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/mdsolid.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Svg Vector Icons : http://www.onlinewebfonts.com/icon 6 | 7 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/search.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/windows.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/svg/yaml.svg: -------------------------------------------------------------------------------- 1 | icon -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/tags.html: -------------------------------------------------------------------------------- 1 | {{ $currentPageUrl := .RelPermalink }} 2 | {{ if and .Params.tags .Site.Taxonomies.tags }} 3 | {{ $name := index .Params.tags 0 }} 4 | {{ $name := $name | urlize }} 5 | {{ $tags := index .Site.Taxonomies.tags $name }} 6 | 7 |
8 | 36 |
37 | {{end}} 38 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | # robotstxt.org - if ENV production variable is false robots will be disallowed. 3 | {{ if eq (getenv "HUGO_ENV") "production" }} 4 | Disallow: admin/ 5 | Disallow: 6 | {{ else }} 7 | Disallow: / 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/articlelist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | {{ range $ind, $art := $.Site.Data.articles.article }} 11 | 12 | 13 | 14 | 15 | 16 | {{ end }} 17 | 18 |
Title 5 | Author 6 | Date 7 |
{{$art.title | markdownify }}{{ $art.author | markdownify }}{{ $art.date }}
19 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code-toggle.html: -------------------------------------------------------------------------------- 1 | {{ $langs := (slice "yaml" "toml" "json") }} 2 |
3 |
4 | {{- with .Get "file" -}} 5 |
{{ . }}.
6 | {{- end -}} 7 | {{ range $langs }} 8 |   9 | {{ end }} 10 |
11 |
12 | {{ range $langs }} 13 |
14 | {{ highlight ($.Inner | transform.Remarshal . | safeHTML) . ""}} 15 |
16 | {{ if ne ($.Get "copy") "false" }} 17 | 19 | {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} 20 | {{end}} 21 | {{ end }} 22 |
23 | 24 |
25 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/code.html: -------------------------------------------------------------------------------- 1 |
2 | {{- with .Get "file" -}} 3 |
{{.}}
4 | {{- end -}} 5 | 6 | {{ if ne (.Get "copy") "false" }} 7 | 9 | {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} 10 | {{end}} 11 |
12 | {{- .Inner -}} 13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/datatable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ range $ind, $art := $.Site.Data.articles.article }} 11 | 12 | 13 | 14 | 15 | 16 | {{ end }} 17 | 18 |
TitleAuthorDate
{{$art.title | markdownify }}{{ $art.author | markdownify }}{{ $art.date }}
-------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/directoryindex.html: -------------------------------------------------------------------------------- 1 | {{- $pathURL := .Get "pathURL" -}} 2 | {{- $path := .Get "path" -}} 3 | {{- $files := readDir $path -}} 4 | 5 | 6 | 7 | {{- range $files }} 8 | 9 | 10 | 11 | 12 | {{- end }} 13 |
Size in bytesName
{{ .Size }} {{ .Name }}
14 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/docfile.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get 0}} 2 | {{ $filepath := $file }} 3 | {{ $syntax := index (split $file ".") 1 }} 4 | {{ $syntaxoverride := eq (len .Params) 2 }} 5 |
6 |
{{$filepath}}
7 | 10 |
{{- readFile $file -}}
11 |
12 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/exfile.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get 0}} 2 | {{ $filepath := replace $file "static/" ""}} 3 | {{ $syntax := index (split $file ".") 1 }} 4 | {{ $syntaxoverride := eq (len .Params) 2 }} 5 |
6 |
{{$filepath}}
7 | 10 |
{{- readFile $file -}}
11 | Source 12 |
13 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/exfm.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $file := .Get 0}} 3 | {{ $filepath := replace $file "static/" ""}} 4 | {{ $syntax := index (split $file ".") 1 }} 5 | {{ $syntaxoverride := eq (len .Params) 2 }} 6 |
7 |
{{$filepath}}
8 | 11 |
{{- readFile $file -}}
12 | Source 13 |
-------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/gh.html: -------------------------------------------------------------------------------- 1 | {{ range .Params }} 2 | {{ if eq (substr . 0 1) "@" }} 3 | {{ . }} 4 | {{ else if eq (substr . 0 2) "0x" }} 5 | {{ substr . 2 6 }} 6 | {{ else }} 7 | #{{ . }} 8 | {{ end }} 9 | {{ end }} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/ghrepo.html: -------------------------------------------------------------------------------- 1 | GitHub repository -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/nohighlight.html: -------------------------------------------------------------------------------- 1 |
{{ .Inner }}
2 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/note.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/output.html: -------------------------------------------------------------------------------- 1 | {{$file := .Get "file"}} 2 | {{$icon := index (split $file ".") 1 }} 3 |
4 |
{{$file}}
5 | 8 |
9 | {{- .Inner -}} 10 |
11 |
-------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/readfile.html: -------------------------------------------------------------------------------- 1 | {{$file := .Get "file"}} 2 | {{- if eq (.Get "markdown") "true" -}} 3 | {{- $file | readFile | markdownify -}} 4 | {{- else -}} 5 | {{ $file | readFile | safeHTML }} 6 | {{- end -}} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/tip.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/warning.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/shortcodes/yt.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{if (.Get "thumbnail")}} 4 |
5 | {{else}} 6 |
7 | {{end}} 8 |
9 | {{ if (.Get "description") }} 10 |
{{ .Get "description" | markdownify }}
11 | {{ end }} -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gohugo-default-styles", 3 | "version": "1.1.0", 4 | "description": "Default Theme for Hugo Sites", 5 | "main": "index.js", 6 | "homepage": "https://gohugo.io/", 7 | "bugs": { 8 | "url": "https://github.com/gohugoio/gohugoioTheme/issues" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/gohugoio/gohugoioTheme.git" 13 | }, 14 | "author": "budparr", 15 | "license": "MIT", 16 | "scripts": { 17 | "build": "NODE_ENV=production webpack", 18 | "build-dev": "NODE_ENV=development webpack --progress --watch", 19 | "start": "npm run build-dev" 20 | }, 21 | "devDependencies": { 22 | "clean-webpack-plugin": "^1.0.0", 23 | "clipboard": "^2.0.4", 24 | "css-loader": "^2.1.1", 25 | "file-loader": "^2.0.0", 26 | "glob-all": "^3.3.1", 27 | "highlight.js": "^9.13.1", 28 | "lazysizes": "^5.2.1", 29 | "mini-css-extract-plugin": "^0.4.4", 30 | "postcss": "^7.0.36", 31 | "postcss-cssnext": "^3.1.0", 32 | "postcss-import": "^12.0.1", 33 | "postcss-loader": "^3.0.0", 34 | "purgecss-webpack-plugin": "^1.3.1", 35 | "scrolldir": "^1.4.0", 36 | "tachyons": "^4.7.0", 37 | "typeface-muli": "0.0.54", 38 | "webpack": "^4.44.1", 39 | "webpack-command": "^0.4.2", 40 | "@docsearch/js": "^3.0.0" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | #2d89ef 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-128.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-16x16.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-196x196.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-32x32.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon-96x96.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/favicon.ico -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-200italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-300italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-400italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-600italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-700italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-800italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900italic.woff -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/fonts/muli-latin-900italic.woff2 -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/images/GitHub-Mark-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/images/GitHub-Mark-64px.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-144x144.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-150x150.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-310x150.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-310x310.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/mstile-70x70.png -------------------------------------------------------------------------------- /docs/_vendor/github.com/gohugoio/gohugoioTheme/theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example 3 | 4 | name = "Hugo Theme" 5 | license = "MIT" 6 | licenselink = "https://github.com/gohugoio/gohugoioTheme/blob/master/license.md" 7 | description = "" 8 | homepage = "https://github.com/gohugoio/gohugoioTheme" 9 | tags = ["website"] 10 | features = ["", ""] 11 | min_version = 0.38 12 | 13 | [author] 14 | name = "Bud Parr" 15 | homepage = "https://github.com/budparr" 16 | -------------------------------------------------------------------------------- /docs/_vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 2 | -------------------------------------------------------------------------------- /docs/archetypes/command.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{.Command.Name | quote}} 3 | slug: {{.Command.Slug}} 4 | url: /commands/{{ .Command.Slug }}/ 5 | --- 6 | -------------------------------------------------------------------------------- /docs/archetypes/functions.md: -------------------------------------------------------------------------------- 1 | --- 2 | linktitle: "" 3 | description: "" 4 | publishdate: "" 5 | lastmod: "" 6 | categories: [functions] 7 | tags: [] 8 | ns: "" 9 | signature: [] 10 | workson: [] 11 | stencilversion: "" 12 | aliases: [] 13 | relatedfuncs: [] 14 | toc: false 15 | deprecated: false 16 | --- 17 | -------------------------------------------------------------------------------- /docs/config/_default/languages.toml: -------------------------------------------------------------------------------- 1 | 2 | [en] 3 | contentDir = "content/en" 4 | languageName = "English" 5 | weight = 1 6 | -------------------------------------------------------------------------------- /docs/config/_default/markup.toml: -------------------------------------------------------------------------------- 1 | defaultMarkdownHandler = "goldmark" 2 | 3 | [goldmark] 4 | [goldmark.extensions] 5 | definitionList = true 6 | footnote = true 7 | linkify = true 8 | strikethrough = true 9 | table = true 10 | taskList = true 11 | typographer = true 12 | [goldmark.parser] 13 | autoHeadingID = true 14 | autoHeadingIDType = "github" 15 | [goldmark.parser.attribute] 16 | block = true 17 | title = true 18 | [goldmark.renderer] 19 | hardWraps = false 20 | unsafe = false 21 | xhtml = false 22 | 23 | [highlight] 24 | style = "trac" 25 | lineNumbersInTable = true 26 | noClasses = false 27 | 28 | [tableOfContents] 29 | endLevel = 2 30 | ordered = false 31 | startLevel = 2 -------------------------------------------------------------------------------- /docs/config/_default/menus/menus.en.toml: -------------------------------------------------------------------------------- 1 | [[docs]] 2 | name = "About Stencil" 3 | weight = 1 4 | identifier = "about" 5 | url = "/about/" 6 | 7 | [[docs]] 8 | name = "Getting Started" 9 | weight = 5 10 | identifier = "getting-started" 11 | post = "break" 12 | url = "/getting-started/" 13 | 14 | # Core Menus 15 | [[docs]] 16 | name = "Reference Docs" 17 | weight = 15 18 | identifier = "reference" 19 | url = "/reference/" 20 | 21 | [[docs]] 22 | name = "Functions" 23 | weight = 30 24 | identifier = "functions" 25 | url = "/functions/" 26 | 27 | [[docs]] 28 | name = "CLI" 29 | weight = 40 30 | post = "break" 31 | identifier = "commands" 32 | url = "/commands/" 33 | 34 | # LOW LEVEL ITEMS 35 | [[docs]] 36 | name = "Contribute" 37 | weight = 100 38 | post = "break" 39 | identifier = "contribute" 40 | url = "/contribute/" 41 | 42 | ## Links in the navbar 43 | [[global]] 44 | name = "Docs" 45 | weight = 5 46 | identifier = "docs" 47 | url = "/documentation/" 48 | 49 | [[global]] 50 | name = "GitHub" 51 | weight = 200 52 | identifier = "github" 53 | post = "external" 54 | url = "https://github.com/getoutreach/stencil" -------------------------------------------------------------------------------- /docs/config/_default/params.toml: -------------------------------------------------------------------------------- 1 | 2 | description = "A smart templating engine for service development" 3 | ## Setting this to true will add a "noindex" to *EVERY* page on the site.. 4 | removefromexternalsearch = false 5 | ## Gh repo for site footer (include trailing slash) 6 | ghrepo = "https://github.com/getoutreach/stencil/" 7 | ## GH Repo for filing a new issue 8 | github_repo = "https://github.com/getoutreach/stencil/issues/new" 9 | ### Edit content repo (set to automatically enter "edit" mode; this is good for "improve this page" links) 10 | ghdocsrepo = "https://github.com/getoutreach/stencil-docs/" 11 | ## Gitter URL 12 | gitter = "" 13 | ## Discuss Forum URL 14 | forum = "https://github.com/getoutreach/stencil/discussions" 15 | ## Google Tag Manager 16 | gtmid = "" 17 | 18 | # First one is picked as the Twitter card image if not set on page. 19 | images = ["/stencil/images/gohugoio-card.png"] 20 | 21 | flex_box_interior_classes = "flex-auto w-100 w-40-l mr3 mb3 bg-white ba b--moon-gray nested-copy-line-height" 22 | 23 | #sidebar_direction = "sidebar_left" -------------------------------------------------------------------------------- /docs/config/_default/security.toml: -------------------------------------------------------------------------------- 1 | 2 | enableInlineShortcodes = false 3 | 4 | [exec] 5 | allow = ['^go$'] 6 | osEnv = ['^PATH$'] 7 | 8 | [funcs] 9 | getenv = ['^HUGO_', '^REPOSITORY_URL$', '^BRANCH$'] 10 | 11 | [http] 12 | methods = ['(?i)GET|POST'] 13 | urls = ['.*'] 14 | -------------------------------------------------------------------------------- /docs/config/development/params.toml: -------------------------------------------------------------------------------- 1 | # Params for development (server mode) 2 | -------------------------------------------------------------------------------- /docs/config/production/config.toml: -------------------------------------------------------------------------------- 1 | # Config for production 2 | 3 | # This is turned off in development as it is relatively slow. 4 | # This is needed to get accurate lastMod and Git commit info 5 | # on the docs pages. 6 | enableGitInfo = true -------------------------------------------------------------------------------- /docs/config/production/params.toml: -------------------------------------------------------------------------------- 1 | # Params for production 2 | 3 | -------------------------------------------------------------------------------- /docs/content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "A smart templating engine for service development" 3 | date: 2022-05-02T12:00:00-05:00 4 | features: 5 | - heading: Extensive Module Support 6 | image_path: /stencil/images/icon-built-in-templates.svg 7 | tagline: A DRY programmers dream 8 | copy: Stencil has extensive module support, allowing you to create a modular set of template and reuse them anywhere. 9 | 10 | - heading: Native Extensions 11 | image_path: /stencil/images/icon-custom-outputs.svg 12 | tagline: Go templates not enough? Stencil has native extensions to make it easy. 13 | copy: Stencil exposes an extension framework for writing and distributing native extensions for use by modules 14 | 15 | - heading: Any Format 16 | image_path: /stencil/images/icon-multilingual.svg 17 | tagline: You can generate anything with Stencil 18 | copy: Stencil is language agnostic and thus supports any combination of templates. 19 | 20 | - heading: Fast 21 | image_path: /stencil/images/icon-fast.svg 22 | tagline: Who wants to wait 23 | copy: Stencil is fast, written in Golang using go-templates allow it to render files incredibly quickly. 24 | 25 | sections: [] 26 | --- 27 | 28 | Stencil is a templating engine for generating microservices, libraries, and everything in-between. It replaces 29 | traditional bootstrapping tools by managing the entire lifecycle of a repository. 30 | -------------------------------------------------------------------------------- /docs/content/en/commands/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Commands Quick Reference 3 | linktitle: Commands Quick Reference 4 | description: Comprehensive list of Stencil commands 5 | date: 2017-02-01 6 | publishdate: 2017-02-01 7 | lastmod: 2017-02-01 8 | keywords: [] 9 | menu: 10 | docs: 11 | parent: "commands" 12 | weight: 01 #rem 13 | --- 14 | 15 | Below are all of the commands and options exposed by stencil since this documentation was last updated. 16 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_create.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil create 3 | linktitle: stencil create 4 | description: Commands to create template repositories, or stencil powered repositories 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil create 13 | 14 | ```bash 15 | NAME: 16 | stencil create - A new cli application 17 | 18 | USAGE: 19 | stencil create command [command options] [arguments...] 20 | 21 | DESCRIPTION: 22 | Commands to create template repositories, or stencil powered repositories 23 | 24 | COMMANDS: 25 | module, templaterepository 26 | help, h Shows a list of commands or help for one command 27 | 28 | OPTIONS: 29 | --help, -h show help (default: false) 30 | 31 | 32 | ``` 33 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_create_module.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil create module 3 | linktitle: stencil create module 4 | description: Creates a module with the provided name in the current directory 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil create module 13 | 14 | ```bash 15 | NAME: 16 | stencil create module 17 | 18 | USAGE: 19 | stencil create module [command options] create module 20 | 21 | DESCRIPTION: 22 | Creates a module with the provided name in the current directory 23 | 24 | OPTIONS: 25 | --native-extension Generates a native extension (default: false) 26 | 27 | 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_describe.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil describe 3 | linktitle: stencil describe 4 | description: Print information about a known file rendered by a template 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil describe 13 | 14 | ```bash 15 | NAME: 16 | stencil describe 17 | 18 | USAGE: 19 | stencil describe [command options] [arguments...] 20 | 21 | DESCRIPTION: 22 | Print information about a known file rendered by a template 23 | 24 | OPTIONS: 25 | --help, -h show help (default: false) 26 | 27 | 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil docs 3 | linktitle: stencil docs 4 | description: Commands for generating documentation 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil docs 13 | 14 | ```bash 15 | NAME: 16 | stencil docs - A new cli application 17 | 18 | USAGE: 19 | stencil docs command [command options] [arguments...] 20 | 21 | DESCRIPTION: 22 | Commands for generating documentation 23 | 24 | COMMANDS: 25 | generate Generate documentation 26 | help, h Shows a list of commands or help for one command 27 | 28 | OPTIONS: 29 | --help, -h show help (default: false) 30 | 31 | 32 | ``` 33 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_docs_generate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil docs generate 3 | linktitle: stencil docs generate 4 | description: Generates documentation for the current stencil module 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil docs generate 13 | 14 | ```bash 15 | NAME: 16 | stencil docs generate - Generate documentation 17 | 18 | USAGE: 19 | stencil docs generate [command options] [arguments...] 20 | 21 | DESCRIPTION: 22 | Generates documentation for the current stencil module 23 | 24 | OPTIONS: 25 | --help, -h show help (default: false) 26 | 27 | 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater 3 | linktitle: stencil updater 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater 13 | 14 | ```bash 15 | NAME: 16 | stencil updater - Commands for interacting with the built-in updater 17 | 18 | USAGE: 19 | stencil updater command [command options] [arguments...] 20 | 21 | COMMANDS: 22 | set-channel Set the channel to check for updates 23 | get-channels Returns the valid channels 24 | rollback Rollback to the previous version 25 | use Use a specific version of the application 26 | status Returns the current status of the updater 27 | help, h Shows a list of commands or help for one command 28 | 29 | OPTIONS: 30 | --help, -h show help (default: false) 31 | 32 | 33 | ``` 34 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_get-channel.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater get-channel 3 | linktitle: stencil updater get-channel 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater get-channel 13 | 14 | ```bash 15 | NAME: 16 | stencil updater get-channel - Returns the current channel: release or rc 17 | 18 | USAGE: 19 | stencil updater get-channel [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --help, -h show help (default: false) 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_get-channels.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater get-channels 3 | linktitle: stencil updater get-channels 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater get-channels 13 | 14 | ```bash 15 | NAME: 16 | stencil updater get-channels - Returns the valid channels 17 | 18 | USAGE: 19 | stencil updater get-channels [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --help, -h show help (default: false) 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_list-releases.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater list-releases 3 | linktitle: stencil updater list-releases 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater list-releases 13 | 14 | ```bash 15 | NAME: 16 | stencil updater list-releases - List all releases 17 | 18 | USAGE: 19 | stencil updater list-releases [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --limit value, -L value The number of releases to list (default: 50) 23 | --help, -h show help (default: false) 24 | 25 | 26 | ``` 27 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_rollback.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater rollback 3 | linktitle: stencil updater rollback 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater rollback 13 | 14 | ```bash 15 | NAME: 16 | stencil updater rollback - Rollback to the previous version 17 | 18 | USAGE: 19 | stencil updater rollback [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --version value The version to rollback to (default: "v1.28.0") 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_set-channel.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater set-channel 3 | linktitle: stencil updater set-channel 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater set-channel 13 | 14 | ```bash 15 | NAME: 16 | stencil updater set-channel - Set the channel to check for updates 17 | 18 | USAGE: 19 | stencil updater set-channel [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --reset Reset the channel to the default (default: false) 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_status.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater status 3 | linktitle: stencil updater status 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater status 13 | 14 | ```bash 15 | NAME: 16 | stencil updater status - Returns the current status of the updater 17 | 18 | USAGE: 19 | stencil updater status [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --debug Show debug information (default: false) 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/commands/stencil_updater_use.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil updater use 3 | linktitle: stencil updater use 4 | description: 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## stencil updater use 13 | 14 | ```bash 15 | NAME: 16 | stencil updater use - Use a specific version of the application 17 | 18 | USAGE: 19 | stencil updater use [command options] [arguments...] 20 | 21 | OPTIONS: 22 | --list List available versions (default: false) 23 | 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/content/en/contribute/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contribute to the Stencil Project 3 | linktitle: Contribute to Stencil 4 | description: Contribute to Stencil development and documentation. 5 | date: 2022-05-02 6 | publishdate: 2022-05-02 7 | lastmod: 2022-05-02 8 | categories: [contribute] 9 | keywords: [] 10 | menu: 11 | docs: 12 | parent: "contribute" 13 | weight: 01 14 | weight: 01 #rem 15 | draft: false 16 | slug: 17 | aliases: [/tutorials/how-to-contribute-to-stencil/, /community/contributing/] 18 | toc: false 19 | --- 20 | 21 | Stencil relies heavily on the enthusiasm and participation of the open-source community. We need your support in both its development and documentation. 22 | 23 | Stencil's contribution guidelines are [detailed in a `CONTRIBUTING.md`](https://github.com/getoutreach/stencil/blob/main/CONTRIBUTING.md) in the Stencil source repository on GitHub. 24 | -------------------------------------------------------------------------------- /docs/content/en/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Stencil Documentation 3 | linktitle: Stencil 4 | description: A smart templating engine for service development 5 | date: 2022-05-02 6 | publishdate: 2022-05-02 7 | menu: 8 | main: 9 | parent: "section name" 10 | weight: 01 11 | weight: 01 #rem 12 | layout: documentation-home 13 | --- 14 | 15 | Below you will find some of the most common and helpful pages from our documentation. 16 | -------------------------------------------------------------------------------- /docs/content/en/functions/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Functions Quick Reference 3 | linktitle: Functions Quick Reference 4 | description: Comprehensive list of Stencil templating functions, including basic and advanced usage examples. 5 | date: 2017-02-01 6 | publishdate: 2017-02-01 7 | lastmod: 2017-02-01 8 | keywords: [] 9 | menu: 10 | docs: 11 | parent: "functions" 12 | weight: 01 #rem 13 | draft: false 14 | aliases: [/layout/functions/, /templates/functions] 15 | --- 16 | 17 | Go templates are lightweight but extensible. Go itself supplies built-in functions, including comparison operators and other basic tools. These are listed in the [Go template documentation][gofuncs]. Stencil exposes more functions through [Sprig](sprig) and itself. 18 | 19 | [gofuncs]: https://golang.org/pkg/text/template/#hdr-Functions 20 | [sprig]: http://masterminds.github.io/sprig/ 21 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Block.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Block 3 | linktitle: file.Block 4 | description: > 5 | Block returns the contents of a given block 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | ###Block(name) 16 | Hello, world! 17 | ###EndBlock(name) 18 | 19 | ###Block(name) 20 | {{- /* Only output if the block is set */}} 21 | {{- if not (empty (file.Block "name")) }} 22 | {{ file.Block "name" }} 23 | {{- end }} 24 | ###EndBlock(name) 25 | 26 | ###Block(name) 27 | {{ - /* Short hand syntax, but adds newline if no contents */}} 28 | {{ file.Block "name" }} 29 | ###EndBlock(name) 30 | ``` 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Create.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Create 3 | linktitle: file.Create 4 | description: > 5 | Create creates a new file that is rendered by the current template 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | If the template has a single file with no contents this file replaces it\. 15 | 16 | 17 | ```go-text-template 18 | {{- define "command" }} 19 | package main 20 | 21 | import "fmt" 22 | 23 | func main() { 24 | fmt.Println("hello, world!") 25 | } 26 | 27 | {{- end }} 28 | 29 | # Generate a ".go" file for each command in .arguments.commands 30 | {{- range $_, $commandName := (stencil.Arg "commands") }} 31 | {{- file.Create (printf "cmd/%s.go" $commandName) 0600 now }} 32 | {{- stencil.ApplyTemplate "command" | file.SetContents }} 33 | {{- end }} 34 | ``` 35 | 36 | 37 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Delete.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Delete 3 | linktitle: file.Delete 4 | description: > 5 | Delete deletes the current file being rendered 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ file.Delete }} 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Path.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Path 3 | linktitle: file.Path 4 | description: > 5 | Path returns the current path of the file we're writing to 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ file.Path }} 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.RemoveAll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.RemoveAll 3 | linktitle: file.RemoveAll 4 | description: > 5 | RemoveAll deletes all the contents in the provided path 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ file.RemoveAll "path" }} 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.SetContents.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.SetContents 3 | linktitle: file.SetContents 4 | description: > 5 | SetContents sets the contents of file being rendered to the value 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | This is useful for programmatic file generation within a template\. 15 | 16 | 17 | ```go-text-template 18 | {{ file.SetContents "Hello, world!" }} 19 | ``` 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.SetPath.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.SetPath 3 | linktitle: file.SetPath 4 | description: > 5 | SetPath changes the path of the current file being rendered 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ $_ := file.SetPath "new/path/to/file.txt" }} 16 | ``` 17 | 18 | 19 | Note: The $\_ is required to ensure \ isn't outputted into the template\. 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Skip.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Skip 3 | linktitle: file.Skip 4 | description: > 5 | Skip skips the current file being rendered 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ $_ := file.Skip "A reason to skip this reason" }} 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/content/en/functions/file.Static.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: file.Static 3 | linktitle: file.Static 4 | description: > 5 | Static marks the current file as static 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | Marking a file is equivalent to calling file\.Skip\, but instead file\.Skip is only called if the file already exists\. This is useful for files you want to generate but only once\. It's generally recommended that you do not do this as it limits your ability to change the file in the future\. 15 | 16 | 17 | ```go-text-template 18 | {{ $_ := file.Static }} 19 | ``` 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.AddToModuleHook.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.AddToModuleHook 3 | linktitle: stencil.AddToModuleHook 4 | description: > 5 | AddToModuleHook adds to a hook in another module 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | This functions write to module hook owned by another module for it to operate on\. These are not strongly typed so it's best practice to look at how the owning module uses it for now\. Module hooks must always be written to with a list to ensure that they can always be written to multiple times\. 15 | 16 | 17 | ```go-text-template 18 | {{- /* This writes to a module hook */}} 19 | {{ stencil.AddToModuleHook "github.com/myorg/repo" "myModuleHook" (list "myData") }} 20 | ``` 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.ApplyTemplate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.ApplyTemplate 3 | linktitle: stencil.ApplyTemplate 4 | description: > 5 | ApplyTemplate executes a template inside of the current module 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | This function does not support rendering a template from another module\. 15 | 16 | 17 | ```go-text-template 18 | {{- define "command"}} 19 | package main 20 | 21 | import "fmt" 22 | 23 | func main() { 24 | fmt.Println("hello, world!") 25 | } 26 | 27 | {{- end }} 28 | 29 | {{- stencil.ApplyTemplate "command" | file.SetContents }} 30 | ``` 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.Arg.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.Arg 3 | linktitle: stencil.Arg 4 | description: > 5 | Arg returns the value of an argument in the service's manifest 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{- stencil.Arg "name" }} 16 | ``` 17 | 18 | 19 | Note: Using \`stencil\.Arg\` with no path returns all arguments and is equivalent to \`stencil\.Args\`\. However\, that is DEPRECATED along with \`stencil\.Args\` as it doesn't provide default types\, or check the JSON schema\, or track which module calls what argument\. 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.Args.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.Args 3 | linktitle: stencil.Args 4 | description: > 5 | 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | Deprecated: Use Arg instead\. Args returns all arguments passed to stencil from the service's manifest 14 | 15 | 16 | Note: This doesn't set default values and is instead representative of \_all\_ data passed in its raw form\. 17 | 18 | 19 | This is deprecated and will be removed in a future release\. 20 | 21 | 22 | ```go-text-template 23 | {{- (stencil.Args).name }} 24 | ``` 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.Exists.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.Exists 3 | linktitle: stencil.Exists 4 | description: > 5 | Exists returns true if the file exists in the current directory 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{- if stencil.Exists "myfile.txt" }} 16 | {{ stencil.ReadFile "myfile.txt" }} 17 | {{- end }} 18 | ``` 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.GetGlobal.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.GetGlobal 3 | linktitle: stencil.GetGlobal 4 | description: > 5 | 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | GetGlobal retrieves a global variable set by SetGlobal\. The data returned from this function is unstructured so by averse to panics \- look at where it was set to ensure you're dealing with the proper type of data that you think it is\. 14 | 15 | 16 | ```go-text-template 17 | {{- /* This retrieves a global from the current context of the template module repository */}} 18 | {{ $isGeorgeCool := stencil.GetGlobal "IsGeorgeCool" }} 19 | ``` 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.GetModuleHook.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.GetModuleHook 3 | linktitle: stencil.GetModuleHook 4 | description: > 5 | GetModuleHook returns a module block in the scope of this module 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | This is incredibly useful for allowing other modules to write to files that your module owns\. Think of them as extension points for your module\. The value returned by this function is always a \[\]interface\{\}\, aka a list\. 15 | 16 | 17 | ```go-text-template 18 | {{- /* This returns a []interface{} */}} 19 | {{ $hook := stencil.GetModuleHook "myModuleHook" }} 20 | {{- range $hook }} 21 | {{ . }} 22 | {{- end }} 23 | ``` 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.ReadBlocks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.ReadBlocks 3 | linktitle: stencil.ReadBlocks 4 | description: > 5 | 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | ReadBlocks parses a file and attempts to read the blocks from it\, and their data\. 14 | 15 | 16 | As a special case\, if the file does not exist\, an empty map is returned instead of an error\. 17 | 18 | 19 | \*\*NOTE\*\*: This function does not guarantee that blocks are able to be read during runtime\. for example\, if you try to read the blocks of a file from another module there is no guarantee that that file will exist before you run this function\. Nor is there the ability to tell stencil to do that \(stencil does not have any order guarantees\)\. Keep that in mind when using this function\. 20 | 21 | 22 | ```go-text-template 23 | {{- $blocks := stencil.ReadBlocks "myfile.txt" }} 24 | {{- range $name, $data := $blocks }} 25 | {{- $name }} 26 | {{- $data }} 27 | {{- end }} 28 | ``` 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.ReadFile.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.ReadFile 3 | linktitle: stencil.ReadFile 4 | description: > 5 | ReadFile reads a file from the current directory and returns it's contents 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | 14 | ```go-text-template 15 | {{ stencil.ReadFile "myfile.txt" }} 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/content/en/functions/stencil.SetGlobal.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: stencil.SetGlobal 3 | linktitle: stencil.SetGlobal 4 | description: > 5 | 6 | date: 2022-05-18 7 | categories: [functions] 8 | menu: 9 | docs: 10 | parent: "functions" 11 | --- 12 | 13 | SetGlobal sets a global to be used in the context of the current template module repository\. This is useful because sometimes you want to define variables inside of a helpers template file after doing manifest argument processing and then use them within one or more template files to be rendered; however\, go templates limit the scope of symbols to the current template they are defined in\, so this is not possible without external tooling like this function\. 14 | 15 | 16 | This template function stores \(and its inverse\, GetGlobal\, retrieves\) data that is not strongly typed\, so use this at your own risk and be averse to panics that could occur if you're using the data it returns in the wrong way\. 17 | 18 | 19 | ```go-text-template 20 | {{- /* This writes a global into the current context of the template module repository */}} 21 | {{ stencil.SetGlobal "IsGeorgeCool" true }} 22 | ``` 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/content/en/getting-started/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Get Started 3 | linktitle: Get Started Overview 4 | description: Quick start and guides for installing stencil on your preferred operating system. 5 | date: 2017-02-01 6 | publishdate: 2017-02-01 7 | lastmod: 2017-02-01 8 | categories: [getting started] 9 | keywords: [usage, docs] 10 | menu: 11 | docs: 12 | parent: "getting-started" 13 | weight: 1 14 | weight: 0001 #rem 15 | draft: false 16 | aliases: [/overview/introduction/] 17 | toc: false 18 | --- 19 | 20 | If this is your first time using Stencil and you've [already installed Stencil on your machine][installed], we recommend the [quick start][]. 21 | 22 | [installed]: /stencil/getting-started/installing/ 23 | [quick start]: /stencil/getting-started/quick-start/ 24 | -------------------------------------------------------------------------------- /docs/content/en/maintenance/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maintenance 3 | description: Some lists useful for the maintenance of the Stencil docs site. 4 | date: 2018-02-09 5 | categories: [maintenance] 6 | keywords: [maintenance] 7 | menu: 8 | docs: 9 | weight: 200 10 | slug: 11 | aliases: [] 12 | toc: true 13 | --- 14 | -------------------------------------------------------------------------------- /docs/content/en/reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reference Docs Overview 3 | linktitle: Reference Docs Overview 4 | description: A comprehensive list of Stencil reference documentation 5 | date: 2022-05-02 6 | menu: 7 | docs: 8 | parent: "reference" 9 | weight: 1 10 | --- 11 | -------------------------------------------------------------------------------- /docs/content/en/reference/service.yaml.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: service.yaml 3 | linktitle: Service Manifest 4 | description: The service.yaml passes arguments and defines which modules an application should use 5 | date: 2022-05-04 6 | publishdate: 2022-05-04 7 | menu: 8 | docs: 9 | parent: "reference" 10 | weight: 4 11 | categories: [application] 12 | keywords: [application, service manifest] 13 | toc: true 14 | --- 15 | 16 | ## What is a `service.yaml`? 17 | 18 | A `service.yaml` can be thought as the specification for an application based on the modules being used. It defines the modules an application uses and the arguments to pass to them. 19 | 20 | ## What are the fields in a `service.yaml` 21 | 22 | - `name`: The name of the application 23 | - `arguments`: The arguments to pass to the modules. This is a map of key value pairs. 24 | - `modules`: The modules to use. This is a list of objects containing a `name` and a, optionally, `version` field to use of this module. 25 | - `replacements`: A key/value of importPath to replace with another source. This is useful for replacing modules with a different version or local testing. Source should be a valid URL, import path, or file path on disk. 26 | -------------------------------------------------------------------------------- /docs/gen/commands/markdown.md.tpl: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ .Command }} 3 | linktitle: {{ .Command }} 4 | description: {{ .Description }} 5 | date: 2022-05-04 6 | categories: [commands] 7 | menu: 8 | docs: 9 | parent: "commands" 10 | --- 11 | 12 | ## {{ .Command }} 13 | 14 | ```bash 15 | {{ .Output }} 16 | ``` 17 | -------------------------------------------------------------------------------- /docs/gen/functions/functions.md.tpl: -------------------------------------------------------------------------------- 1 | --- 2 | {{- $description := "" }} 3 | {{- /* Use the first paragraph in a comment as the description */}} 4 | {{- range .Doc.Blocks }} 5 | {{- if eq .Kind "header" }} 6 | {{- $description = .Text }} 7 | {{- break}} 8 | {{- end }} 9 | {{- end }} 10 | {{- $namespace := "" }} 11 | {{- if eq .Receiver "*TplStencil" }} 12 | {{- $namespace = "stencil" }} 13 | {{- else if eq .Receiver "*TplFile" }} 14 | {{- $namespace = "file" }} 15 | {{- end }} 16 | title: {{ $namespace }}.{{ .Name }} 17 | linktitle: {{ $namespace }}.{{ .Name }} 18 | description: > 19 | {{ $description }} 20 | date: 2022-05-18 21 | categories: [functions] 22 | menu: 23 | docs: 24 | parent: "functions" 25 | --- 26 | 27 | {{ range .Doc.Blocks }} 28 | {{- /* Use text but not the description */}} 29 | {{- if eq .Kind "paragraph" }} 30 | {{- paragraph .Text }} 31 | {{- else if eq .Kind "code" }} 32 | {{- codeBlock "go-text-template" .Text }} 33 | {{- end }} 34 | {{ end }} -------------------------------------------------------------------------------- /docs/layouts/_default/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 |
2 | {{- .Inner | safeHTML }} 3 |
4 | {{ .Page.Store.Set "hasMermaid" true }} 5 | -------------------------------------------------------------------------------- /docs/layouts/partials/hooks/before-body-end.html: -------------------------------------------------------------------------------- 1 | {{ if .Page.Store.Get "hasMermaid" }} 2 | 3 | 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /docs/layouts/partials/maintenance-pages-table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ range . }} 11 | 12 | 13 | 16 | 21 | 22 | {{ end }} 23 | 24 |
LastModLinkGitHub
{{ .Lastmod.Format "2006-01-02" }} 14 | {{ .Title }} 15 | 17 | 18 | {{ with .GitInfo }}{{ .Subject }}{{ else }}Source{{ end }} 19 | 20 |
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/asciicast.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get 0 }} 2 | 3 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/chroma-lexers.html: -------------------------------------------------------------------------------- 1 |
2 | {{ range .Site.Data.docs.chroma.lexers }} 3 |
{{ .Name }}
4 |
{{ delimit .Aliases ", " }}
5 | {{ end }} 6 |
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/code.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get "file" }} 2 | {{ $codeLang := "" }} 3 | {{ $suffix := findRE "(\\.[^.]+)$" $file 1 }} 4 | {{ with $suffix }} 5 | {{ $codeLang = (index . 0 | strings.TrimPrefix ".") }} 6 | {{ end }} 7 | {{ with .Get "codeLang" }}{{ $codeLang = . }}{{ end }} 8 | {{ if eq $codeLang "html" }} 9 | {{ $codeLang = "go-html-template" }} 10 | {{ end }} 11 |
12 | {{- with $file -}} 13 |
{{ . }}
14 | {{- end -}} 15 | 16 | {{ if ne (.Get "copy") "false" }} 17 | 19 | {{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}} 20 | {{ end }} 21 |
22 | {{ $inner := trim .Inner "\n" | safeHTML }} 23 | {{ if .Get "nocode" }}{{ $inner }}{{ else }}{{ with $codeLang }}{{ highlight $inner . "" }}{{ else }}
{{ $inner }}
{{ end }}{{ end }} 24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/content-tree.html: -------------------------------------------------------------------------------- 1 |
2 |

 3 |         ├── blog
 4 |         │   ├── _index.md [section]
 5 |         │   ├── first-post.md [page]
 6 |         │   └── second-post
 7 |         │       ├── index.md [page bundle]
 8 |         │       └── photo.jpg [page resource]
 9 |         └── tags
10 |             ├── _index.md [taxonomy]
11 |             └── funny
12 |                 └── _index.md [term]
13 |     
14 |
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/datatable.html: -------------------------------------------------------------------------------- 1 | {{ $package := (index .Params 0) }} 2 | {{ $listname := (index .Params 1) }} 3 | {{ $list := (index (index .Site.Data.docs $package) $listname) }} 4 | {{ $fields := after 2 .Params }} 5 | 6 | 7 | 8 | {{ range $fields }} 9 | 10 | {{ end }} 11 | 12 | {{ range $list }} 13 | 14 | {{ range $k, $v := . }} 15 | {{ $.Scratch.Set $k $v }} 16 | {{ end }} 17 | {{ range $fields }} 18 | 19 | {{ end }} 20 | 21 | {{ end }} 22 |
{{ . }}
{{ $.Scratch.Get . }}
23 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/directoryindex.html: -------------------------------------------------------------------------------- 1 | {{- $pathURL := .Get "pathURL" -}} 2 | {{- $path := .Get "path" -}} 3 | {{- $files := readDir $path -}} 4 | 5 | 6 | 7 | {{- range $files }} 8 | 9 | 10 | 11 | 12 | {{- end }} 13 |
Size in bytesName
{{ .Size }} {{ .Name }}
14 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/docfile.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get 0}} 2 | {{ $filepath := $file }} 3 | {{ $syntax := index (split $file ".") 1 }} 4 | {{ $syntaxoverride := eq (len .Params) 2 }} 5 |
6 |
{{$filepath}}
7 | 10 |
{{- readFile $file -}}
11 |
12 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/exfile.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get 0}} 2 | {{ $filepath := replace $file "static/" ""}} 3 | {{ $syntax := index (split $file ".") 1 }} 4 | {{ $syntaxoverride := eq (len .Params) 2 }} 5 |
6 |
{{$filepath}}
7 | 10 |
{{- readFile $file -}}
11 | Source 12 |
13 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/exfm.html: -------------------------------------------------------------------------------- 1 | 2 | {{ $file := .Get 0}} 3 | {{ $filepath := replace $file "static/" ""}} 4 | {{ $syntax := index (split $file ".") 1 }} 5 | {{ $syntaxoverride := eq (len .Params) 2 }} 6 |
7 |
{{$filepath}}
8 | 11 |
{{- readFile $file -}}
12 | Source 13 |
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/funcsig.html: -------------------------------------------------------------------------------- 1 |

Syntax

2 |
3 |     {{- .Inner -}}
4 | 
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/getcontent.html: -------------------------------------------------------------------------------- 1 | 7 | {{- $path := .Get "path" -}} 8 | {{ $glob := .Get "glob" -}} 9 | 10 | {{ $resources := slice -}} 11 | {{ with $glob -}} 12 | {{ $bundle := site.GetPage $path -}} 13 | {{ $resources = $bundle.Resources.Match $glob -}} 14 | {{ else -}} 15 | {{ $bundle := site.GetPage (path.Dir $path) -}} 16 | {{ $resources = $bundle.Resources.Match (path.Base $path) -}} 17 | {{ end -}} 18 | 19 | {{ range $resources -}} 20 | {{ .Content }} 21 | {{ end -}} 22 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/gh.html: -------------------------------------------------------------------------------- 1 | {{ range .Params }} 2 | {{ if eq (substr . 0 1) "@" }} 3 | {{ . }} 4 | {{ else if eq (substr . 0 2) "0x" }} 5 | {{ substr . 2 6 }} 6 | {{ else }} 7 | #{{ . }} 8 | {{ end }} 9 | {{ end }} 10 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/ghrepo.html: -------------------------------------------------------------------------------- 1 | GitHub repository -------------------------------------------------------------------------------- /docs/layouts/shortcodes/gomodules-info.html: -------------------------------------------------------------------------------- 1 | {{ $text := ` 2 | Go modules are required for stencil. 3 | 4 | For more information about Go Modules, see: 5 | 6 | * https://github.com/golang/go/wiki/Modules 7 | * https://blog.golang.org/using-go-modules 8 | ` }} 9 | 10 | 18 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/imgproc.html: -------------------------------------------------------------------------------- 1 | {{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} 2 | {{ $command := .Get 1 }} 3 | {{ $options := .Get 2 }} 4 | {{ if eq $command "Fit"}} 5 | {{ $img = $img.Fit $options }} 6 | {{ else if eq $command "Resize"}} 7 | {{ $img = $img.Resize $options }} 8 | {{ else if eq $command "Fill"}} 9 | {{ $img = $img.Fill $options }} 10 | {{ else if eq $command "Crop"}} 11 | {{ $img = $img.Crop $options }} 12 | {{ else }} 13 | {{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}} 14 | {{ end }} 15 |
16 | 17 |
18 | 19 | {{ with .Inner }} 20 | {{ . }} 21 | {{ else }} 22 | .{{ $command }} "{{ $options }}" 23 | {{ end }} 24 | 25 |
26 |
27 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/new-in.html: -------------------------------------------------------------------------------- 1 | {{ $version := .Get 0 }} 2 | {{ if not $version }} 3 | {{ errorf "Missing version in new-in shortcode "}} 4 | {{ end }} 5 | {{ $version = $version | strings.TrimPrefix "v" }} 6 | 9 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/nohighlight.html: -------------------------------------------------------------------------------- 1 |
{{ .Inner }}
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/note.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/output.html: -------------------------------------------------------------------------------- 1 | {{$file := .Get "file"}} 2 | {{$icon := index (split $file ".") 1 }} 3 |
4 |
{{$file}}
5 |
6 |
{{- .Inner | string -}}
7 |
8 |
-------------------------------------------------------------------------------- /docs/layouts/shortcodes/page-kinds.html: -------------------------------------------------------------------------------- 1 | | Kind | Description | Example | 2 | |----------------|--------------------------------------------------------------------|-------------------------------------------------------------------------------| 3 | | `home` | The landing page for the home page | `/index.html` | 4 | | `page` | The landing page for a given page | `my-post` page (`/posts/my-post/index.html`) | 5 | | `section` | The landing page of a given section | `posts` section (`/posts/index.html`) | 6 | | `taxonomy` | The landing page for a taxonomy | `tags` taxonomy (`/tags/index.html`) | 7 | | `term` | The landing page for one taxonomy's term | term `awesome` in `tags` taxonomy (`/tags/awesome/index.html`) | 8 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/params.html: -------------------------------------------------------------------------------- 1 | {{- $param := .Get "param" }} 2 | {{ index .Site.Params $param }} -------------------------------------------------------------------------------- /docs/layouts/shortcodes/readfile.html: -------------------------------------------------------------------------------- 1 | {{$file := .Get "file"}} 2 | {{- if eq (.Get "markdown") "true" -}} 3 | {{- $file | readFile | markdownify -}} 4 | {{- else if (.Get "highlight") -}} 5 | {{- highlight ($file | readFile) (.Get "highlight") "" -}} 6 | {{- else -}} 7 | {{ $file | readFile | safeHTML }} 8 | {{- end -}} -------------------------------------------------------------------------------- /docs/layouts/shortcodes/tip.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 10 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/todo.html: -------------------------------------------------------------------------------- 1 | {{ if .Inner }}{{ end }} -------------------------------------------------------------------------------- /docs/layouts/shortcodes/warning.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /docs/layouts/shortcodes/yt.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{if (.Get "thumbnail")}} 4 |
5 | {{else}} 6 |
7 | {{end}} 8 |
9 | {{ if (.Get "description") }} 10 |
{{ .Get "description" | markdownify }}
11 | {{ end }} -------------------------------------------------------------------------------- /docs/netlify.toml: -------------------------------------------------------------------------------- 1 | # Support /stencil/, which is how production is deployed. 2 | [[redirects]] 3 | from = "/stencil/*" 4 | to = "/:splat" 5 | status = 200 6 | force = true -------------------------------------------------------------------------------- /docs/resources/.gitattributes: -------------------------------------------------------------------------------- 1 | *.* linguist-generated=true 2 | *.* -diff -merge -------------------------------------------------------------------------------- /docs/resources/_gen/assets/css/output/css/app.css_d11fe7b62c27961c87ecd0f2490357b9.json: -------------------------------------------------------------------------------- 1 | { 2 | "Target": "output/css/app.min.2ac9b5935f7ff7709fe13c2b042a4a2d49fa96fb508e3e8870019ee9b72cf329.css", 3 | "MediaType": "text/css", 4 | "Data": {"Integrity": "sha256-Ksm1k19/93Cf4TwrBCpKLUn6lvtQjj6IcAGe6bcs8yk="} 5 | } 6 | -------------------------------------------------------------------------------- /docs/resources/_gen/assets/js/output/js/app.js_8848f55d07695b7ff7188138f23d69e3.json: -------------------------------------------------------------------------------- 1 | { 2 | "Target": "output/js/app.09ca7921ca2b6e15c2dc516eccf642c08861fe5c249cc9073fb370c0a8a9022c.js", 3 | "MediaType": "application/javascript", 4 | "Data": {"Integrity": "sha256-Ccp5IcorbhXC3FFuzPZCwIhh/lwknMkHP7NwwKipAiw="} 5 | } 6 | -------------------------------------------------------------------------------- /docs/src/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "lockfileVersion": 1 3 | } 4 | -------------------------------------------------------------------------------- /docs/static/fonts/hugo.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/fonts/hugo.eot -------------------------------------------------------------------------------- /docs/static/fonts/hugo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/fonts/hugo.ttf -------------------------------------------------------------------------------- /docs/static/img/stencil-logo-med.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/img/stencil-logo-med.png -------------------------------------------------------------------------------- /docs/static/img/stencil-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/img/stencil-logo.png -------------------------------------------------------------------------------- /docs/static/img/stencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/img/stencil.png -------------------------------------------------------------------------------- /docs/static/img/stencilSM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/docs/static/img/stencilSM.png -------------------------------------------------------------------------------- /glados.hcl: -------------------------------------------------------------------------------- 1 | action "ensure_jira_in_pr" "jira_for_everyone" { 2 | enabled = false 3 | } 4 | -------------------------------------------------------------------------------- /internal/codegen/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains the docs for the codegen 4 | // package. 5 | 6 | // Package codegen implements the core code generation functionality 7 | // of stencil. This package contains everything from the template 8 | // functions exposed to stencil templates, to the core stencil renderer 9 | // that powers everything. 10 | package codegen 11 | -------------------------------------------------------------------------------- /internal/codegen/file_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Contains tests for the file file 4 | 5 | package codegen 6 | 7 | import ( 8 | "io" 9 | "testing" 10 | 11 | "github.com/go-git/go-billy/v5/memfs" 12 | "gotest.tools/v3/assert" 13 | ) 14 | 15 | func TestFile_Size(t *testing.T) { 16 | fs := memfs.New() 17 | f, err := fs.Create("hello.txt") 18 | assert.NilError(t, err, "failed to create test file in memory") 19 | 20 | _, err = f.Write([]byte("hello world")) 21 | assert.NilError(t, err, "failed to write test data to test file in memory") 22 | assert.NilError(t, f.Close(), "failed to close file") 23 | 24 | f, err = fs.Open("hello.txt") 25 | assert.NilError(t, err, "failed to open test file in memory") 26 | 27 | data, err := io.ReadAll(f) 28 | assert.NilError(t, err, "failed to read data from test file") 29 | assert.NilError(t, f.Close(), "failed to close file") 30 | 31 | inf, err := fs.Stat("hello.txt") 32 | assert.NilError(t, err, "failed to state test file in memory") 33 | 34 | mockF := &File{contents: data} 35 | assert.Equal(t, mockF.Size(), inf.Size(), "(File).Size() was not equal to memory fs (os.FileInfo).Size()") 36 | } 37 | 38 | func TestFileBasic(t *testing.T) { 39 | cnts := "hello, world" 40 | f := &File{} 41 | f.SetContents(cnts) 42 | assert.Equal(t, cnts, string(f.contents), "expected SetContents() to set contents") 43 | assert.Equal(t, cnts, f.String(), "expected String() to return proper contents") 44 | } 45 | -------------------------------------------------------------------------------- /internal/codegen/test_helpers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Implements helper functions for unit tests 4 | 5 | package codegen 6 | 7 | import ( 8 | "testing" 9 | 10 | "github.com/go-git/go-billy/v5" 11 | "github.com/go-git/go-billy/v5/memfs" 12 | "gotest.tools/v3/assert" 13 | ) 14 | 15 | // createFakeModuleFSWithManifest creates an in-memory filesystem with a single 16 | // file named "manifest.yaml" containing the provided manifest contents. This 17 | // is useful for testing purposes where a mock filesystem is needed. 18 | // 19 | // Parameters: 20 | // - t: The testing object used for assertions. 21 | // - manifestContents: A string representing the contents to be written to the manifest file. 22 | // 23 | // Returns: 24 | // - A billy.Filesystem representing the in-memory filesystem with the manifest file. 25 | func createFakeModuleFSWithManifest(t *testing.T, manifestContents string) billy.Filesystem { 26 | t.Helper() 27 | fs := memfs.New() 28 | mf, err := fs.Create("manifest.yaml") 29 | assert.NilError(t, err) 30 | _, err = mf.Write([]byte(manifestContents)) 31 | assert.NilError(t, err) 32 | assert.NilError(t, mf.Close()) 33 | 34 | return fs 35 | } 36 | -------------------------------------------------------------------------------- /internal/codegen/testdata/apply-template-passthrough.tpl: -------------------------------------------------------------------------------- 1 | {{- define "command" }} 2 | {{- /* We should be able to access the root values by default if we had no args passed via ApplyTemplate */}} 3 | {{- .Config.Name }} 4 | {{- end }} 5 | {{- stencil.ApplyTemplate "command" }} -------------------------------------------------------------------------------- /internal/codegen/testdata/args/test.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/getoutreach/stencil/c048642949815c4d04694e4cc18a7e78add63104/internal/codegen/testdata/args/test.tpl -------------------------------------------------------------------------------- /internal/codegen/testdata/blockinsideblock-test.txt: -------------------------------------------------------------------------------- 1 | ###Block(helloWorld) 2 | a 3 | ###Block(boompls) 4 | b 5 | c 6 | ###EndBlock(helloWorld) 7 | -------------------------------------------------------------------------------- /internal/codegen/testdata/blocks-test.txt: -------------------------------------------------------------------------------- 1 | ###Block(helloWorld) 2 | Hello, world! 3 | ###EndBlock(helloWorld) 4 | 5 | ###Block(e2e) 6 | content 7 | ###EndBlock(e2e) 8 | -------------------------------------------------------------------------------- /internal/codegen/testdata/danglingblock-test.txt: -------------------------------------------------------------------------------- 1 | ###Block(helloWorld) 2 | Hello, world! 3 | ###EndBlock(helloWorld) 4 | 5 | ###Block(dangles) 6 | dsffdsfsd 7 | fdsfds 8 | sd 9 | -------------------------------------------------------------------------------- /internal/codegen/testdata/danglingendblock-test.txt: -------------------------------------------------------------------------------- 1 | ###Block(helloWorld) 2 | Hello, world! 3 | ###EndBlock(helloWorld) 4 | 5 | dsffdsfsd 6 | fdsfds 7 | sd 8 | ###EndBlock(dangles) 9 | -------------------------------------------------------------------------------- /internal/codegen/testdata/generated-block/fake.txt: -------------------------------------------------------------------------------- 1 | 2 | ###Block(a) 3 | a-string 4 | ###EndBlock(a) 5 | ###Block(b) 6 | another-string 7 | ###EndBlock(b) 8 | ###Block(c) 9 | wow 10 | ###EndBlock(c) 11 | -------------------------------------------------------------------------------- /internal/codegen/testdata/generated-block/template.txt.tpl: -------------------------------------------------------------------------------- 1 | {{- range $_, $block := (list "a" "b" "c") }} 2 | ###Block({{ $block }}) 3 | {{ file.Block $block }} 4 | ###EndBlock({{ $block }}) 5 | {{- end }} 6 | -------------------------------------------------------------------------------- /internal/codegen/testdata/module-hook/m1.tpl: -------------------------------------------------------------------------------- 1 | {{ file.Skip "virtual file" }} 2 | {{ stencil.AddToModuleHook "testing2" "coolthing" (list "a") }} 3 | -------------------------------------------------------------------------------- /internal/codegen/testdata/module-hook/m2.tpl: -------------------------------------------------------------------------------- 1 | {{ index (stencil.GetModuleHook "coolthing") 0 }} -------------------------------------------------------------------------------- /internal/codegen/testdata/multi-file-input.tpl: -------------------------------------------------------------------------------- 1 | {{- define "command" }} 2 | {{- . }} 3 | {{- end }} 4 | 5 | # Generate a ".go" file for each command in .arguments.commands 6 | {{- range $_, $commandName := (stencil.Arg "commands") }} 7 | {{- file.Create (printf "cmd/%s.go" $commandName) 0644 now }} 8 | {{- stencil.ApplyTemplate "command" $commandName | file.SetContents }} 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /internal/codegen/testdata/multi-file.tpl: -------------------------------------------------------------------------------- 1 | {{- define "command" }} 2 | {{- "command" }} 3 | {{- end }} 4 | 5 | # Generate a ".go" file for each command in .arguments.commands 6 | {{- range $_, $commandName := (stencil.Arg "commands") }} 7 | {{- file.Create (printf "cmd/%s.go" $commandName) 0644 now }} 8 | {{- stencil.ApplyTemplate "command" | file.SetContents }} 9 | {{- end }} 10 | -------------------------------------------------------------------------------- /internal/codegen/testdata/v2blocks-invalid.txt: -------------------------------------------------------------------------------- 1 | # This is invalid because it passes arguments to EndBlock 2 | ## <> 3 | Pika pika! 4 | ## <> 5 | 6 | # This is invalid because it used EndBlock with a <> 8 | ## <> 9 | 10 | # This is invalid because it used EndBlock without a <> 12 | ## <> 13 | -------------------------------------------------------------------------------- /internal/codegen/testdata/v2blocks-test.txt: -------------------------------------------------------------------------------- 1 | ## <> 2 | Hello, world! 3 | ## <> 4 | -------------------------------------------------------------------------------- /internal/codegen/testdata/values/values.tpl: -------------------------------------------------------------------------------- 1 | {{ .Module.Version }} {{ (.Runtime.Modules.ByName "testing").Version }} {{ (index .Runtime.Modules 0).Version }} {{ .Template.Name }} -------------------------------------------------------------------------------- /internal/codegen/testdata/wrongendblock-test.txt: -------------------------------------------------------------------------------- 1 | ###Block(helloWorld) 2 | Hello, world! 3 | ###EndBlock(wrongend) 4 | -------------------------------------------------------------------------------- /internal/codegen/tpl.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains helpers for creating 4 | // functions exposed to stencil codegen files. 5 | 6 | package codegen 7 | 8 | import ( 9 | "text/template" 10 | 11 | "github.com/getoutreach/stencil/pkg/extensions" 12 | "github.com/sirupsen/logrus" 13 | ) 14 | 15 | // NewFuncMap returns the standard func map for a template 16 | func NewFuncMap(st *Stencil, t *Template, log logrus.FieldLogger) template.FuncMap { 17 | // We allow tplst & tplf to be nil in the case of 18 | // .Parse() of a template, where they need to be present 19 | // but aren't actually executed by the template 20 | // (execute is the one that renders it) 21 | var tplst *TplStencil 22 | var tplf *TplFile 23 | if st != nil { 24 | tplst = &TplStencil{st, t, log} 25 | } 26 | if t != nil { 27 | tplf = &TplFile{t.Files[0], t, log} 28 | } 29 | 30 | // build the function map 31 | funcs := Default 32 | funcs["stencil"] = func() *TplStencil { return tplst } 33 | funcs["file"] = func() *TplFile { return tplf } 34 | funcs["extensions"] = func() *extensions.ExtensionCaller { return st.extCaller } 35 | return funcs 36 | } 37 | -------------------------------------------------------------------------------- /internal/git/git.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains helpers for git 4 | 5 | // Package git implements helpers for interacting with git 6 | package git 7 | 8 | import ( 9 | "context" 10 | "os/exec" 11 | "regexp" 12 | 13 | "github.com/pkg/errors" 14 | ) 15 | 16 | // This block contains errors and regexes 17 | var ( 18 | // ErrNoHeadBranch is returned when a repository's HEAD (aka default) branch cannot 19 | // be determine 20 | ErrNoHeadBranch = errors.New("failed to find a head branch, does one exist?") 21 | 22 | // ErrNoRemoteHeadBranch is returned when a repository's remote default/HEAD branch 23 | // cannot be determined. 24 | ErrNoRemoteHeadBranch = errors.New("failed to get head branch from remote origin") 25 | 26 | // headPattern is used to parse git output to determine the head branch 27 | headPattern = regexp.MustCompile(`HEAD branch: ([[:alpha:]]+)`) 28 | ) 29 | 30 | // GetDefaultBranch determines the default/HEAD branch for a given git 31 | // repository. 32 | func GetDefaultBranch(ctx context.Context, path string) (string, error) { 33 | cmd := exec.CommandContext(ctx, "git", "remote", "show", "origin") 34 | cmd.Dir = path 35 | out, err := cmd.Output() 36 | if err != nil { 37 | return "", errors.Wrap(err, "failed to get head branch from remote origin") 38 | } 39 | 40 | matches := headPattern.FindStringSubmatch(string(out)) 41 | if len(matches) != 2 { 42 | return "", ErrNoRemoteHeadBranch 43 | } 44 | 45 | return matches[1], nil 46 | } 47 | -------------------------------------------------------------------------------- /internal/modules/testdata/manifest.yaml: -------------------------------------------------------------------------------- 1 | name: github.com/getoutreach/stencil-base 2 | -------------------------------------------------------------------------------- /internal/modules/testdata/nested_constraint/manifest.yaml: -------------------------------------------------------------------------------- 1 | name: nested_constraint 2 | modules: 3 | - name: github.com/getoutreach/stencil-base 4 | version: ~0.3.0 5 | -------------------------------------------------------------------------------- /internal/modules/testdata/nested_modules/a/manifest.yaml: -------------------------------------------------------------------------------- 1 | name: a 2 | modules: 3 | - name: b 4 | -------------------------------------------------------------------------------- /internal/modules/testdata/nested_modules/b/manifest.yaml: -------------------------------------------------------------------------------- 1 | name: b 2 | -------------------------------------------------------------------------------- /manifest.yaml: -------------------------------------------------------------------------------- 1 | name: testing 2 | -------------------------------------------------------------------------------- /migrations/README.md: -------------------------------------------------------------------------------- 1 | # Migrations 2 | 3 | Subfolders of this `migrations` folder are named the same as your SmartStore databases. 4 | 5 | For more info, see 6 | [How to get started with database schemas in SmartStore](https://outreach-io.atlassian.net/wiki/spaces/QSS/pages/2392196182/How-To+Get+started+with+database+schemas+in+smartstore). 7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "UNLICENSED", 3 | "devDependencies": { 4 | "@semantic-release/commit-analyzer": "^12.0.0", 5 | "@semantic-release/exec": "^6.0.3", 6 | "@semantic-release/git": "^10.0.1", 7 | "@semantic-release/github": "^10.0.3", 8 | "@semantic-release/npm": "^12.0.0", 9 | "@semantic-release/release-notes-generator": "^13.0.0", 10 | "conventional-changelog-conventionalcommits": "^7.0.2", 11 | "prettier": "^2.8.8", 12 | "semantic-release": "^23.0.8", 13 | "semver": "^7.6.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /pkg/configuration/configuration_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file contains tests for the configuration pac 4 | 5 | package configuration_test 6 | 7 | import ( 8 | "fmt" 9 | 10 | "github.com/getoutreach/stencil/pkg/configuration" 11 | ) 12 | 13 | func ExampleValidateName() { 14 | // Normal name 15 | success := configuration.ValidateName("test") 16 | fmt.Println("success:", success) 17 | 18 | // Invalid name 19 | success = configuration.ValidateName("test.1234") 20 | fmt.Println("success:", success) 21 | 22 | // Output: 23 | // success: true 24 | // success: false 25 | } 26 | 27 | func ExampleNewServiceManifest() { 28 | sm, err := configuration.NewServiceManifest("testdata/service.yaml") 29 | if err != nil { 30 | // handle the error 31 | fmt.Println("error:", err) 32 | return 33 | } 34 | 35 | fmt.Println(sm.Name) 36 | fmt.Println(sm.Arguments) 37 | 38 | // Output: 39 | // testing 40 | // map[hello:world] 41 | } 42 | -------------------------------------------------------------------------------- /pkg/configuration/testdata/service.yaml: -------------------------------------------------------------------------------- 1 | name: testing 2 | arguments: 3 | hello: world 4 | -------------------------------------------------------------------------------- /pkg/extensions/apiv1/logger.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file implements a simple io.Writer that writes 4 | // to a function with a fmt.Print signature. 5 | 6 | package apiv1 7 | 8 | import "io" 9 | 10 | // _ is a implementation check 11 | var _ io.Writer = &logger{} 12 | 13 | // logger implements io.Writer to write to a function with a fmt.Print signature 14 | type logger struct { 15 | fn func(args ...interface{}) 16 | } 17 | 18 | // Write writes the data to the logger 19 | func (l *logger) Write(p []byte) (n int, err error) { 20 | l.fn("[go-plugin] ", string(p)) 21 | return len(p), nil 22 | } 23 | -------------------------------------------------------------------------------- /pkg/extensions/apiv1/rpc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Implements the plugin RPC logic for the extension host 4 | 5 | package apiv1 6 | 7 | import ( 8 | "net/rpc" 9 | 10 | "github.com/hashicorp/go-plugin" 11 | "github.com/sirupsen/logrus" 12 | ) 13 | 14 | // ExtensionPlugin is the high level plugin used by go-plugin 15 | // it stores both the server and client implementation 16 | type ExtensionPlugin struct { 17 | log logrus.FieldLogger 18 | impl implementationTransport 19 | } 20 | 21 | // Server serves a implementationTransport over net/rpc 22 | func (p *ExtensionPlugin) Server(*plugin.MuxBroker) (interface{}, error) { 23 | return &rpcTransportServer{p.log, p.impl}, nil 24 | } 25 | 26 | // Client serves a Implementation over net/rpc 27 | func (p *ExtensionPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { 28 | return &rpcTransportClient{p.log, c}, nil 29 | } 30 | -------------------------------------------------------------------------------- /pkg/extensions/apiv1/rpc_transport_server.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: This file implements the rpc server transport for go-plugin 4 | 5 | package apiv1 6 | 7 | import ( 8 | "github.com/sirupsen/logrus" 9 | ) 10 | 11 | // rpcTransportServer implements a rpc backed implementation 12 | // of implementationTransport. 13 | type rpcTransportServer struct { 14 | log logrus.FieldLogger 15 | impl implementationTransport 16 | } 17 | 18 | // GetConfig returns the config for this extension 19 | func (s *rpcTransportServer) GetConfig(args interface{}, resp **Config) error { 20 | v, err := s.impl.GetConfig() 21 | *resp = v 22 | return err 23 | } 24 | 25 | // GetTemplateFunctions returns the template functions for this extension 26 | func (s *rpcTransportServer) GetTemplateFunctions(args interface{}, resp *[]*TemplateFunction) error { 27 | v, err := s.impl.GetTemplateFunctions() 28 | *resp = v 29 | return err 30 | } 31 | 32 | // ExecuteTemplateFunction executes a template function for this extension 33 | // 34 | //nolint:gocritic // Why: go-plugin wants this 35 | func (s *rpcTransportServer) ExecuteTemplateFunction(t *TemplateFunctionExec, resp *[]byte) error { 36 | v, err := s.impl.ExecuteTemplateFunction(t) 37 | s.log.WithField("name", t.Name).WithError(err).Debugf("Extension function called: %s", string(v)) 38 | *resp = v 39 | return err 40 | } 41 | -------------------------------------------------------------------------------- /pkg/extensions/apiv1/server.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Implements a plugin Implementation 4 | // for the extensions host. 5 | 6 | package apiv1 7 | 8 | import ( 9 | "github.com/hashicorp/go-hclog" 10 | "github.com/hashicorp/go-plugin" 11 | "github.com/sirupsen/logrus" 12 | ) 13 | 14 | // NewHandshake returns a plugin.HandshakeConfig for 15 | // this extension api version. 16 | func NewHandshake() plugin.HandshakeConfig { 17 | return plugin.HandshakeConfig{ 18 | ProtocolVersion: Version, 19 | MagicCookieKey: CookieKey, 20 | MagicCookieValue: CookieValue, 21 | } 22 | } 23 | 24 | // NewExtensionImplementation implements a new extension 25 | // and starts serving it. 26 | func NewExtensionImplementation(impl Implementation, log logrus.FieldLogger) error { 27 | logger := hclog.New(&hclog.LoggerOptions{ 28 | Level: hclog.Trace, 29 | Output: &logger{fn: log.Debug}, 30 | DisableTime: true, 31 | }) 32 | 33 | plugin.Serve(&plugin.ServeConfig{ 34 | Logger: logger, 35 | HandshakeConfig: NewHandshake(), 36 | Plugins: map[string]plugin.Plugin{ 37 | Name: &ExtensionPlugin{log, newImplementationToImplementationTransport(impl)}, 38 | }, 39 | }) 40 | 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /pkg/extensions/caller.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Implements the extension caller interface for interacting 4 | // with extensions. 5 | 6 | package extensions 7 | 8 | import ( 9 | "fmt" 10 | "reflect" 11 | "strings" 12 | ) 13 | 14 | // ExtensionCaller calls extension functions 15 | type ExtensionCaller struct { 16 | funcMap map[string]map[string]generatedTemplateFunc 17 | } 18 | 19 | // Call returns a function based on its path, e.g. test.callFunction 20 | func (ec *ExtensionCaller) Call(args ...interface{}) (interface{}, error) { 21 | if len(args) == 0 { 22 | return nil, fmt.Errorf("expected at least 1 arg") 23 | } 24 | 25 | extPath, ok := args[0].(string) 26 | if !ok { 27 | return nil, fmt.Errorf("expected first arg to be type string, got %s", reflect.TypeOf(args[0])) 28 | } 29 | 30 | keys := strings.Split(extPath, ".") 31 | extFn := keys[len(keys)-1] // last element is the function name 32 | extName := strings.TrimSuffix(extPath, "."+extFn) // remove the function name from the path 33 | 34 | if _, ok := ec.funcMap[extName]; !ok { 35 | return nil, fmt.Errorf("unknown extension '%s'", extName) 36 | } 37 | 38 | if _, ok := ec.funcMap[extName][extFn]; !ok { 39 | return nil, fmt.Errorf("extension '%s' doesn't provide function '%s'", extName, extFn) 40 | } 41 | 42 | return ec.funcMap[extName][extFn](args[1:]...) 43 | } 44 | -------------------------------------------------------------------------------- /pkg/extensions/extensions_test.go: -------------------------------------------------------------------------------- 1 | package extensions_test 2 | 3 | import ( 4 | "context" 5 | "testing" 6 | 7 | "github.com/davecgh/go-spew/spew" 8 | "github.com/getoutreach/gobox/pkg/cli/updater/resolver" 9 | "github.com/getoutreach/stencil/pkg/extensions" 10 | "github.com/sirupsen/logrus" 11 | "gotest.tools/v3/assert" 12 | ) 13 | 14 | func TestCanImportNativeExtension(t *testing.T) { 15 | ctx, cancel := context.WithCancel(context.Background()) 16 | defer cancel() 17 | 18 | ext := extensions.NewHost(logrus.New()) 19 | defer ext.Close() 20 | 21 | version := &resolver.Version{ 22 | Tag: "v1.3.0", 23 | } 24 | err := ext.RegisterExtension(ctx, "https://github.com/getoutreach/stencil-golang", "github.com/getoutreach/stencil-golang", version) 25 | assert.NilError(t, err, "failed to register extension") 26 | 27 | caller, err := ext.GetExtensionCaller(ctx) 28 | assert.NilError(t, err, "failed to get extension caller") 29 | 30 | resp, err := caller.Call("github.com/getoutreach/stencil-golang.ParseGoMod", "go.mod", "module test\n\ngo 1.19") 31 | assert.NilError(t, err, "failed to call extension") 32 | 33 | moduleMap := resp.(map[string]interface{})["Module"].(map[string]interface{}) 34 | spew.Dump(moduleMap) 35 | assert.Equal(t, moduleMap["Syntax"].(map[string]interface{})["Token"].([]interface{})[1], "test", "failed to parse go.mod") 36 | } 37 | -------------------------------------------------------------------------------- /pkg/stencil/stencil_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 Outreach Corporation. All Rights Reserved. 2 | 3 | // Description: Contains tests for the stencil package 4 | 5 | package stencil_test 6 | 7 | import ( 8 | "fmt" 9 | 10 | "github.com/getoutreach/stencil/pkg/stencil" 11 | ) 12 | 13 | func ExampleLoadLockfile() { 14 | // Load the lockfile 15 | l, err := stencil.LoadLockfile("testdata") 16 | if err != nil { 17 | // handle the error 18 | fmt.Println(err) 19 | return 20 | } 21 | 22 | fmt.Println(l.Version) 23 | 24 | // Output: 25 | // v1.6.2 26 | } 27 | -------------------------------------------------------------------------------- /pkg/stencil/testdata/stencil.lock: -------------------------------------------------------------------------------- 1 | version: v1.6.2 2 | modules: [] 3 | files: [] 4 | -------------------------------------------------------------------------------- /pkg/stenciltest/testdata/args.tpl: -------------------------------------------------------------------------------- 1 | {{ if ne (stencil.Arg "hello") "world" }} 2 | {{ fail "expected .hello to be 'world' "}} 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /pkg/stenciltest/testdata/error.tpl: -------------------------------------------------------------------------------- 1 | {{ fail "sad pikachu" }} 2 | -------------------------------------------------------------------------------- /pkg/stenciltest/testdata/test.tpl: -------------------------------------------------------------------------------- 1 | {{ "hello, world!" }} 2 | -------------------------------------------------------------------------------- /scripts/air-runner.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # This script enables us to run different bins with one Air configuration 3 | set -e 4 | 5 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 6 | binDir="$DIR/../bin" 7 | 8 | echo "Running $DEV_CONTAINER_EXECUTABLE" 9 | exec "$binDir/${DEV_CONTAINER_EXECUTABLE:-stencil}" 10 | -------------------------------------------------------------------------------- /scripts/lib/install-node.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - 4 | echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list 5 | curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - 6 | sudo apt-get install -y nodejs yarn 7 | -------------------------------------------------------------------------------- /scripts/shell-wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shell wrapper runs a shell script inside of the devbase 3 | # repository, which contains shared shell scripts. 4 | set -e 5 | 6 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 7 | libDir="$DIR/../.bootstrap" 8 | 9 | "$DIR/devbase.sh" 10 | 11 | script="$1" 12 | 13 | shift 14 | 15 | exec "$libDir/shell/$script" "$@" 16 | -------------------------------------------------------------------------------- /service.yaml: -------------------------------------------------------------------------------- 1 | name: stencil 2 | arguments: 3 | ciOptions: 4 | skipDocker: true 5 | skipE2e: true 6 | commands: 7 | - stencil 8 | confluenceSpaceKey: DT 9 | description: microservice lifecycle manager 10 | designDocumentLink: https://outreachsales-my.sharepoint.com/:w:/g/personal/it_transfer_outreachsales_onmicrosoft_com/EXQdFL_8YKlZcYwIFvLgoVgBPHRhM3jLfvzqdLDQqoMy8w 11 | lintroller: platinum 12 | metrics: datadog 13 | notifications: 14 | releaseFailureSlackChannel: C01CEQP2MA6 15 | oss: true 16 | releaseOptions: 17 | allowMajorVersions: true 18 | autoPrereleases: true 19 | enablePrereleases: true 20 | prereleasesBranch: main 21 | reportingTeam: fnd-dt 22 | slack: dev-tooling-notifications 23 | tier: 2 24 | tracing: opentelemetry 25 | vaultSecrets: 26 | - deploy/honeycomb_new/%(environment)s/honeycomb 27 | - deploy/launchdarkly/%(environment)s/launchdarkly 28 | - deploy/mint/%(environment)s/validation/mint-validator-payload 29 | - deploy/flagship-shared-secret/%(environment)s/authn-flagship-payload 30 | modules: 31 | - name: github.com/getoutreach/stencil-base 32 | channel: rc 33 | - name: github.com/getoutreach/stencil-golang 34 | channel: unstable 35 | - name: github.com/getoutreach/stencil-actions 36 | channel: rc 37 | - name: github.com/getoutreach/stencil-circleci 38 | channel: rc 39 | - name: github.com/getoutreach/devbase 40 | channel: rc 41 | -------------------------------------------------------------------------------- /versions.yaml: -------------------------------------------------------------------------------- 1 | # This yaml file has some shared version info. 2 | # 3 | # The Go & Protobuf versions are used by .circleci/docker-builder.sh. 4 | 5 | # Languages 6 | nodejs: 14.14.0 7 | ruby: 2.6.6 8 | go: 1.15.2 9 | terraform: 0.13.5 10 | 11 | # Maestro's terraform is held back because the maestro terraform provider is 12 | # not yet compatible with the v0.13 plugin distribution schemes. 13 | maestro-terraform: 0.12.26 14 | 15 | # Utils 16 | goveralls: 0.0.6 17 | 18 | # runtime-alpine is the version of the production runtime base image 19 | runtime-alpine: 3.12 20 | 21 | # concourse go module version does not match github version, so we 22 | # pin fly version below to a commit hash corresponding to v6.5.0 23 | fly: cfe7746ae74247743708be6c5b2f40215030a1f1 24 | --------------------------------------------------------------------------------