diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index ba05dbbca948..d34872751ed8 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -62,6 +62,16 @@ kubectl patch deployment karpenter -n karpenter --type='json' -p='[{"op": "repla open http://localhost:8080/metrics && kubectl port-forward service/karpenter-metrics -n karpenter 8080 ``` +### Marketing and Docs Website +The Karpenter marketing and docs site uses [Hugo](https://gohugo.io/) and [npm](https://www.npmjs.com/) to generate HTML markup from Markdown content and configuration files in `/website`. Hugo makes use of [`git submodules`](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to bring in theme assets and configruation. The Karpenter website uses the [Docsy theme](https://www.docsy.dev/). To serve this website locally, ensure you have `hugo` and `npm` installed, have initialized and updated your local repository's submodules with `git submodule update --init --recursive`, and then use the follow commands to bring up a local webserver: +```bash +cd website +npm install +hugo server -D +``` + +_If you get `fatal error: pipe failed` running the local server on macOS, you may need to increase the maximum number of files that can be open at a time by following the instructions in [this GitHub issue comment](https://github.com/google/docsy-example/issues/89#issuecomment-758311888)._ + ## Environment specific setup ### AWS diff --git a/Makefile b/Makefile index 29a5ede928f0..eb0f94884582 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ helm: ## Generate Helm Chart cd charts;helm lint karpenter;helm package karpenter;helm repo index . website: ## Generate Docs Website - cd website;npm install;hugo -d ../docs + cd website; npm install; git submodule update --init --recursive; hugo toolchain: ## Install developer toolchain ./hack/toolchain.sh diff --git a/website/assets/icons/logo.png b/website/assets/icons/logo.png new file mode 100644 index 000000000000..7d0a7ab4b2b4 Binary files /dev/null and b/website/assets/icons/logo.png differ diff --git a/website/assets/scss/_variables_project.scss b/website/assets/scss/_variables_project.scss new file mode 100644 index 000000000000..3e5db96a6dd6 --- /dev/null +++ b/website/assets/scss/_variables_project.scss @@ -0,0 +1,5 @@ +/* + +Add styles or override variables from the theme here. + +*/ diff --git a/website/config.toml b/website/config.toml index a5e0e1fc832c..11205225e03c 100644 --- a/website/config.toml +++ b/website/config.toml @@ -1,4 +1,122 @@ -baseURL = "http://awslabs.github.com/karpenter/docs" +baseURL = "/karpenter/" + +# Hugo allows theme composition (and inheritance). The precedence is from left to right. +theme = ["docsy"] + +# Build settings +publishDir = "../docs" +disableKinds = ["taxonomy", "taxonomyTerm"] + +# Language settings +contentDir = "content/en" +defaultContentLanguage = "en" +defaultContentLanguageInSubdir = false +# Useful when translating. +enableMissingTranslationPlaceholders = true + +# Localizations languageCode = "en-us" +[languages] +[languages.en] title = "Karpenter" -theme = "docsy" +description = "Just-in-time Nodes for Any Kubernetes Cluster" +languageName = "English" +# Weight used for sorting. +weight = 1 + +# Syntax Highlighting config +pygmentsCodeFences = true +pygmentsUseClasses = false +# Use the new Chroma Go highlighter in Hugo. +pygmentsUseClassic = false +#pygmentsOptions = "linenos=table" +# See https://help.farbox.com/pygments.html +pygmentsStyle = "tango" + +# Configure how URLs look like per section. +[permalinks] +blog = "/:section/:year/:month/:day/:slug/" + +## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday +[blackfriday] +plainIDAnchors = true +hrefTargetBlank = true +angledQuotes = false +latexDashes = true + +# Markup configuration +[markup] +[markup.goldmark] +[markup.goldmark.renderer] +unsafe = true +[markup.highlight] +# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html +style = "tango" +# Uncomment if you want your chosen highlight style used for code blocks without a specified language +# guessSyntax = "true" + +# Image processing configuration. +[imaging] +resampleFilter = "CatmullRom" +quality = 75 +anchor = "smart" + +## Site Params +[params] +copyright = "Amazon.com, Inc. or its affiliates." +# Repository configuration (URLs for in-page links to opening issues and suggesting changes) +github_repo = "https://github.com/awslabs/karpenter" +# Specify a value here if your content directory is not in your repo's root directory +github_subdir = "website" + +# Version configuration +# Menu title if your navbar has a versions selector to access old versions of your site. +# This menu appears only if you have at least one [params.versions] set. +version_menu = "Releases" +# Flag used in the "version-banner" partial to decide whether to display a +# banner on every page indicating that this is an archived version of the docs. +# Set this flag to "true" if you want to display the banner. +archived_version = false +# The version number for the version of the docs represented in this doc set. +# Used in the "version-banner" partial to display a version number for the +# current doc set. +version = "0.2" + +# User interface configuration +[params.ui] +# Enable to show the side bar menu in its compact state. +sidebar_menu_compact = false +# Set to true to disable breadcrumb navigation. +breadcrumb_disable = false +# Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) +sidebar_search_disable = false +# Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top nav bar +navbar_logo = false +# Set to true to disable the About link in the site footer +footer_about_disable = true + +[params.links] +# End user relevant links. These will show up on left side of footer and in the community page if you have one. +#[[params.links.user]] +# name = "Twitter" +# url = "https://example.org/twitter" +# icon = "fab fa-twitter" +# desc = "Follow us on Twitter to get the latest news!" +# Developer relevant links. These will show up on right side of footer and in the community page if you have one. +[[params.links.developer]] + name = "GitHub" + url = "https://github.com/awslabs/karpenter" + icon = "fab fa-github" + desc = "Development takes place here!" +[[params.links.developer]] + name = "Slack" + url = "https://slack.k8s.io/" + icon = "fab fa-slack" + desc = "Chat with us on Slack in the #aws-provider channel" + +# Navigation menu +[[menu.main]] +name = "GitHub" +weight = 99 +url = "https://github.com/awslabs/karpenter" +pre = "" diff --git a/website/content/en/.keep b/website/content/en/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/website/content/en/docs/.keep b/website/content/en/docs/.keep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/website/layouts/404.html b/website/layouts/404.html new file mode 100644 index 000000000000..906a6645cd0d --- /dev/null +++ b/website/layouts/404.html @@ -0,0 +1,8 @@ +{{ define "main"}} +
+
+

Not found

+

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

+
+
+{{ end }}