Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.155.3
HUGO_VERSION: 0.164.0
steps:
- name: Checkout docs repo
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:

deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
steps:
Expand Down
21 changes: 19 additions & 2 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defaultContentLanguageInSubdir = false

[languages]
[languages.en]
languageName = "English"
label = "English"
weight = 1
# [languages.es]
# languageName = "Español"
Expand Down Expand Up @@ -70,10 +70,27 @@ defaultContentLanguageInSubdir = false
path = "github.com/drasi-project/learning-drasi-server"
ignoreConfig = true
ignoreImports = true
# Each tutorial in the module is mounted as its own content subfolder.
# For every mount, exclude the repo README and any HTML files (e.g. the
# viewer / webui apps) so Hugo doesn't try to render them as pages. HTML
# content is blocked by Hugo's default security.allowContent policy
# (Hugo v0.164+).
[[module.imports.mounts]]
source = "tutorials/getting-started"
target = "content/drasi-server/tutorials/getting-started"
excludeFiles = "/README.md"
files = ['! /README.md', '! **/*.html']
[[module.imports.mounts]]
source = "tutorials/building-comfort"
target = "content/drasi-server/tutorials/building-comfort"
files = ['! /README.md', '! **/*.html']
[[module.imports.mounts]]
source = "tutorials/high-risk-containers"
target = "content/drasi-server/tutorials/high-risk-containers"
files = ['! /README.md', '! **/*.html']
[[module.imports.mounts]]
source = "tutorials/curbside-pickup"
target = "content/drasi-server/tutorials/curbside-pickup"
files = ['! /README.md', '! **/*.html']

[params.search.algolia]
appId = "Q8GYM4KCMH"
Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ go 1.24.5

require (
github.com/FortAwesome/Font-Awesome v4.7.0+incompatible // indirect
github.com/drasi-project/learning-drasi-server v0.1.2 // indirect
github.com/drasi-project/learning-drasi-server v0.1.3-0.20260804182447-c1e618dd4343 // indirect
github.com/twbs/bootstrap v5.3.8+incompatible // indirect
)
2 changes: 2 additions & 0 deletions docs/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ github.com/FortAwesome/Font-Awesome v4.7.0+incompatible h1:3trjm7NtX5NXlju1AxSWS
github.com/FortAwesome/Font-Awesome v4.7.0+incompatible/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/drasi-project/learning-drasi-server v0.1.2 h1:584jd+Bzw5OW2y8PvmugMBLgm7NK3ayy7HxcjP0vQcw=
github.com/drasi-project/learning-drasi-server v0.1.2/go.mod h1:PQ7ulgPmkoPEw5T9gCbfSyuYNXRDjaVbMzGJx58/hVw=
github.com/drasi-project/learning-drasi-server v0.1.3-0.20260804182447-c1e618dd4343 h1:lx8eO5m0la6FLFBhrn0bxDK8n414iPSoYifjqt4ZO+0=
github.com/drasi-project/learning-drasi-server v0.1.3-0.20260804182447-c1e618dd4343/go.mod h1:PQ7ulgPmkoPEw5T9gCbfSyuYNXRDjaVbMzGJx58/hVw=
github.com/twbs/bootstrap v5.3.8+incompatible h1:eK1fsXP7R/FWFt+sSNmmvUH9usPocf240nWVw7Dh02o=
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
23 changes: 23 additions & 0 deletions docs/layouts/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" "dark-mode-global" -}}
{{- if $darkMode.enable }} data-theme-init{{ end }}>
<head>
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
<header>
{{ partial "navbar.html" . }}
</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main">
{{ block "main" . }}{{ end }}
</main>
{{ partial "footer.html" . }}
</div>
{{ partialCached "scripts.html" . }}
</body>
</html>
2 changes: 1 addition & 1 deletion docs/layouts/docs/baseof.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<html itemscope itemtype="http://schema.org/WebPage"
{{- with .Site.Language.LanguageDirection }} dir="{{ . }}" {{- end -}}
{{- with .Site.Language.Direction }} dir="{{ . }}" {{- end -}}
{{ with .Site.Language.Lang }} lang="{{ . }}" {{- end }} {{/**/ -}}
class="no-js"
{{- $darkMode := partialCached "dark-mode-config.html" . "dark-mode-global" -}}
Expand Down
30 changes: 30 additions & 0 deletions docs/layouts/partials/head-css.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ $scssMain := "scss/main.scss" -}}
{{ $css := resources.Get $scssMain
| toCSS (dict "enableSourceMap" (not hugo.IsProduction)) -}}

{{/* NOTE: we only apply `postCSS` in production or for RTL languages. This
makes it snappier to develop in Chrome, but it may look sub-optimal in other
browsers. */ -}}

{{ if eq .Site.Language.Direction "rtl" -}}
{{ $css = $css
| postCSS (dict "use" "autoprefixer rtlcss" "noMap" true)
| resources.Copy (replace $scssMain "." ".rtl.") -}}
{{ else if hugo.IsProduction -}}
{{ $css = $css | postCSS -}}
{{ end -}}

{{ if hugo.IsProduction -}}
{{ $css = $css | minify | fingerprint -}}
<link rel="preload" href="{{ $css.RelPermalink }}" as="style" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
{{ end -}}

{{ with $css -}}
<link href="{{ .RelPermalink }}" rel="stylesheet"
{{- with .Data.Integrity }} integrity="{{ . }}" crossorigin="anonymous"{{ end -}}
>
{{ else -}}
{{ errorf "Resource not found or error building CSS: %s" $scssMain -}}
{{ end -}}

{{- /**/ -}}
2 changes: 1 addition & 1 deletion docs/layouts/shortcodes/glossary-terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Used on the glossary page to display the complete term list.
*/}}

{{ $glossary := site.Data.glossary }}
{{ $glossary := hugo.Data.glossary }}

{{ if $glossary.terms }}
{{ range $glossary.terms }}
Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/shortcodes/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{ end }}

{{/* Look up the term in glossary data */}}
{{ $glossary := site.Data.glossary }}
{{ $glossary := hugo.Data.glossary }}
{{ $termData := false }}

{{ if $glossary.terms }}
Expand Down
Loading