mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 11:07:32 -05:00
Compare commits
2 Commits
c06e7eb938
...
hugo-0.146
Author | SHA1 | Date | |
---|---|---|---|
7c79f83138
|
|||
fa89bc6746
|
3
assets/js/share-event.js
Normal file
3
assets/js/share-event.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function share_event(service) {
|
||||||
|
// this function does nothing by default
|
||||||
|
}
|
68
exampleSite/hugo.yaml
Normal file
68
exampleSite/hugo.yaml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
baseURL: https://example.com
|
||||||
|
theme: bobatheme
|
||||||
|
defaultContentLanguage: en
|
||||||
|
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
||||||
|
sectionPagesMenu: main
|
||||||
|
enableRobotsTXT: true
|
||||||
|
enableGitInfo: true
|
||||||
|
|
||||||
|
pagination:
|
||||||
|
pagerSize: 5
|
||||||
|
|
||||||
|
taxonomies:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
markup: # this just keeps the bobatheme markup styling
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
outputFormats:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
params:
|
||||||
|
author:
|
||||||
|
name: bbaovanc
|
||||||
|
|
||||||
|
# these are for the OpenGraph/Twitter embeds in Hugo
|
||||||
|
description: Example website for bobatheme
|
||||||
|
|
||||||
|
# these are for favicons in bobatheme (disabled by default)
|
||||||
|
# faviconSVG: favicon.svg
|
||||||
|
# appleTouchPNG: apple-touch-icon.png
|
||||||
|
|
||||||
|
# show reading time (enabled by default)
|
||||||
|
# readingtime: true
|
||||||
|
|
||||||
|
# used for "View source" (unset by default)
|
||||||
|
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
|
||||||
|
# gitFileIcon: github-circle
|
||||||
|
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
|
||||||
|
|
||||||
|
# social media share icons
|
||||||
|
# shareButtons:
|
||||||
|
# twitter: true
|
||||||
|
# facebook: true
|
||||||
|
# linkedin: true
|
||||||
|
# reddit: true
|
||||||
|
# telegram: true
|
||||||
|
# print: true
|
||||||
|
|
||||||
|
# show "Latest Posts" section at bottom of content pages
|
||||||
|
# latestPostsOnContent: true
|
||||||
|
|
||||||
|
# footer: >-
|
||||||
|
# Some example text for the footer.
|
||||||
|
|
||||||
|
|
||||||
|
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
||||||
|
# you probably want to keep this default
|
||||||
|
privacy:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
languages:
|
||||||
|
en:
|
||||||
|
languageName: English
|
||||||
|
title: Example Website
|
||||||
|
weight: 1
|
@ -8,12 +8,6 @@
|
|||||||
|
|
||||||
{{ partial "top.html" . }}
|
{{ partial "top.html" . }}
|
||||||
|
|
||||||
{{ if hugo.IsServer -}}
|
|
||||||
<div style="position: fixed; bottom: 25px; right: 25px;">
|
|
||||||
{{ templates.Current.Name }}
|
|
||||||
</div>
|
|
||||||
{{ end -}}
|
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
{{ if not .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
@ -1,14 +0,0 @@
|
|||||||
{{/* https://github.com/gohugoio/hugo/issues/13823#issuecomment-3015270202 */}}
|
|
||||||
{{ with .Get 0 -}}
|
|
||||||
{{ with $.Page.GetPage . -}}
|
|
||||||
{{ .RenderShortcodes -}}
|
|
||||||
{{ else with $.Page.Resources.Get . -}}
|
|
||||||
{{ .RenderShortcodes -}}
|
|
||||||
{{ else with resources.Get . -}}
|
|
||||||
{{ .Content -}}
|
|
||||||
{{ else -}}
|
|
||||||
{{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position -}}
|
|
||||||
{{ end -}}
|
|
||||||
{{ else -}}
|
|
||||||
{{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position -}}
|
|
||||||
{{ end -}}
|
|
@ -16,6 +16,9 @@
|
|||||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||||
|
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Params.faviconSVG }}
|
{{ with .Site.Params.faviconSVG }}
|
||||||
<link rel="icon" href="{{ . | absURL }}" />
|
<link rel="icon" href="{{ . | absURL }}" />
|
20
layouts/shortcodes/include.html
Normal file
20
layouts/shortcodes/include.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{{ $path := "" }}
|
||||||
|
{{ $markdown := false }}
|
||||||
|
{{ if .IsNamedParams }}
|
||||||
|
{{ $path = .Get "path" }}
|
||||||
|
{{ with .Get "markdown" }}
|
||||||
|
{{ $markdown = . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $path = .Get 0 }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with ($path | readFile) }}
|
||||||
|
{{ if $markdown }}
|
||||||
|
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $path | readFile }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "file not found: %s" $path }}
|
||||||
|
{{ end }}
|
Reference in New Issue
Block a user