Compare commits
2 commits
6bdd8f1b8b
...
abcee4d0f5
Author | SHA1 | Date | |
---|---|---|---|
abcee4d0f5 | |||
b167e218a9 |
3 changed files with 74 additions and 27 deletions
|
@ -37,32 +37,63 @@ disableKinds = ["RSS", "sitemap"]
|
||||||
|
|
||||||
[module]
|
[module]
|
||||||
# replacement allow for easier local development
|
# replacement allow for easier local development
|
||||||
replacements = "git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme"
|
#
|
||||||
|
# replacements = ["git.sandpoints.org/Drawwell/SandpointsTheme -> /home/m/devel/SandpointsTheme", "git.sandpoints.org/Drawwell/SandpointsEditPage -> /home/m/devel/SandpointsEditPage"]
|
||||||
|
|
||||||
|
# if any customizations are added one should add also
|
||||||
|
# the hugo's skeleton directory structure:
|
||||||
|
# archetypes, assets, layouts, static & data
|
||||||
|
#
|
||||||
[[module.imports]]
|
[[module.imports]]
|
||||||
path = "git.sandpoints.org/Drawwell/SandpointsTheme"
|
path = "git.sandpoints.org/Drawwell/SandpointsTheme"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "archetypes"
|
||||||
|
target = "archetypes"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "assets"
|
||||||
|
target = "assets"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "layouts"
|
||||||
|
target = "layouts"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "static"
|
||||||
|
target = "static"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "data"
|
||||||
|
target = "data"
|
||||||
|
|
||||||
# if only [[module.imports]]'s path is provided
|
# metadata file needed for autocompletion
|
||||||
# and repo is made into hugo module (hugo mod init repo_name)
|
|
||||||
# [[module.imports]]'s path should apply SandpointsTheme
|
|
||||||
#
|
#
|
||||||
# if repo needs some specific customization the rest of the
|
[[module.imports.mounts]]
|
||||||
# mounts below should be added respectively
|
source = "exampleSite/content/metadata/_index.md"
|
||||||
|
target = "content/metadata/_index.md"
|
||||||
|
|
||||||
|
# below is an example of customizations added to hugo web site
|
||||||
#
|
#
|
||||||
# [[module.imports.mounts]]
|
# [[module.imports.mounts]]
|
||||||
# source = "archetypes"
|
# source = "customizations/Dotawo/assets/css/site.css"
|
||||||
# target = "archetypes"
|
|
||||||
# [[module.imports.mounts]]
|
|
||||||
# source = "assets"
|
|
||||||
# target = "assets"
|
|
||||||
# [[module.imports.mounts]]
|
|
||||||
# source = "data"
|
|
||||||
# target = "data"
|
|
||||||
# [[module.imports.mounts]]
|
|
||||||
# source = "layouts"
|
|
||||||
# target = "layouts"
|
|
||||||
# [[module.imports.mounts]]
|
|
||||||
# source = "static"
|
|
||||||
# target = "static"
|
|
||||||
# [[module.imports.mounts]]
|
|
||||||
# source = "customizations/specific_custom_instance/assets/css/site.css"
|
|
||||||
# target = "assets/css/site.css"
|
# target = "assets/css/site.css"
|
||||||
|
# [[module.imports.mounts]]
|
||||||
|
# source = "customizations/Dotawo/static/css/site.min.css"
|
||||||
|
# target = "static/css/site.min.css"
|
||||||
|
|
||||||
|
# below is the list of imports to get the svelte webapp
|
||||||
|
# which handles editing the website
|
||||||
|
#
|
||||||
|
[[module.imports]]
|
||||||
|
path = "git.sandpoints.org/Drawwell/SandpointsEditPage"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "public/index.md"
|
||||||
|
target = "content/edit/index.md"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "public/global.css"
|
||||||
|
target = "static/edit/build/global.css"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "public/build/bundle.css"
|
||||||
|
target = "static/edit/build/bundle.css"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "public/build/bundle.js"
|
||||||
|
target = "static/edit/build/bundle.js"
|
||||||
|
[[module.imports.mounts]]
|
||||||
|
source = "public/build/bundle.js.map"
|
||||||
|
target = "static/edit/build/bundle.js.map"
|
||||||
|
|
4
exampleSite/content/metadata/_index.md
Normal file
4
exampleSite/content/metadata/_index.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: "meta"
|
||||||
|
outputs: js
|
||||||
|
---
|
|
@ -10,6 +10,9 @@
|
||||||
|
|
||||||
{{ $sandnamePlural := (slice) }}
|
{{ $sandnamePlural := (slice) }}
|
||||||
|
|
||||||
|
{{ $couldHaveSection := "" }}
|
||||||
|
{{ $couldHave := (slice)}}
|
||||||
|
|
||||||
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
|
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
|
@ -23,6 +26,9 @@
|
||||||
|
|
||||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||||
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
{{ $sandnamePlural = $sandnamePlural | append $v }}
|
||||||
|
{{ if eq $scratch.has $v }}
|
||||||
|
{{ $couldHaveSection = $k }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $paramsKeys := (slice) }}
|
{{ $paramsKeys := (slice) }}
|
||||||
{{ range $k, $v := $currentNode.Params }}
|
{{ range $k, $v := $currentNode.Params }}
|
||||||
|
@ -94,5 +100,11 @@
|
||||||
|
|
||||||
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords⁄</span>{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
|
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords⁄</span>{{- $v -}}{{- else -}}, {{- $v -}}{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
|
||||||
|
|
||||||
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\"}" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink| resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
|
{{ if $couldHaveSection }}
|
||||||
|
{{ range where .Site.RegularPages "Section" $couldHaveSection }}
|
||||||
|
{{ $couldHave = $couldHave | append .File.LogicalName }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\", \"couldhave\": %s }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink (jsonify $couldHave)| resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}
|
||||||
{{ $dummy := $var.Permalink }}
|
{{ $dummy := $var.Permalink }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue