Skip to content

Commit

Permalink
docs(fix): Update docs configs to work with the latest hugo theme ver…
Browse files Browse the repository at this point in the history
…sion (#2155)

Signed-off-by: Dave Henderson <[email protected]>
  • Loading branch information
hairyhenderson authored Jun 29, 2024
1 parent e0a6e4f commit 17eb360
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,11 @@ gen-changelog:
docker run -it -v $(shell pwd):/app --workdir /app -e CHANGELOG_GITHUB_TOKEN hairyhenderson/github_changelog_generator \
github_changelog_generator --no-filter-by-milestone --exclude-labels duplicate,question,invalid,wontfix,admin

docs/themes/hugo-theme-relearn:
git clone --depth=1 https://github.com/McShelby/hugo-theme-relearn.git $@
# uses hugo modules now
# docs/themes/hugo-theme-relearn:
# git clone https://github.com/McShelby/hugo-theme-relearn.git $@

gen-docs: docs/themes/hugo-theme-relearn
gen-docs:
cd docs/; hugo

docs/content/functions/%.md: docs-src/content/functions/%.yml docs-src/content/functions/func_doc.md.tmpl
Expand Down
17 changes: 7 additions & 10 deletions docs/config.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
baseURL = "/"
languageCode = "en-us"
title = "gomplate documentation"
theme = "hugo-theme-relearn"
googleAnalytics = "UA-82637990-3"
# theme = "hugo-theme-relearn"

[params]
alwaysopen = false
editURL = "https://github.com/hairyhenderson/gomplate/edit/main/docs/content/"
author = "hairyhenderson"
description = "gomplate documentation"
showVisitedLinks = false
disableSearch = false
disableSearchHiddenPages = false
Expand All @@ -35,6 +32,9 @@ googleAnalytics = "UA-82637990-3"
disableExplicitIndexURLs = true
externalLinkTarget = "_blank"

[params.author]
name = "hairyhenderson"

[markup]
[markup.highlight]
guessSyntax = false
Expand All @@ -43,9 +43,6 @@ googleAnalytics = "UA-82637990-3"
[outputs]
home = [ "HTML", "RSS", "SEARCH", "SEARCHPAGE"]

[privacy]
[privacy.googleAnalytics]
disable = false
anonymizeIP = true
respectDoNotTrack = true
useSessionStorage = false
[module]
[[module.imports]]
path = 'github.com/McShelby/hugo-theme-relearn'
5 changes: 5 additions & 0 deletions docs/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/hairyhenderson/gomplate/docs

go 1.22.4

require github.com/McShelby/hugo-theme-relearn v0.0.0-20231029175538-7ae1435626d7 // 0.53.0
6 changes: 6 additions & 0 deletions docs/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github.com/McShelby/hugo-theme-relearn v0.0.0-20231029175538-7ae1435626d7 h1:dQ2UVtAGY3OFJnDN02uac5bjpczbgJcmhXnHv0QifG0=
github.com/McShelby/hugo-theme-relearn v0.0.0-20231029175538-7ae1435626d7/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
github.com/McShelby/hugo-theme-relearn v0.0.0-20240217004058-fe7f9a8764e3 h1:fpEagigEo9/AvC+90KuNMaF8Z8+Lg2rnEK6K7Ee/2WU=
github.com/McShelby/hugo-theme-relearn v0.0.0-20240217004058-fe7f9a8764e3/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
github.com/McShelby/hugo-theme-relearn v0.0.0-20240407214931-4391760c8bc1 h1:/SWuiqok8gDIkmBizkUBp6c3Y87JocRaukkzSUEDu+8=
github.com/McShelby/hugo-theme-relearn v0.0.0-20240407214931-4391760c8bc1/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM=
6 changes: 3 additions & 3 deletions docs/layouts/partials/custom-footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ template "_internal/google_analytics.html" . }}
<script>
(function () {
var webSdkScript = document.createElement("script");
webSdkScript.src = "https://unpkg.com/@grafana/faro-web-sdk@^1.0.0/dist/bundle/faro-web-sdk.iife.js";
webSdkScript.src = "https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js";

webSdkScript.onload = () => {
window.GrafanaFaroWebSdk.initializeFaro({
url: "https://faro-collector-prod-us-central-0.grafana.net/collect/d8b5652f5dd57fb1cfec9a1c32970fe0",
Expand All @@ -17,7 +17,7 @@
// This is important because we need to ensure that the Web-SDK has been loaded and initialized before we add further instruments!
var webTracingScript = document.createElement("script");

webTracingScript.src = "https://unpkg.com/@grafana/faro-web-tracing@^1.0.0/dist/bundle/faro-web-tracing.iife.js";
webTracingScript.src = "https://unpkg.com/@grafana/faro-web-tracing@^1.4.0/dist/bundle/faro-web-tracing.iife.js";

// Initialize, configure (if necessary) and add the the new instrumentation to the already loaded and configured Web-SDK.
webTracingScript.onload = () => {
Expand Down
8 changes: 8 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
command = "make gen-docs"
publish = "docs/public/"

[build.environment]
HUGO_VERSION = "0.128.0"
NODE_VERSION = "20"
GO_VERSION = "1.22.4"

0 comments on commit 17eb360

Please sign in to comment.