mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 11:07:32 -05:00
Compare commits
9 Commits
wip-print-
...
ad7432155f
Author | SHA1 | Date | |
---|---|---|---|
ad7432155f
|
|||
0aaf865b75
|
|||
c9095e948b
|
|||
ddb57e0120
|
|||
9b851ce0e4
|
|||
f34cffb849
|
|||
91994df910
|
|||
e84f334591
|
|||
ebf39263a6
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,4 +1,4 @@
|
|||||||
[submodule "assets/jam"]
|
[submodule "assets/jam"]
|
||||||
path = assets/jam
|
path = assets/jam
|
||||||
url = https://github.com/michaelampr/jam.git
|
url = https://github.com/BBaoVanC/jam.git
|
||||||
branch = master
|
branch = master
|
||||||
|
@ -248,31 +248,31 @@ hr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
table.markdown {
|
table.simple {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
border: 2px solid var(--text-1);
|
border: 2px solid var(--text-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.markdown thead {
|
table.simple thead {
|
||||||
background-color: var(--background-2);
|
background-color: var(--background-2);
|
||||||
color: var(--text-2);
|
color: var(--text-2);
|
||||||
border-bottom: 2px solid var(--text-1);
|
border-bottom: 2px solid var(--text-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.markdown th,
|
table.simple th,
|
||||||
table.markdown td {
|
table.simple td {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.markdown :is(th, td) + :is(th, td) {
|
table.simple :is(th, td) + :is(th, td) {
|
||||||
border-left: 2px solid var(--text-1);
|
border-left: 2px solid var(--text-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
table.markdown tbody tr:nth-child(odd) {
|
table.simple tbody tr:nth-child(odd) {
|
||||||
background-color: var(--background-0);
|
background-color: var(--background-0);
|
||||||
color: var(--text-0);
|
color: var(--text-0);
|
||||||
}
|
}
|
||||||
table.markdown tbody tr:nth-child(even) {
|
table.simple tbody tr:nth-child(even) {
|
||||||
background-color: var(--background-1);
|
background-color: var(--background-1);
|
||||||
color: var(--text-1);
|
color: var(--text-1);
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,23 @@ defaultContentLanguage: en
|
|||||||
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
||||||
sectionPagesMenu: main
|
sectionPagesMenu: main
|
||||||
enableRobotsTXT: true
|
enableRobotsTXT: true
|
||||||
paginate: 5
|
|
||||||
enableGitInfo: true
|
enableGitInfo: true
|
||||||
|
|
||||||
|
pagination:
|
||||||
|
pagerSize: 5
|
||||||
|
|
||||||
taxonomies:
|
taxonomies:
|
||||||
_merge: deep
|
_merge: deep
|
||||||
|
|
||||||
markup: # this just keeps the bobatheme markup styling
|
markup: # this just keeps the bobatheme markup styling
|
||||||
_merge: deep
|
_merge: deep
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
|
outputFormats:
|
||||||
|
_merge: deep
|
||||||
|
|
||||||
params:
|
params:
|
||||||
author:
|
author:
|
||||||
name: bbaovanc
|
name: bbaovanc
|
||||||
|
17
hugo.yaml
17
hugo.yaml
@ -2,6 +2,12 @@ markup:
|
|||||||
highlight:
|
highlight:
|
||||||
noClasses: false
|
noClasses: false
|
||||||
lineNos: true
|
lineNos: true
|
||||||
|
goldmark:
|
||||||
|
parser:
|
||||||
|
attribute:
|
||||||
|
block: true
|
||||||
|
# this is enabled by default already
|
||||||
|
#title: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
readingtime: true
|
readingtime: true
|
||||||
@ -12,11 +18,20 @@ taxonomies:
|
|||||||
author: authors
|
author: authors
|
||||||
series: series
|
series: series
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
page:
|
||||||
|
- html
|
||||||
|
- markdown
|
||||||
|
|
||||||
|
outputFormats:
|
||||||
|
markdown:
|
||||||
|
ugly: true
|
||||||
|
|
||||||
privacy:
|
privacy:
|
||||||
googleAnalytics:
|
googleAnalytics:
|
||||||
disable: true
|
disable: true
|
||||||
|
|
||||||
twitter:
|
x:
|
||||||
enableDNT: true
|
enableDNT: true
|
||||||
|
|
||||||
vimeo:
|
vimeo:
|
||||||
|
@ -30,6 +30,9 @@ readingtime:
|
|||||||
edit_history:
|
edit_history:
|
||||||
other: "Edit history"
|
other: "Edit history"
|
||||||
|
|
||||||
|
view_markdown:
|
||||||
|
other: "View raw"
|
||||||
|
|
||||||
|
|
||||||
# Post count
|
# Post count
|
||||||
no_posts:
|
no_posts:
|
||||||
@ -67,6 +70,9 @@ aria_rss_link:
|
|||||||
aria_post_meta_edit_history:
|
aria_post_meta_edit_history:
|
||||||
other: "link to page edit history"
|
other: "link to page edit history"
|
||||||
|
|
||||||
|
aria_post_meta_view_markdown:
|
||||||
|
other: "link to view raw markdown code of page"
|
||||||
|
|
||||||
aria_post_meta_categories:
|
aria_post_meta_categories:
|
||||||
other: "categories"
|
other: "categories"
|
||||||
|
|
||||||
|
9
layouts/_default/single.markdown.md
Normal file
9
layouts/_default/single.markdown.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{{ with .File -}}
|
||||||
|
{{ with (.Path | readFile) -}}
|
||||||
|
{{ . -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ errorf "file not found: %s" .Path -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ errorf "no file available for markdown template?" -}}
|
||||||
|
{{ end -}}
|
8
layouts/partials/page-metadata/item/viewraw.html
Normal file
8
layouts/partials/page-metadata/item/viewraw.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{{ with .OutputFormats.Get "markdown" }}
|
||||||
|
<span class="page-metadata-item post-meta-view-markdown" aria-label="{{ i18n "aria_post_meta_view_markdown" }}">
|
||||||
|
{{ partial "icon.html" "code" }}
|
||||||
|
<a href="{{ .Permalink }}" target="_blank">
|
||||||
|
{{- i18n "view_markdown" -}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
{{ end }}
|
@ -20,7 +20,10 @@
|
|||||||
{{ partial "page-metadata/item/authors.html" . }}
|
{{ partial "page-metadata/item/authors.html" . }}
|
||||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||||
|
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||||
|
|
||||||
{{ partial "page-metadata/item/categories.html" . }}
|
{{ partial "page-metadata/item/categories.html" . }}
|
||||||
|
|
||||||
{{ partial "page-metadata/item/tags.html" . }}
|
{{ partial "page-metadata/item/tags.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -24,6 +24,6 @@
|
|||||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
||||||
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||||
|
|
||||||
{{ with .Site.Social.twitter }}
|
{{ with .Site.Params.social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
{{/* See https://willschenk.com/articles/2020/styling_tables_with_hugo/ */}}
|
|
||||||
|
|
||||||
{{ $class := "markdown" }}
|
|
||||||
{{ with .Get "class" }}
|
|
||||||
{{ $class = delimit (slice $class .) " " }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $htmlTable := .Inner | .Page.RenderString (dict "display" "block") }}
|
|
||||||
{{ $new := printf `<table class="%s">` $class }}
|
|
||||||
{{ (replace $htmlTable "<table>" $new) | safeHTML }}
|
|
Reference in New Issue
Block a user