Skip to content

Commit

Permalink
update Kubeflow Notebooks container images docs (#3609)
Browse files Browse the repository at this point in the history
* chore: update hugo and docsy

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* docs: update the notebook images page

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
  • Loading branch information
thesuperzapper committed Oct 25, 2023
1 parent f88fcc0 commit 6ab922c
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 119 deletions.
6 changes: 0 additions & 6 deletions .gitattributes

This file was deleted.

23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ This section will show you how to develop the website locally, by running a loca

To install Hugo, follow the [instructions for your system type](https://gohugo.io/getting-started/installing/).

**NOTE:** we recommend that you use Hugo version `0.92.0`, as this is currently the version we deploy to Netlify.
**NOTE:** we recommend that you use Hugo version `0.119.0`, as this is currently the version we deploy to Netlify.

For example, using homebrew to install hugo on macOS or linux:

```bash
# WARNING: this may install a newer version than `0.92.0`
# WARNING: this may install a newer version than `0.119.0`
brew install hugo
```

Expand Down Expand Up @@ -74,19 +74,26 @@ Follow the usual GitHub workflow of forking the repository on GitHub and then cl
cd website/
```

3. Recursively download the submodules (for docsy):
3. Initialize the Docsy submodule:

```bash
git submodule update --init --recursive
```

4. Start your local Hugo server:
4. Install Docsy dependencies:

```bash
# NOTE: ensure you have node 18 installed
(cd themes/docsy/ && npm install)
```

5. Start your local Hugo server:

```bash
hugo server -D
```

5. You can access your website at [http://localhost:1313/](http://localhost:1313/)
6. You can access your website at [http://localhost:1313/](http://localhost:1313/)

### Useful docs

Expand Down Expand Up @@ -126,7 +133,11 @@ The theme files are managed with a [git submodule](https://git-scm.com/book/en/v
To update referenced docsy commit, run the following command at the root of the repo:

```bash
git submodule update --remote
# for example, to update docsy to v0.6.0
# WARNING: updating the docsy version will require you to update our overrides
# check under: `layouts/partials` and `assets/scss`
git -C themes/docsy fetch --tags
git -C themes/docsy checkout tags/v0.6.0
```

## Documentation style guide
Expand Down
26 changes: 12 additions & 14 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,10 @@ defaultContentLanguageInSubdir = false
# useful when translating
enableMissingTranslationPlaceholders = true
# disable taxonomies
disableKinds = ["taxonomy", "taxonomyTerm"]
disableKinds = ["taxonomy"]
# deprecated directories
ignoreFiles = [
"content/en/docs/distributions/gke/deploy/*",
"content/en/docs/distributions/gke/pipelines/*",
"content/en/docs/distributions/gke/anthos.md",
"content/en/docs/distributions/gke/authentication.md",
"content/en/docs/distributions/gke/authentication.md",
"content/en/docs/distributions/gke/custom-domain.md",
"content/en/docs/distributions/gke/customizing-gke.md",
"content/en/docs/distributions/gke/private-clusters.md",
"content/en/docs/distributions/gke/troubleshooting-gke.md"
]
ignoreFiles = []

###############################################################################
# Hugo - Top-level navigation (horizontal)
###############################################################################
Expand Down Expand Up @@ -70,6 +61,12 @@ ignoreFiles = [
style = "tango"
guessSyntax = "true"

###############################################################################
# Docsy - Mermaid configuration
###############################################################################
[params.mermaid]
enable = true

###############################################################################
# Docsy - Image processing configuration
###############################################################################
Expand All @@ -91,11 +88,12 @@ ignoreFiles = [
[languages]
[languages.en]
title = "Kubeflow"
description = "Kubeflow makes deployment of ML Workflows on Kubernetes straightforward and automated"
languageName ="English"
# weight used for sorting in the language menu
weight = 1

[languages.en.params]
description = "Kubeflow makes deployment of ML Workflows on Kubernetes straightforward and automated"

###############################################################################
# Docsy - Site Parameters
###############################################################################
Expand Down
154 changes: 118 additions & 36 deletions content/en/docs/components/notebooks/container-images.md

Large diffs are not rendered by default.

Binary file not shown.
20 changes: 10 additions & 10 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@
{{ .Site.Title -}}
{{ end -}}
</title>
{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}}
<meta name="description" content="{{ $desc }}">
<meta name="description" content="{{ template "partials/page-description.html" . }}">
{{ template "_internal/opengraph.html" . -}}
{{ template "_internal/schema.html" . -}}
{{ template "_internal/twitter_cards.html" . -}}
{{ partialCached "head-css.html" . "asdf" -}}
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK"
crossorigin="anonymous"></script>
{{ if .Site.Params.offlineSearch -}}
<script
src="https://unpkg.com/lunr@2.3.8/lunr.min.js"
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY"
<script defer
src="https://unpkg.com/lunr@2.3.9/lunr.min.js"
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
crossorigin="anonymous"></script>
{{ end -}}

{{ if .Site.Params.prism_syntax_highlighting -}}
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "css/prism.css" | relURL }}"/>
{{ end -}}

{{ partial "hooks/head-end.html" . -}}

{{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled */ -}}
{{ if hugo.IsProduction -}}
{{ if hasPrefix .Site.GoogleAnalytics "G-" -}}
{{ template "_internal/google_analytics.html" . -}}
{{ $enableGtagForUniversalAnalytics := not .Site.Params.disableGtagForUniversalAnalytics -}}
{{ if (or $enableGtagForUniversalAnalytics (hasPrefix .Site.GoogleAnalytics "G-")) -}}
{{ template "_internal/google_analytics_gtag.html" . -}}
{{ else -}}
{{ template "_internal/google_analytics_async.html" . -}}
{{ end -}}
Expand Down
8 changes: 6 additions & 2 deletions layouts/partials/navbar-version-selector.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ .Site.Params.version_menu }}
</a>
<div class="dropdown-menu dropdown-menu-md-right dropdown-menu-lg-left" aria-labelledby="navbarDropdownMenuLink">
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
{{ $path := "" }}
{{ if .Site.Params.version_menu_pagelinks }}
{{ $path = .Page.RelPermalink }}
{{ end }}
{{ range .Site.Params.versions }}
<a class="dropdown-item" href="{{ .url }}">{{ .version }}</a>
<a class="dropdown-item" href="{{ .url }}{{ $path }}">{{ .version }}</a>
{{ end }}
</div>
91 changes: 58 additions & 33 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,62 @@
{{ $cover := and (.HasShortcode "blocks/cover") (not .Site.Params.ui.navbar_translucent_over_cover_disable) }}
<nav class="js-navbar-scroll navbar navbar-expand-md navbar-dark {{ if $cover}} td-navbar-cover {{ end }} td-navbar">
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
</a>
{{ $cover := and
(.HasShortcode "blocks/cover")
(not .Site.Params.ui.navbar_translucent_over_cover_disable)
-}}

<nav class="js-navbar-scroll navbar navbar-expand-md navbar-dark
{{- if $cover }} td-navbar-cover {{- end }} td-navbar">
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
{{- /**/ -}}
<span class="navbar-brand__logo navbar-logo">
{{- if ne .Site.Params.ui.navbar_logo false -}}
{{ with resources.Get "icons/logo.svg" -}}
{{ ( . | minify).Content | safeHTML -}}
{{ end -}}
{{ end -}}
</span>
{{- /**/ -}}
<span class="text-uppercase font-weight-bold">
{{- .Site.Title -}}
</span>
{{- /**/ -}}
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#main_navbar" aria-controls="main_navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse ml-md-auto" id="main_navbar">
<ul class="navbar-nav ml-auto pt-4 pt-md-0 my-2 my-md-1">
{{ $p := . }}
{{ range .Site.Menus.main }}
<li class="nav-item mr-2 mr-lg-4 mt-1 mt-lg-0">
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }}
{{ with .Page }}
{{ $active = or $active ( $.IsDescendant .) }}
{{ end }}
{{ $pre := .Pre }}
{{ $post := .Post }}
{{ $url := urls.Parse .URL }}
{{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
</li>
{{ end }}
{{ if .Site.Params.versions }}
<li class="nav-item dropdown mt-1 mt-lg-0 mr-2">
{{ partial "navbar-version-selector.html" . }}
</li>
{{ end }}
{{ if (gt (len .Site.Home.Translations) 0) }}
<li class="nav-item dropdown mt-1 mt-lg-0">
{{ partial "navbar-lang-selector.html" . }}
</li>
{{ end }}
</ul>
</div>
</nav>
<ul class="navbar-nav ml-auto pt-4 pt-md-0 my-2 my-md-1">
{{ $p := . -}}
{{ range .Site.Menus.main -}}
<li class="nav-item mr-2 mr-lg-4 mt-1 mt-lg-0">
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) -}}
{{ with .Page }}{{ $active = or $active ( $.IsDescendant .) }}{{ end -}}
{{ $pre := .Pre -}}
{{ $post := .Post -}}
{{ $url := urls.Parse .URL -}}
{{ $baseurl := urls.Parse $.Site.Params.Baseurl -}}
<a {{/**/ -}}
class="nav-link {{- if $active }} active {{- end }}" {{/**/ -}}
href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"
{{- if ne $url.Host $baseurl.Host }} target="_blank" {{- end -}}
>
{{- with .Pre }}{{ $pre }}{{ end -}}
<span {{- if $active }} class="active" {{- end }}>
{{- .Name -}}
</span>
{{- with .Post }}{{ $post }}{{ end -}}
</a>
</li>
{{ end -}}
{{ if .Site.Params.versions -}}
<li class="nav-item dropdown mt-1 mt-lg-0 mr-2">
{{ partial "navbar-version-selector.html" . -}}
</li>
{{ end -}}
{{ if (gt (len .Site.Home.Translations) 0) -}}
<li class="nav-item dropdown mt-1 mt-lg-0 mr-2">
{{ partial "navbar-lang-selector.html" . -}}
</li>
{{ end -}}
</ul>
</div>
</nav>
8 changes: 4 additions & 4 deletions layouts/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
{{ `<?xml version="1.0" encoding="UTF-8"?>` | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{- range .Data.Pages }}
<url>
<loc>https://www.kubeflow.org{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
Expand All @@ -17,5 +17,5 @@
href="{{ .Permalink }}"
/>{{ end }}
</url>
{{ end }}
{{- end }}
</urlset>
14 changes: 7 additions & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[build]
publish = "public"
command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify"
command = "cd themes/docsy && git submodule update -f --init && npm install && cd ../.. && hugo --gc --minify"

[context.deploy-preview.environment]
HUGO_VERSION = "0.92.0"
NODE_VERSION = "16"
HUGO_VERSION = "0.119.0"
NODE_VERSION = "18"

[context.production.environment]
HUGO_VERSION = "0.92.0"
HUGO_VERSION = "0.119.0"
HUGO_ENV = "production"
NODE_VERSION = "16"
NODE_VERSION = "18"

[context.branch-deploy.environment]
HUGO_VERSION = "0.92.0"
NODE_VERSION = "16"
HUGO_VERSION = "0.119.0"
NODE_VERSION = "18"
2 changes: 1 addition & 1 deletion themes/docsy
Submodule docsy updated 194 files

0 comments on commit 6ab922c

Please sign in to comment.