mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
fix: hide line number column in code block for RSS feed (#652)
This commit is contained in:
@@ -324,7 +324,7 @@ FixIt theme assets partial
|
||||
{{- $configJS = add $configJS "console.log('Page config:', window.config);" -}}
|
||||
{{- end -}}
|
||||
{{- $targetPath := $noBaseRelPermalink | printf "%s/config/page.js" -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) | or .IsHome -}}
|
||||
{{- $targetPath = "" -}}
|
||||
{{- end -}}
|
||||
{{- dict "Content" $configJS "Path" $targetPath "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
|
||||
@@ -332,7 +332,7 @@ FixIt theme assets partial
|
||||
{{- /* MathJax plugin */ -}}
|
||||
{{- if .Store.Get "hasMathJax" -}}
|
||||
{{- $targetPath := $noBaseRelPermalink | printf "%s/mathjax.min.js" -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) | or .IsHome -}}
|
||||
{{- $targetPath = "" -}}
|
||||
{{- end -}}
|
||||
{{- $options := dict "targetPath" $targetPath "minify" hugo.IsProduction -}}
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
<description>
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" }}
|
||||
{{- /* {{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}} */ -}}
|
||||
{{- /* Hide line number column of code block */ -}}
|
||||
{{- $content = $content | replaceRE `(<table class="lntable"[^>]*>.*?<td class="lntd")` `${1} style="display:none"` }}
|
||||
{{- with $image }}
|
||||
{{- $content = add (printf "<img src=%q alt=%q referrerpolicy=%q>" . "featured image" "no-referrer") $content | safeHTML }}
|
||||
{{- end }}
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
{{- /* Insert config */ -}}
|
||||
{{- $targetPath := (strings.TrimPrefix (relURL "") $.RelPermalink) | printf "%s/config/post-chat.js" -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) -}}
|
||||
{{- if (path.Ext .Page.RelPermalink) | or .IsHome -}}
|
||||
{{- $targetPath = "" -}}
|
||||
{{- end -}}
|
||||
{{- dict "Content" $configJS "Path" $targetPath "Defer" true | dict "Page" . "Data" | partial "store/script.html" -}}
|
||||
|
||||
Reference in New Issue
Block a user