aboutsummaryrefslogtreecommitdiff
path: root/generators
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2022-08-31 03:48:02 -0400
committerThedro Neely <thedroneely@gmail.com>2022-08-31 03:48:02 -0400
commit30e9489b68540678ffeda38773e41429a0bb16f5 (patch)
treeaccf9680a12f00541a1aa6ef60d22f4a3c89fd06 /generators
parent526026c3e9df262e14651e2d6160171f89f5f761 (diff)
downloadthedroneely.com-30e9489b68540678ffeda38773e41429a0bb16f5.tar.gz
thedroneely.com-30e9489b68540678ffeda38773e41429a0bb16f5.tar.bz2
thedroneely.com-30e9489b68540678ffeda38773e41429a0bb16f5.zip
generators/hugo: Add references and make file
Diffstat (limited to 'generators')
-rw-r--r--generators/exoference/.keep0
-rw-r--r--generators/hugo/themes/tdro/layouts/_default/single.html5
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/article-meta-bottom.html2
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/article-more-content.html2
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/article-on-web.html9
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/article-references.html11
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/generators/exoference/.keep0
-rw-r--r--generators/hugo/themes/tdro/layouts/partials/generators/openring/.keep0
8 files changed, 22 insertions, 7 deletions
diff --git a/generators/exoference/.keep b/generators/exoference/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/generators/exoference/.keep
diff --git a/generators/hugo/themes/tdro/layouts/_default/single.html b/generators/hugo/themes/tdro/layouts/_default/single.html
index 96bb02c..1d98d73 100644
--- a/generators/hugo/themes/tdro/layouts/_default/single.html
+++ b/generators/hugo/themes/tdro/layouts/_default/single.html
@@ -7,12 +7,11 @@
{{- partial "function-content.html" .Content | safeHTML -}}
</article>
+ {{- partial "article-syntax.html" . -}}
{{- partial "article-meta-bottom.html" . -}}
{{- partial "article-more-content.html" . -}}
- {{- if fileExists "themes/tdro/layouts/partials/openring.html" -}}
{{- partial "article-on-web.html" . -}}
- {{- end -}}
- {{- partial "article-syntax.html" . -}}
{{- partial "article-comments.html" . -}}
+ {{- partial "article-references.html" . -}}
</main>
{{ end }}
diff --git a/generators/hugo/themes/tdro/layouts/partials/article-meta-bottom.html b/generators/hugo/themes/tdro/layouts/partials/article-meta-bottom.html
index d1adf5c..3a272f2 100644
--- a/generators/hugo/themes/tdro/layouts/partials/article-meta-bottom.html
+++ b/generators/hugo/themes/tdro/layouts/partials/article-meta-bottom.html
@@ -1,4 +1,4 @@
-<article-meta-bottom>
+<article-meta-bottom id="article-meta-bottom">
{{ dateFormat "2 January 2006" .Params.date }}
<code> &mdash; Written</code>
<br>
diff --git a/generators/hugo/themes/tdro/layouts/partials/article-more-content.html b/generators/hugo/themes/tdro/layouts/partials/article-more-content.html
index dbe5725..5751aaa 100644
--- a/generators/hugo/themes/tdro/layouts/partials/article-more-content.html
+++ b/generators/hugo/themes/tdro/layouts/partials/article-more-content.html
@@ -1,4 +1,4 @@
-<article-more-content>
+<article-more-content id="article-more-content">
<section>
<h2>More Content</h2>
{{ $more := shuffle .Site.RegularPages | first 3 }}
diff --git a/generators/hugo/themes/tdro/layouts/partials/article-on-web.html b/generators/hugo/themes/tdro/layouts/partials/article-on-web.html
index 59776da..53d1d45 100644
--- a/generators/hugo/themes/tdro/layouts/partials/article-on-web.html
+++ b/generators/hugo/themes/tdro/layouts/partials/article-on-web.html
@@ -1,4 +1,8 @@
-<article-on-web>
+{{- $openring := "themes/tdro/layouts/partials/generators/openring/openring.html" -}}
+{{- $include := "generators/openring/openring.html" -}}
+
+{{- if fileExists $openring -}}
+<article-on-web id="article-on-web">
<section>
<button-anchor>
<a href="https://git.sr.ht/~sircmpwn/openring" title="Generated by Open Ring">
@@ -8,5 +12,6 @@
</button-anchor>
<h2>On the Web</h2>
</section>
- {{- partial "openring.html" . -}}
+ {{- partial $include . -}}
</article-on-web>
+{{- end -}}
diff --git a/generators/hugo/themes/tdro/layouts/partials/article-references.html b/generators/hugo/themes/tdro/layouts/partials/article-references.html
new file mode 100644
index 0000000..ca3aee7
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/partials/article-references.html
@@ -0,0 +1,11 @@
+{{- $exoference := print "themes/tdro/layouts/partials/generators/exoference/" .Slug ".html" -}}
+{{- $include := print "generators/exoference/" .Slug ".html" -}}
+
+{{- if fileExists $exoference -}}
+<article-references id="article-references">
+ <section>
+ <h2>References</h2>
+ </section>
+ {{- partial $include . -}}
+</article-references>
+{{- end -}}
diff --git a/generators/hugo/themes/tdro/layouts/partials/generators/exoference/.keep b/generators/hugo/themes/tdro/layouts/partials/generators/exoference/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/partials/generators/exoference/.keep
diff --git a/generators/hugo/themes/tdro/layouts/partials/generators/openring/.keep b/generators/hugo/themes/tdro/layouts/partials/generators/openring/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/generators/hugo/themes/tdro/layouts/partials/generators/openring/.keep