From 679b2bb94a1c124abd190c6053fa50596d4f5f27d6ace63dc63bc04364787134 Mon Sep 17 00:00:00 2001 From: 0x1D8 Date: Wed, 2 Apr 2025 16:47:51 +0300 Subject: [PATCH] Working template --- .gitignore | 8 ++++ .gitmodules | 3 ++ README.md | 12 ++++++ archetypes/default.md | 5 +++ content/archives.md | 6 +++ content/search.md | 7 +++ hugo.toml | 47 +++++++++++++++++++++ layouts/partials/backlinks.html | 31 ++++++++++++++ layouts/robots.txt | 2 + layouts/shortcodes/contact.html | 16 +++++++ layouts/shortcodes/hint.html | 3 ++ layouts/shortcodes/logseq/mark.html | 3 ++ layouts/shortcodes/logseq/orgCAUTION.html | 3 ++ layouts/shortcodes/logseq/orgEXAMPLE.html | 3 ++ layouts/shortcodes/logseq/orgIMPORTANT.html | 3 ++ layouts/shortcodes/logseq/orgNOTE.html | 3 ++ layouts/shortcodes/logseq/orgPINNED.html | 3 ++ layouts/shortcodes/logseq/orgQUOTE.html | 3 ++ layouts/shortcodes/logseq/orgTIP.html | 3 ++ layouts/shortcodes/logseq/orgWARNING.html | 3 ++ layouts/shortcodes/search.html | 22 ++++++++++ themes/PaperMod | 1 + 22 files changed, 190 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 README.md create mode 100644 archetypes/default.md create mode 100644 content/archives.md create mode 100644 content/search.md create mode 100644 hugo.toml create mode 100644 layouts/partials/backlinks.html create mode 100644 layouts/robots.txt create mode 100644 layouts/shortcodes/contact.html create mode 100644 layouts/shortcodes/hint.html create mode 100644 layouts/shortcodes/logseq/mark.html create mode 100644 layouts/shortcodes/logseq/orgCAUTION.html create mode 100644 layouts/shortcodes/logseq/orgEXAMPLE.html create mode 100644 layouts/shortcodes/logseq/orgIMPORTANT.html create mode 100644 layouts/shortcodes/logseq/orgNOTE.html create mode 100644 layouts/shortcodes/logseq/orgPINNED.html create mode 100644 layouts/shortcodes/logseq/orgQUOTE.html create mode 100644 layouts/shortcodes/logseq/orgTIP.html create mode 100644 layouts/shortcodes/logseq/orgWARNING.html create mode 100644 layouts/shortcodes/search.html create mode 160000 themes/PaperMod diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83ce8c1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Temporary lock file while building +/.hugo_build.lock diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..73f8c8c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a5f96a --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +Tip: +- Use `git submodule update --remote --merge` to update theme. + +Todo: +- Autmate deploying + +Relevant links: +- [logseq Schrödinger](https://github.com/sawhney17/logseq-schrodinger) +- [Hugo Template for Logseq](https://github.com/sawhney17/logseq-hugo-template) +- [Logseq-Hugo-Template](https://github.com/CharlesChiuGit/Logseq-Hugo-Template/tree/main) +- [PaperMod Wiki/Installation](https://github.com/adityatelange/hugo-PaperMod/wiki/Installation) +- [Deploying a static Hugo site with NGINX](https://gideonwolfe.com/posts/sysadmin/hugonginx/) diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..d6e829c --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/content/archives.md b/content/archives.md new file mode 100644 index 0000000..95cb825 --- /dev/null +++ b/content/archives.md @@ -0,0 +1,6 @@ +--- +title: "Archives" +layout: "archives" +url: "/archives/" +summary: archives +--- diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000..f33a128 --- /dev/null +++ b/content/search.md @@ -0,0 +1,7 @@ +--- +title: "Search" # in any language you want +layout: "search" # is necessary +# url: "/archive" +# description: "Description for Search" +summary: "search" +--- diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..3ba55d8 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,47 @@ +title = "Linerds Wiki" +baseURL = "https://wiki.linerds.us" +languageCode = "en-us" +theme = "PaperMod" + +[params] +author = "Linerds" +contact = "wiki@linerds.us" # yeah no +feedlinks = true +mobileMenu = true +ShowReadingTime = true + +[params.homeInfoParams] +Title = "Linerds Wiki" +Content = "Nothing Yet" + +[[params.socialIcons]] +name = "gitea" +url = "https://gitea.linerds.us" + +[outputs] +home = ["HTML", "RSS", "JSON"] +section = ["HTML", "RSS", "JSON"] + +[[menu.main]] +identifier = "categories" +name = "Categories" +url = "/categories/" +weight = 10 + +[[menu.main]] +identifier = "tags" +name = "Tags" +url = "/tags/" +weight = 20 + +[[menu.main]] +identifier = "search" +name = "Search" +url = "/search/" +weight = 20 + +[[menu.main]] +identifier = "archive" +name = "Archive" +url = "/archives/" +weight = 20 diff --git a/layouts/partials/backlinks.html b/layouts/partials/backlinks.html new file mode 100644 index 0000000..d663bb2 --- /dev/null +++ b/layouts/partials/backlinks.html @@ -0,0 +1,31 @@ +{{ $re := $.File.BaseFileName }} {{ $backlinks := slice }} {{ range where +.Site.RegularPages "Type" "page" }} {{ if and (findRE $re .RawContent) (not (eq +$re .File.BaseFileName)) }} {{ $backlinks = $backlinks | append . }} {{ end }} +{{ end }} {{ if gt (len $backlinks) 0 }} + +{{ else }} + +{{ end }} + + diff --git a/layouts/robots.txt b/layouts/robots.txt new file mode 100644 index 0000000..416ed18 --- /dev/null +++ b/layouts/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/layouts/shortcodes/contact.html b/layouts/shortcodes/contact.html new file mode 100644 index 0000000..e84e3dd --- /dev/null +++ b/layouts/shortcodes/contact.html @@ -0,0 +1,16 @@ +

{{ i18n "js_required" }}

+ + + + diff --git a/layouts/shortcodes/hint.html b/layouts/shortcodes/hint.html new file mode 100644 index 0000000..d978a65 --- /dev/null +++ b/layouts/shortcodes/hint.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/mark.html b/layouts/shortcodes/logseq/mark.html new file mode 100644 index 0000000..2c01ce2 --- /dev/null +++ b/layouts/shortcodes/logseq/mark.html @@ -0,0 +1,3 @@ + + {{ .Inner | $.Page.RenderString }} + \ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgCAUTION.html b/layouts/shortcodes/logseq/orgCAUTION.html new file mode 100644 index 0000000..eb6cb4e --- /dev/null +++ b/layouts/shortcodes/logseq/orgCAUTION.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgEXAMPLE.html b/layouts/shortcodes/logseq/orgEXAMPLE.html new file mode 100644 index 0000000..9c9c2de --- /dev/null +++ b/layouts/shortcodes/logseq/orgEXAMPLE.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgIMPORTANT.html b/layouts/shortcodes/logseq/orgIMPORTANT.html new file mode 100644 index 0000000..060c8a2 --- /dev/null +++ b/layouts/shortcodes/logseq/orgIMPORTANT.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgNOTE.html b/layouts/shortcodes/logseq/orgNOTE.html new file mode 100644 index 0000000..7d26caf --- /dev/null +++ b/layouts/shortcodes/logseq/orgNOTE.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgPINNED.html b/layouts/shortcodes/logseq/orgPINNED.html new file mode 100644 index 0000000..4d2b15c --- /dev/null +++ b/layouts/shortcodes/logseq/orgPINNED.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgQUOTE.html b/layouts/shortcodes/logseq/orgQUOTE.html new file mode 100644 index 0000000..d978a65 --- /dev/null +++ b/layouts/shortcodes/logseq/orgQUOTE.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgTIP.html b/layouts/shortcodes/logseq/orgTIP.html new file mode 100644 index 0000000..2b6dfa9 --- /dev/null +++ b/layouts/shortcodes/logseq/orgTIP.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/logseq/orgWARNING.html b/layouts/shortcodes/logseq/orgWARNING.html new file mode 100644 index 0000000..f898cae --- /dev/null +++ b/layouts/shortcodes/logseq/orgWARNING.html @@ -0,0 +1,3 @@ +
+ {{ .Inner | $.Page.RenderString }} +
\ No newline at end of file diff --git a/layouts/shortcodes/search.html b/layouts/shortcodes/search.html new file mode 100644 index 0000000..aa9a9e1 --- /dev/null +++ b/layouts/shortcodes/search.html @@ -0,0 +1,22 @@ +

{{ i18n "js_required" }}

+ + + + +
+ + diff --git a/themes/PaperMod b/themes/PaperMod new file mode 160000 index 0000000..72615b6 --- /dev/null +++ b/themes/PaperMod @@ -0,0 +1 @@ +Subproject commit 72615b6d49ab8b102e92e2e487ab420f41ba9223000000000000000000000000