{{ .Title }}
+{{ .Content }}
+diff --git a/layouts/404.html b/layouts/404.html deleted file mode 100644 index ac4ef34..0000000 --- a/layouts/404.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} -
404 - page not found
-{{ end }} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html deleted file mode 100644 index e05ac21..0000000 --- a/layouts/_default/_markup/render-heading.html +++ /dev/null @@ -1,30 +0,0 @@ -{{ $currentLevel := .Level }} -{{ $currentHeaderKey := printf "H_%d" $currentLevel }} - -{{ if not (.Page.Scratch.Get $currentHeaderKey) }} - {{ .Page.Scratch.Set $currentHeaderKey 1 }} -{{ else }} - {{ .Page.Scratch.Set $currentHeaderKey (add 1 (.Page.Scratch.Get $currentHeaderKey)) }} -{{ end }} - -{{ if .Page.Scratch.Get "previousLevel" }} - {{ $previousLevel := .Page.Scratch.Get "previousLevel" }} - {{ if gt $previousLevel $currentLevel }} - {{ range $header := slice 1 2 3 4 5 6 }} - {{ if gt $header $currentLevel }} - {{ $.Page.Scratch.Delete (printf "H_%d" $header) }} - {{ end }} - {{ end }} - {{ end }} -{{ end }} - -{{ $counter := "" }} -{{ range $header := slice 1 2 3 4 5 6 }} -{{ if gt ($.Page.Scratch.Get (printf "H_%d" $header)) 0 }} - {{ $counter = printf "%s%d." $counter ($.Page.Scratch.Get (printf "H_%d" $header))}} -{{ end }} -{{end}} - -{{ .Content }}
+_Dir: {{ $currentName }}
- {{ partial "readdir.html" $currentName }} - {{ else }} - {{ if eq (path.Ext .Name) ".md" }} - {{ $f := readFile $currentName }} - - {{ end }} - {{ end }} -{{ end }} diff --git a/layouts/partials/sandpointjs.html b/layouts/partials/sandpointjs.html deleted file mode 100644 index ef9cf51..0000000 --- a/layouts/partials/sandpointjs.html +++ /dev/null @@ -1,4 +0,0 @@ - -{{ $sjsopts := dict "targetPath" "js/sandpoints.js" "minify" "true"}} -{{ $sjs := resources.Get "js/sandpoints.js" | js.Build $sjsopts }} - diff --git a/layouts/partials/scratch.html b/layouts/partials/scratch.html deleted file mode 100644 index c54a821..0000000 --- a/layouts/partials/scratch.html +++ /dev/null @@ -1,202 +0,0 @@ -{{ $currentNode := . }} - -{{ $_ := newScratch }} -{{ $debug := (slice) }} - -{{ $sandnameSingular := (slice) }} -{{ $sandnamePlural := (slice) }} - -{{ range $k, $v := $.Site.Data.sandpointsnamegraph }} - {{ $sandnameSingular = $sandnameSingular | append $k }} - {{ $sandnamePlural = $sandnamePlural | append $v }} -{{ end }} - -{{ $pPath := "" }} -{{ range $p := .Site.RegularPages }} - {{ $pPath = printf "/%s" $p.File }} - {{ $pageDir := "" }} - {{ with $p.File }} - {{ $pageDir = (substr .Dir 0 -1)}} - {{ end }} - - {{ $content := $p.Content }} - {{ with $links := $p.Scratch.Get "links" }} - {{ range $link := $links }} - {{ $linkPath := printf "/%s" $link.File}} - {{ with ($_.Get $linkPath) }} - {{ $_.SetInMap $linkPath "backlinks" (uniq ((index ($_.Get $linkPath) "backlinks") | append $p)) }} - {{ else }} - {{ $_.SetInMap $linkPath "backlinks" (slice $p) }} - {{ end }} - {{ end }} - {{ end }} - - {{ $paramsKeys := (slice) }} - {{ range $k, $v := $p.Params }} - {{ $paramsKeys = $paramsKeys | append $k }} - {{ end }} - - {{ $mentions := intersect $paramsKeys $sandnamePlural }} - {{ range $mention := $mentions }} - {{ range $m := index $p.Params $mention }} - {{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }} - {{ with ($_.Get $mentionLink) }} - {{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }} - {{ $_.SetInMap $mentionLink "backlinks" (uniq ((index ($_.Get $mentionLink) "backlinks") | append $p)) }} - {{ else }} - {{ $p.Scratch.Add "links" (uniq (($p.Scratch.Get "links")| append ($.GetPage $mentionLink))) }} - {{ $_.SetInMap $mentionLink "backlinks" (slice $p) }} - {{ end }} - {{ end }} - {{ end }} - - {{ $gp := $.GetPage $pPath }} - {{ $gpPath := printf "/%s" $gp.File }} - {{ range $k, $v := $gp.Params }} - {{ with in $k "has_" }} - {{ $s := index (split $k "has_") 1 }} - {{ range $sin,$plur := $currentNode.Site.Data.sandpointsnamegraph }} - {{ if eq $s $plur }} - {{ range index $gp.Params $k }} - {{ $cp := $.GetPage (printf "/%s/%s" $sin .) }} - {{ $cpPath := printf "/%s" $cp.File }} - {{ range $kcp, $vcp := $cp.Params }} - {{ with in $kcp "has_" }} - {{ $scp := index (split $kcp "has_") 1 }} - {{ range $sincp,$plurcp := $currentNode.Site.Data.sandpointsnamegraph }} - {{ if eq $scp $plurcp }} - - {{ $_.SetInMap $gpPath "depth" "core" }} - {{ $_.SetInMap $gpPath "child_depth" "mantle" }} - {{ $_.SetInMap $gpPath "has" $s }} - - {{ with $gp.File }} - {{ $core := substr .Dir 0 -1 }} - {{ with index ($_.Get $gpPath) "core" }} - {{ $_.SetInMap $gpPath "core" (uniq ((index ($_.Get $gpPath) "core") | append $core)) }} - {{ else }} - {{ $_.SetInMap $gpPath "core" (slice $core) }} - {{ end }} - {{ $cor := $_.Get $cpPath }} - {{ with $cor.core }} - {{ $_.SetInMap $cpPath "core" (uniq ((index ($_.Get $cpPath) "core") | append $core)) }} - {{ else }} - {{ $_.SetInMap $cpPath "core" (slice $core) }} - {{ end }} - {{ end }} - - {{ with $cp.File }} - {{ $mantle := substr .Dir 0 -1 }} - {{ with index ($_.Get $gpPath) "mantle" }} - {{ $_.SetInMap $gpPath "mantle" (uniq ((index ($_.Get $gpPath) "mantle") | append $mantle)) }} - {{ else }} - {{ $_.SetInMap $gpPath "mantle" (slice $mantle) }} - {{ end }} - {{ with index ($_.Get $cpPath) "mantle" }} - {{ $_.SetInMap $cpPath "mantle" (uniq ((index ($_.Get $cpPath) "mantle") | append $mantle)) }} - {{ else }} - {{ $_.SetInMap $cpPath "mantle" (slice $mantle) }} - {{ end }} - {{ end }} - - {{ with $_.Get $gpPath }} - {{ if .has_children }} - {{ $hasChildren := index . "has_children" | append $cp }} - {{ $_.SetInMap $gpPath "has_children" (uniq $hasChildren) }} - {{ else }} - {{ $_.SetInMap $gpPath "has_children" (slice $cp) }} - {{ end }} - {{ end }} - - {{ $_.SetInMap $cpPath "depth" "mantle" }} - {{ $_.SetInMap $cpPath "child_depth" "crust" }} - {{ $_.SetInMap $cpPath "plural" $plur }} - {{ $_.SetInMap $cpPath "has" $scp }} - - {{ if isset $cp.Params $kcp }} - {{ $_.SetInMap $cpPath "has_children" (slice) }} - {{ with index ($_.Get $cpPath) "is_in" }} - {{ $isincore := index ($_.Get $cpPath) "is_in" | append $gp}} - {{ $_.SetInMap $cpPath "is_in" (uniq $isincore) }} - {{ else }} - {{ $_.SetInMap $cpPath "is_in" (slice $gp) }} - {{ end }} - {{ end }} - - {{ range index $cp.Params $kcp }} - {{ $gcp := $.GetPage (printf "/%s/%s" $sincp .) }} - {{ $gcpPath := printf "/%s" $gcp.File }} - - {{ with $_.Get $cpPath }} - {{ if .has_children }} - {{ $hasGChildren := index . "has_children" | append $gcp }} - {{ $_.SetInMap $cpPath "has_children" (uniq $hasGChildren) }} - {{ else }} - {{ $_.SetInMap $cpPath "has_children" (slice $gcp) }} - {{ end }} - {{ end }} - - {{ $_.SetInMap $gcpPath "depth" "crust" }} - {{ $_.SetInMap $gcpPath "plural" $plurcp }} - {{ $_.SetInMap $gcpPath "in" (slice $sin $plur) }} - - {{ with $gp.File }} - {{ $core := substr .Dir 0 -1 }} - {{ with index ($_.Get $gcpPath) "core" }} - {{ $_.SetInMap $gcpPath "core" (uniq ((index ($_.Get $gcpPath) "core") | append $core)) }} - {{ else }} - {{ $_.SetInMap $gcpPath "core" (slice $core) }} - {{ end }} - {{ end }} - - {{ with $cp.File }} - {{ $mantle := substr .Dir 0 -1 }} - {{ with index ($_.Get $gcpPath) "mantle" }} - {{ $_.SetInMap $gcpPath "mantle" (uniq ((index ($_.Get $gcpPath) "mantle") | append $mantle)) }} - {{ else }} - {{ $_.SetInMap $gcpPath "mantle" (slice $mantle) }} - {{ end }} - {{ end }} - - {{ with $gcp.File }} - {{ $crust := substr .Dir 0 -1 }} - {{ with index ($_.Get $gpPath) "crust" }} - {{ $_.SetInMap $gpPath "crust" (uniq ((index ($_.Get $gpPath) "crust") | append $crust)) }} - {{ else }} - {{ $_.SetInMap $gpPath "crust" (slice $crust) }} - {{ end }} - {{ with index ($_.Get $cpPath) "crust" }} - {{ $_.SetInMap $cpPath "crust" (uniq ((index ($_.Get $cpPath) "crust") | append $crust)) }} - {{ else }} - {{ $_.SetInMap $cpPath "crust" (slice $crust) }} - {{ end }} - {{ with index ($_.Get $gcpPath) "crust" }} - {{ $_.SetInMap $gcpPath "crust" (uniq ((index ($_.Get $gcpPath) "crust") | append $crust)) }} - {{ else }} - {{ $_.SetInMap $gcpPath "crust" (slice $crust) }} - {{ end }} - {{ end }} - - {{ with $_.Get $gcpPath }} - {{ if .is_in }} - {{ $isinmantle := index . "is_in" | append $cp}} - {{ $_.SetInMap $gcpPath "is_in" (uniq $isinmantle) }} - {{ else }} - {{ $_.SetInMap $gcpPath "is_in" (slice $cp) }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - - {{ $_.SetInMap $pPath "debug" (printf "%#v" $debug) }} -{{ end }} - -{{ return $_ }} diff --git a/layouts/partials/singlebody.html b/layouts/partials/singlebody.html deleted file mode 100644 index 45392cd..0000000 --- a/layouts/partials/singlebody.html +++ /dev/null @@ -1,105 +0,0 @@ -{{ $s := partialCached "scratch.html" . }} - -{{ $currentNode := . }} -{{ $currentDir := "" }} -{{ with .File }} - {{ $currentDir = .Dir }} -{{ end }} -{{ $currentFile := (printf "/%s" .File) }} -{{ $scratch := $s.Get $currentFile }} - -{{ $sandnamePlural := (slice) }} -{{ $sandnameSingular := "" }} -{{ $mentionLink := "" }} - -