updates to try and fix partial includes issue
1. Restored resume.md: Left exactly as it was.
2. Configured hugo.toml Mounts: I mounted /srv/configs into the virtual assets namespace. This
securely gives Hugo access to those files as raw static resources.
3. Updated include Partial: I rewrote the shortcode partial (layouts/partials/include.html) to:
* Intercept absolute paths starting with /srv/configs/, map them to configs/..., and retrieve
their raw text content using resources.Get.
* Intercept paths starting with /srv/docs/private/, look them up as a Page, and use .RawContent
instead of .Content (which prevents Hugo from wrapping your Markdown in HTML <p> tags when
injecting it into your code blocks).
* Strip any YAML frontmatter from the raw content using a regex replaceRE block.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
# -- Site Configuration --
|
||||
# Refer to the theme docs for more details about each of these parameters.
|
||||
# https://nunocoracao.github.io/blowfish/docs/getting-started/
|
||||
|
||||
theme = ["hugo-admonitions", "blowfish"]
|
||||
baseURL = "https://wiki.wompmacho.com/"
|
||||
@@ -14,8 +12,6 @@ buildDrafts = true
|
||||
buildFuture = true
|
||||
enableEmoji = true
|
||||
|
||||
# googleAnalytics = "G-XXXXXXXXX"
|
||||
|
||||
[taxonomies]
|
||||
tag = "tags"
|
||||
category = "categories"
|
||||
@@ -23,19 +19,16 @@ enableEmoji = true
|
||||
series = "series"
|
||||
|
||||
[sitemap]
|
||||
changefreq = 'daily'
|
||||
filename = 'sitemap.xml'
|
||||
changefreq = "daily"
|
||||
filename = "sitemap.xml"
|
||||
priority = 0.5
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "JSON"]
|
||||
|
||||
[frontmatter]
|
||||
# Hugo will check for 'lastmod' in the file first,
|
||||
# then the Git commit date, then the 'date' field.
|
||||
lastmod = ["lastmod", ":git", "date"]
|
||||
|
||||
# Required if you want to use the Git commit date automatically
|
||||
enableGitInfo = true
|
||||
|
||||
[markup.tableOfContents]
|
||||
@@ -52,4 +45,13 @@ enableGitInfo = true
|
||||
target = "content/private"
|
||||
[[module.mounts]]
|
||||
source = "/srv/configs"
|
||||
target = "content/configs"
|
||||
target = "assets/configs"
|
||||
|
||||
[security]
|
||||
[security.funcs]
|
||||
readFile = [".*"]
|
||||
"os.Stat" = [".*"]
|
||||
"os.ReadDir" = [".*"]
|
||||
[[module.mounts]]
|
||||
source = "assets"
|
||||
target = "assets"
|
||||
|
||||
Reference in New Issue
Block a user