mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 10:31:19 -04:00
hugo init
chore: add .gitignore feat: add hugo configs chore: initialize npm feat: add hugo tailwind starter site chore: add basic taskfile chore: add README.md feat: add 404 template chore: add .prettierrc chore: update hugo.toml feat: add icons and icon.html partial
This commit is contained in:
0
layouts/partials/footer.html
Normal file
0
layouts/partials/footer.html
Normal file
14
layouts/partials/head.html
Normal file
14
layouts/partials/head.html
Normal file
@ -0,0 +1,14 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>
|
||||
{{ .Title }}
|
||||
</title>
|
||||
<meta name="description" content="{{ .Description }}" />
|
||||
{{ $options := dict "inlineImports" true }}
|
||||
{{ $styles := resources.Get "css/styles.css" }}
|
||||
{{ $styles = $styles | resources.PostCSS $options }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $styles = $styles | minify | fingerprint | resources.PostProcess }}
|
||||
{{ end }}
|
||||
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
|
||||
</head>
|
0
layouts/partials/header.html
Normal file
0
layouts/partials/header.html
Normal file
13
layouts/partials/utils/icon.html
Normal file
13
layouts/partials/utils/icon.html
Normal file
@ -0,0 +1,13 @@
|
||||
{{- $icon := index .context.Site.Data.icons .name -}}
|
||||
|
||||
{{- if not $icon -}}
|
||||
{{ errorf "icon %q not found" .name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- $icon = $icon | safeHTML -}}
|
||||
|
||||
{{- if .attributes -}}
|
||||
{{- $icon = replaceRE "<svg" (printf "<svg %s" .attributes) $icon -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return ($icon | safeHTML) -}}
|
Reference in New Issue
Block a user