Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/J-Siu/hugo-theme-sk3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn, Sing Dao, Siu <john.sd.siu@gmail.com>2022-05-15 05:16:11 +0300
committerJohn, Sing Dao, Siu <john.sd.siu@gmail.com>2022-05-15 05:16:11 +0300
commitfb7a49d39a2ee656992794b2744b325cb35b702a (patch)
treed710a7bc4c1fcec9667bed4abf756b2e18e55fe5
parent1f7e80b394416ea9d8635a01343988383e407218 (diff)
breaking changes:
- updated Params names - google param section - restructure README.md
-rw-r--r--README.md498
-rw-r--r--config.demo.toml158
-rw-r--r--config.sample.toml87
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/adsense.html6
-rw-r--r--layouts/partials/footer.html4
-rw-r--r--layouts/partials/head.html14
-rw-r--r--layouts/partials/social-link.html2
-rw-r--r--layouts/partials/social-share.html2
-rw-r--r--static/js/sk3.js4
11 files changed, 331 insertions, 448 deletions
diff --git a/README.md b/README.md
index 038805c..7f2806d 100644
--- a/README.md
+++ b/README.md
@@ -13,27 +13,16 @@ Full feature Hugo theme build on top of [hugo-theme-sk2](//github.com/J-Siu/hugo
- [Features](#features)
- [Layout](#layout)
- [Markdown Style](#markdown-style)
- - [Site](#site)
- - [Main Section Type](#main-section-type)
- - [Table of ContentToc Open By Default](#table-of-contenttoc-open-by-default)
- - [Favicon](#favicon)
- - [Sub-Title](#sub-title)
- - [Copyright Start Year](#copyright-start-year)
- - [Page Width](#page-width)
- - [List Last Modify Date](#list-last-modify-date)
- - [Custom CSS](#custom-css)
- - [Custom Javascript](#custom-javascript)
- - [User-declared Canonical](#user-declared-canonical)
- - [SVG External](#svg-external)
- - [Social Links](#social-links)
- - [Social Share](#social-share)
- - [Color Theme](#color-theme)
- - [Card/List](#cardlist)
- - [Google AdSense](#google-adsense)
- - [Google Analytic](#google-analytic)
- - [Twitter Cards / Opengraph](#twitter-cards--opengraph)
- - [Page Info Style](#page-info-style)
- - [Per Page](#per-page)
+ - [Site Config](#site-config)
+ - [Social Network](#social-network)
+ - [Share Button](#share-button)
+ - [Theme Color](#theme-color)
+ - [Layout Dimensions](#layout-dimensions)
+ - [Custom CSS](#custom-css)
+ - [Custom Javascript](#custom-javascript)
+ - [Favicon](#favicon)
+ - [Google](#google)
+- [Per Page Settings](#per-page-settings)
- [Sample Config](#sample-config)
- [Font Awesome](#font-awesome)
- [Thank You](#thank-you)
@@ -53,7 +42,7 @@ SK3|[hugo-theme-sk3](//github.com/J-Siu/hugo-theme-sk3)|[SK3](//themes.gohugo.io
### Sites
-John Siu Blog: [johnsiu.com](//johnsiu.com/)
+John Siu Blog: [JohnSiu.com](//JohnSiu.com/)
SK3 demo site: [sk3.jsiu.dev](//sk3.jsiu.dev/) with content from [hugoBasicExample](//github.com/gohugoio/hugoBasicExample)
@@ -117,97 +106,86 @@ hugo server -D --bind :: \
Headline in markdown should start at level 3 (###), as site title is H1 and page title is H2.
-#### Site
-
-##### Main Section Type
-
-For generating homepage list. Hugo default to section with most entries.
-
-```toml
-[Params]
-mainSections = "post"
-```
-
-##### Table of Content(Toc) Open By Default
-
-```toml
-[Params]
-openToc = true
-```
-
-##### Favicon
-
-Path of favicon of the published site.
-
-If favicon `logo.svg` is put inside `static` like following:
-
-```sh
-./
-├── archetypes/
-├── content/
-├── public/
-├── resources/
-├── static/
-│ └── logo.svg
-├── themes/
-└── config.toml
-```
-
-The final path will be `/logo.svg`:
-
-```toml
-[Params]
-favicon = "/logo.svg"
-```
-
-SK themes come with default favicon. To disable it:
-
-```sh
-# At Hugo site root
-touch static/favicon.ico
-```
-
-##### Sub-Title
-
-If defined, sub-title appear after site title in smaller font.
-
-```toml
-[Params]
-subtitle = "A Hugo Themes"
-```
-
-##### Copyright Start Year
-
-Year is extracted from `startdate` and generate copyright in format "2012-(current year)".
-
-> Site `copyright` override this behavior.
-
-```toml
-[Params]
-startdate = "2012-12-02"
-```
-
-##### Page Width
-
-> default: 1200px
-
-```toml
-[Params]
-pagewidth = "1200px"
-```
-
-> Page width will automatically set to 100% on small screen.
-
-##### List Last Modify Date
-
-Use last modify date in list page.
-
-```toml
-[Params]
-listlastmod = true
-```
-
-##### Custom CSS
+#### Site Config
+
+**[Params]**
+
+Field|Type|Default Value|Description
+---|---|---|---
+customCss|text array|[]|See [Custom CSS](#custom-css)
+customJs|text array|[]|See [Custom Javascript](#custom-javascript)
+description|text|""|Open Graph / Twitter Card description
+enableExternalSvg|bool|false|`true` will load social icon using Font Awesome external css.
+enableInfoBox|bool|false| Enable page info box style
+enableListLastModify|bool|false|Use last modify date in list page.
+enableOpenGraph|bool|false|Enable Open Graph
+enableOpenToc|bool|true|Control if table of content(Toc) is open By default
+enableTwitterCard|bool|false|Enable Twitter Card
+enableUserCanonical|bool|false|Add `rel="canonical"` meta link with absolute URL to each page. Only use this if site require __user-declared canonical__ meta. This is not related to [Hugo Canonicalization](//gohugo.io/content-management/urls/#canonicalization) nor `canonifyurls`.
+favicon|text|""|See [Favicon](#favicon)
+images|text array|[]|Open Graph / Twitter Card image
+mainSections|text|n/a|Hugo default to section with most entries when For generating homepage list.
+pagewidth|text(px)|"1200px"|Page width will automatically set to 100% on small screen(<993px).
+startdate|text|""|eg. "2012-12-02". Year is extracted and generate copyright line "2012-(current year)". Site `copyright` override this behavior.
+subtitle|text|""|If defined, sub-title appear after site title in smaller font.
+title|text|""|Open Graph / Twitter Card title
+
+#### Social Network
+
+**[Params.sociallink]** Show social network buttons if IDs are provided.
+
+Field|Type|Default Value
+---|---|---
+facebook|text|""
+flickr|text|""
+instagram|text|""
+linkedin|text|""
+pinterest|text|""
+reddit|text|""
+rss|bool|false
+tumblr|text|""
+twitter|text|""
+vimeo|text|""
+youtubechannel|text|""
+youtubeuser|text|""
+
+#### Share Button
+
+**[Params.socialshare]** Control if share buttons appear at the bottom of page.
+
+Field|Type|Default Value
+---|---|---|---
+facebook|bool|false
+instagram|bool|false
+linkedin|bool|false
+pinterest|bool|false
+reddit|bool|false
+telegram|bool|false
+twitter|bool|false
+vk|bool|false
+
+#### Theme Color
+
+**[Params.color]** Control theme color. Default is a dark theme.
+
+Field|Type|Default Value|Light Theme**
+---|---|----|---
+bg|text|"#181a1b"|"white"
+border|text|"white"|""black"
+link|text|"#3d84ff"|"#3d84ff"
+text|text|"white"|"black"
+
+#### Layout Dimensions
+
+**[Params.card]** Control list page layout.
+
+Field|Type|Default Value|Description
+---|---|---|---
+date|bool|true|Show data for each item in list
+summary|bool|true|Show summary for each item in list
+width|text(%)|"32%"|Control list page column width on desktop(>992px). 32% for 3 columns. 24% for 4 columns, etc. Single column use 100%.
+
+#### Custom CSS
If you add custom css files like following:
@@ -229,10 +207,10 @@ The final path of your css files will be `/css/abc.css` and `/css/def.css`:
```toml
[Params]
-custom_css = ["/css/abc.css", "/css/def.css"]
+customCss = ["/css/abc.css", "/css/def.css"]
```
-##### Custom Javascript
+#### Custom Javascript
If you add custom javascript like following:
@@ -254,158 +232,53 @@ The final path of your javascript files will be `/js/abc.js` and `/js/def.js`:
```toml
[Params]
-custom_js = ["/js/abc.js", "/js/def.js"]
+customJs = ["/js/abc.js", "/js/def.js"]
```
-##### User-declared Canonical
-> Only use this if site require __user-declared canonical__ meta. This is not related to [Hugo Canonicalization](//gohugo.io/content-management/urls/#canonicalization) nor `canonifyurls`.
+#### Favicon
-```toml
-[Params]
-user_canonical = true
-```
+Path of favicon of the published site.
-A `rel="canonical"` meta link with absolute URL will be added to each page.
+If favicon `logo.svg` is put inside `static` like following:
-##### SVG External
+```sh
+./
+├── archetypes/
+├── content/
+├── public/
+├── resources/
+├── static/
+│ └── logo.svg
+├── themes/
+└── config.toml
+```
-Set `svg_ext` to `true` will load social icon using Font Awesome external css.
+The final path will be `/logo.svg`:
```toml
[Params]
-svg_ext = true
+favicon = "/logo.svg"
```
-#### Social Links
-
- Social link buttons appear at the bottom of card/list page:
-
- ```toml
- [Params.sociallink]
- facebook = ""
- flickr = ""
- instagram = ""
- linkedin = ""
- pinterest = ""
- reddit = ""
- rss = true
- tumblr = ""
- twitter = ""
- vimeo = ""
- youtubechannel = ""
- youtubeuser = ""
- ```
-
-#### Social Share
-
- Social share buttons appear at the bottom of regular page:
-
- ```toml
- [Params.socialshare]
- facebook = true
- instagram = true
- linkedin = true
- pinterest = true
- reddit = true
- telegram = true
- twitter = true
- vk = true
- ````
-
-#### Color Theme
-
-- Default dark theme
-
- Change color theme directly in `config.toml`.
-
- Default in CSS:
-
- ```toml
- [Params.color]
- bg = "#181a1b"
- border = "white"
- link = "#3d84ff"
- text = "white"
- ```
-
- Following is a light theme
-
- ```toml
- [Params.color]
- bg = "white"
- border = "black"
- link = "#3d84ff"
- text = "black"
- ```
-
-#### Card/List
-
-- Width (default:32% on computer screen)
- > 32% gives 3 columns, 24% gives 4 columns, etc. 100% basically turn into list mode.
-- Date
-- Summary
-
- ```toml
- [Params.card]
- date = true
- summary = true
- width = "32%"
- ```
-
-#### Google AdSense
-
-- Support Google AdSense auto:
-
- ```toml
- [Params]
- adsense_id = ""
- ```
-
-- Control page level ads:
-
- ```toml
- [Params]
- adsense_page_level = true
- ```
-
- Add above to enable page level ads.
-
-#### Google Analytic
-
-- Support Google Analytic UA and GA4
-
- ```toml
- [Params]
- googleAnalyticsUA = true
- ```
-
-Only use this if using UA. If using GA4, set above to false, or unset.
-
-#### Twitter Cards / Opengraph
-
-Use following to enable Twitter Cards / Opengraph:
-
-> This should be enabled in general as Google search also pick up the same meta tags.
+SK themes come with default favicon. To disable it:
-```toml
-[Params]
-opengraph = true
-twittercards = true
-description = "site description"
-title = "site title"
+```sh
+# At Hugo site root
+touch static/favicon.ico
```
-#### Page Info Style
+#### Google
- Page info can be in box style.
+**[Params.google]**
- ```toml
- [Params]
- pageinfobox = true
- ```
+Field|Type|Default Value|Description
+---|---|---|---
+AdsenseId|text|""|AdSense ID/Tag.
+enablePageLevelAd|bool|false|Enable/Disable page level ads.
+enableUA|bool|false|Set this to 'true' if using Google Analytics UA.
-#### Per Page
+### Per Page Settings
- Disable Disqus
- Disable Prev/Next
@@ -430,76 +303,83 @@ baseURL = "https://"
theme = "sk3"
title = ""
-enableGitInfo = true
DefaultContentLanguage = "en"
+enableGitInfo = true
enableInlineShortcodes = true
languageCode = "en"
paginate = 15
+relativeURLs = true
#disqusShortname = ""
#googleAnalytics = ""
[Params]
-#googleAnalyticsUA = true
-#adsense_id = ""
-#custom_css = ["/css/abc.css", "/css/def.css"]
-#custom_js = ["/js/abc.js", "/js/def.js"]
-#favicon = "/favicon.ico"
-#listlastmod = true
-#mainSections = "post"
-#pagewidth = "1200px"
-#startdate = "2012-12-02"
-#subtitle = "A Hugo Theme"
-#svg_ext = true
-#user_canonical = false
-
-# Fill in following if using opengraph / twitter card
-#opengraph = true
-#twitercards = true
-#description = "A Hugo Theme"
-#title = "SK3"
-
- [Params.card]
- date = true
- summary = true
- #width = "32%"
-
- # [Params.color]
- # bg = "#181a1b"
- # border = "white"
- # link = "#3d84ff"
- # text = "white"
-
- # [Params.sociallink]
- # facebook = ""
- # flickr = ""
- # github = ""
- # instagram = ""
- # linkedin = ""
- # pinterest = ""
- # reddit = ""
- # stack-exchange = ""
- # stack-overflow = ""
- # tumblr = ""
- # twitter = ""
- # vimeo = ""
- # youtubechannel = ""
- # youtubeuser = ""
-
- [Params.socialshare]
- facebook = true
- instagram = true
- linkedin = true
- pinterest = true
- reddit = true
- telegram = true
- twitter = true
- vk = true
+customCss = ["/css/abc.css", "/css/def.css"]
+customJs = ["/js/abc.js", "/js/def.js"]
+enableExternalSvg = false
+enableInfoBox = true
+enableListLastModify = false
+enableOpenToc = false
+enableUserCanonical = false
+favicon = "/favicon.ico"
+mainSections = "post"
+pagewidth = "1200px"
+startdate = "2012-12-02"
+subtitle = "A Hugo Theme"
+
+# Fill in following if using Open Graph / Twitter Card
+description = "A Hugo Theme"
+enableOpenGraph = true
+enableTwitterCard = true
+title = "SK3"
+
+ [Params.google]
+ AdsenseId = ""
+ enablePageLevelAd = false
+ enableUA = false
+
+ [Params.card]
+ date = true
+ summary = true
+ width = "32%"
+
+ [Params.color]
+ bg = "#181a1b"
+ border = "white"
+ link = "#3d84ff"
+ text = "white"
+
+ [Params.sociallink]
+ facebook = ""
+ flickr = ""
+ github = ""
+ instagram = ""
+ linkedin = ""
+ pinterest = ""
+ reddit = ""
+ rss = true
+ stack-exchange = ""
+ stack-overflow = ""
+ tumblr = ""
+ twitter = ""
+ vimeo = ""
+ youtubechannel = ""
+ youtubeuser = ""
+
+ [Params.socialshare]
+ facebook = true
+ instagram = true
+ linkedin = true
+ pinterest = true
+ reddit = true
+ telegram = true
+ twitter = true
+ vk = true
[markup]
- [markup.tableOfContents]
- endLevel = 6
- startLevel = 1
+ [markup.tableOfContents]
+ endLevel = 6
+ startLevel = 1
```
### Font Awesome
@@ -570,7 +450,7 @@ Social buttons provided by [Font Awesome](//github.com/FortAwesome/Font-Awesome)
- Fix css spacing, kbd, social buttons, author box
- Fix menu closing click through
- 0.9.5
- - Add `listlastmod`
+ - Add `enableListLastModify`
- Fix H1 line height
- Fix Google Analytics
- Fix table for mobile screen
diff --git a/config.demo.toml b/config.demo.toml
index 048ee33..da90ae3 100644
--- a/config.demo.toml
+++ b/config.demo.toml
@@ -14,93 +14,93 @@ paginate = 3
relativeURLs = true
[Params]
-# mainSections = "post"
-# pagewidth = "1200px"
-# startdate = "2012-12-02"
-favicon = "/favicon.ico"
-listlastmod = true
-openToc = true
-pageinfobox = true
-subtitle = "A Hugo Theme"
-svg_ext = true
-user_canonical = false
+enableExternalSvg = true
+enableInfoBox = true
+enableListLastModify = true
+enableOpenToc = true
+enableUserCanonical = false
+favicon = "/favicon.ico"
+mainSections = "post"
+pagewidth = "1200px"
+startdate = "2012-12-02"
+subtitle = "A Hugo Theme"
-# Fill in following if using opengraph / twitter card
-description = "Hugo Theme SK3 Demo Site"
-opengraph = true
-title = "Hugo Theme SK3 Demo Site"
-twitercards = true
+# Fill in following if using Open Graph / Twitter Card
+description = "Hugo Theme SK3 Demo Site"
+enableOpenGraph = true
+enableTwitterCard = true
+title = "Hugo Theme SK3 Demo Site(params)"
-[Params.card]
-date = true
-summary = true
-# width = "32%"
+ [Params.card]
+ date = true
+ summary = true
+ # width = "32%"
-# [Params.color]
-# bg = "#181a1b"
-# border = "white"
-# link = "#3d84ff"
-# text = "white"
+ # [Params.color]
+ # bg = "white"
+ # border = "black"
+ # link = "#3d84ff"
+ # text = "black"
-[Params.sociallink]
-facebook = "john.siu.714"
-flickr = "johnsiu-com"
-github = "J-Siu"
-instagram = "john.sd.siu"
-linkedin = "john-sing-dao-siu"
-pinterest = "johnsdsiu"
-reddit = "js1943"
-rss = true
-stack-exchange = "1882213"
-stack-overflow = "1810391"
-tumblr = "jsds"
-twitter = "JohnSiuCom"
-vimeo = "user88929197"
-youtubechannel = "UC5LvdqfL2PubOp904UnUJAg"
-youtubeuser = "JohnSDSiu"
+ [Params.sociallink]
+ facebook = "john.siu.714"
+ flickr = "johnsiu-com"
+ github = "J-Siu"
+ instagram = "john.sd.siu"
+ linkedin = "john-sing-dao-siu"
+ pinterest = "johnsdsiu"
+ reddit = "js1943"
+ rss = true
+ stack-exchange = "1882213"
+ stack-overflow = "1810391"
+ tumblr = "jsds"
+ twitter = "JohnSiuCom"
+ vimeo = "user88929197"
+ youtubechannel = "UC5LvdqfL2PubOp904UnUJAg"
+ youtubeuser = "JohnSDSiu"
-[Params.socialshare]
-facebook = true
-linkedin = true
-pinterest = true
-reddit = true
-telegram = true
-twitter = true
-vk = true
+ [Params.socialshare]
+ facebook = true
+ linkedin = true
+ pinterest = true
+ reddit = true
+ telegram = true
+ twitter = true
+ vk = true
[markup]
defaultMarkdownHandler = "goldmark"
-[markup.highlight]
-codeFences = true
-guessSyntax = false
-hl_Lines = ""
-lineNoStart = 1
-lineNos = true
-lineNumbersInTable = true
-noClasses = true
-style = "fruity"
-tabWidth = 4
+ [markup.highlight]
+ codeFences = true
+ guessSyntax = false
+ hl_Lines = ""
+ lineNoStart = 1
+ lineNos = true
+ lineNumbersInTable = true
+ noClasses = true
+ style = "fruity"
+ tabWidth = 4
-[markup.tableOfContents]
-endLevel = 6
-ordered = false
-startLevel = 1
+ [markup.tableOfContents]
+ endLevel = 6
+ ordered = false
+ startLevel = 1
-[markup.goldmark]
-[markup.goldmark.extensions]
-definitionList = true
-footnote = true
-linkify = true
-strikethrough = true
-table = true
-taskList = true
-typographer = true
-[markup.goldmark.parser]
-attribute = true
-autoHeadingID = true
-autoHeadingIDType = "github"
-[markup.goldmark.renderer]
-hardWraps = false
-unsafe = true
-xhtml = false
+ [markup.goldmark]
+ [markup.goldmark.extensions]
+ definitionList = true
+ footnote = true
+ linkify = true
+ strikethrough = true
+ table = true
+ taskList = true
+ typographer = true
+ [markup.goldmark.parser]
+ attribute = true
+ autoHeadingID = true
+ autoHeadingIDType = "github"
+ [markup.goldmark.renderer]
+ hardWraps = false
+ unsafe = true
+ xhtml = false
diff --git a/config.sample.toml b/config.sample.toml
index f5ad2a4..7f6a1ed 100644
--- a/config.sample.toml
+++ b/config.sample.toml
@@ -7,60 +7,63 @@ enableGitInfo = true
enableInlineShortcodes = true
languageCode = "en"
paginate = 15
+relativeURLs = true
#disqusShortname = ""
#googleAnalytics = ""
[Params]
-# adsense_id = ""
-# adsense_page_level = true
-# custom_css = ["/css/abc.css", "/css/def.css"]
-# custom_js = ["/js/abc.js", "/js/def.js"]
-# favicon = "/favicon.ico"
-# googleAnalyticsUA = true
-# listlastmod = false
-# mainSections = "post"
-# openToc = false
-# pageinfobox = true
-# pagewidth = "1200px"
-# startdate = "2012-12-02"
-# subtitle = "A Hugo Theme"
-# svg_ext = false
-# user_canonical = false
+customCss = ["/css/abc.css", "/css/def.css"]
+customJs = ["/js/abc.js", "/js/def.js"]
+enableExternalSvg = false
+enableInfoBox = true
+enableListLastModify = false
+enableOpenToc = false
+enableUserCanonical = false
+favicon = "/favicon.ico"
+mainSections = "post"
+pagewidth = "1200px"
+startdate = "2012-12-02"
+subtitle = "A Hugo Theme"
-# Fill in following if using opengraph / twitter card
-#opengraph = true
-#twitercards = true
-#description = "A Hugo Theme"
-#title = "SK3"
+# Fill in following if using Open Graph / Twitter Card
+description = "A Hugo Theme"
+enableOpenGraph = true
+enableTwitterCard = true
+title = "SK3"
+
+ [Params.google]
+ AdsenseId = ""
+ enablePageLevelAd = false
+ enableUA = false
[Params.card]
date = true
summary = true
- #width = "32%"
+ width = "32%"
- # [Params.color]
- # bg = "#181a1b"
- # border = "white"
- # link = "#3d84ff"
- # text = "white"
+ [Params.color]
+ bg = "#181a1b"
+ border = "white"
+ link = "#3d84ff"
+ text = "white"
- # [Params.sociallink]
- # facebook = ""
- # flickr = ""
- # github = ""
- # instagram = ""
- # linkedin = ""
- # pinterest = ""
- # reddit = ""
- # rss = true
- # stack-exchange = ""
- # stack-overflow = ""
- # tumblr = ""
- # twitter = ""
- # vimeo = ""
- # youtubechannel = ""
- # youtubeuser = ""
+ [Params.sociallink]
+ facebook = ""
+ flickr = ""
+ github = ""
+ instagram = ""
+ linkedin = ""
+ pinterest = ""
+ reddit = ""
+ rss = true
+ stack-exchange = ""
+ stack-overflow = ""
+ tumblr = ""
+ twitter = ""
+ vimeo = ""
+ youtubechannel = ""
+ youtubeuser = ""
[Params.socialshare]
facebook = true
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 7e10559..c195e11 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -44,7 +44,7 @@
<h3>{{.Title}}</h3>
</a>
{{if site.Params.card.date}}
- {{if and site.Params.listlastmod .Lastmod}}
+ {{if and site.Params.enableListLastModify .Lastmod}}
{{with .Lastmod}}<div class="sk3-flex-right sk3-flex-down">{{dateFormat "2006-01-02" .}}</div>{{end}}
{{else}}
{{with .Date}}<div class="sk3-flex-right sk3-flex-down">{{dateFormat "2006-01-02" .}}</div>{{end}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 4f3419f..665a75c 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -29,7 +29,7 @@
<!--Page Info-->
<section class="sk3-margin-v-full">
- {{if site.Params.pageinfobox}}
+ {{if site.Params.enableInfoBox}}
{{partial "pageinfo-box.html" .}}
{{else}}
{{partial "pageinfo.html" .}}
diff --git a/layouts/partials/adsense.html b/layouts/partials/adsense.html
index cd99408..5db11fa 100644
--- a/layouts/partials/adsense.html
+++ b/layouts/partials/adsense.html
@@ -1,9 +1,9 @@
-{{if site.Params.adsense_id}}
+{{if site.Params.google.AdsenseId}}
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
- google_ad_client: "{{site.Params.adsense_id}}",
- enable_page_level_ads: {{site.Params.adsense_page_level | default false}}
+ google_ad_client: "{{site.Params.google.AdsenseId}}",
+ enablepage_level_ads: {{site.Params.google.enablePageLevelAd | default false}}
});
</script>
{{end}} \ No newline at end of file
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 07b307e..54981af 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -18,5 +18,5 @@
</footer>
<!--hugo internal template-->
-{{if site.Params.opengraph}}{{template "_internal/opengraph.html" .}}{{end}}
-{{if site.Params.twittercards}}{{template "_internal/twitter_cards.html" .}}{{end}} \ No newline at end of file
+{{if site.Params.enableOpenGraph}}{{template "_internal/opengraph.html" .}}{{end}}
+{{if site.Params.enableTwitterCard}}{{template "_internal/twitter_cards.html" .}}{{end}} \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1c4cd4a..ac8f902 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -26,7 +26,7 @@
<!--author-->
{{with .Params.author}}<meta name="author" content="{{.}}">{{end}}
<!--canonical url-->
- {{if site.Params.user_canonical}}<link rel="canonical" href="{{absURL .Permalink}}"/>{{end}}
+ {{if site.Params.enableUserCanonical}}<link rel="canonical" href="{{absURL .Permalink}}"/>{{end}}
<!--rss, etc.-->
{{range .AlternativeOutputFormats}}
@@ -63,21 +63,21 @@
{{end}}
</style>
<!--css - custom-->
- {{range site.Params.custom_css}}
+ {{range site.Params.customCss}}
<link rel="stylesheet" href="{{.|relURL}}">
{{end}}
<!--script - SK3-->
{{if or site.Menus.main site.Params.socialshare (default true .Params.toc)}}
<script>
- openToc=false
- {{with site.Params.openToc}}openToc={{.}}{{end}}
+ enableOpenToc=false
+ {{with site.Params.enableOpenToc}}enableOpenToc={{.}}{{end}}
</script>
<script defer src="{{relLangURL ""}}js/sk3.js"></script>
{{end}}
<!--script - Google Analytics-->
{{if site.GoogleAnalytics}}
- {{if site.Params.GoogleAnalyticsUA}}
+ {{if site.Params.google.enableUA}}
{{template "_internal/google_analytics_async.html" .}}
{{else}}
{{template "_internal/google_analytics.html" .}}
@@ -86,7 +86,7 @@
<!--script - Google AdSense-->
{{partial "adsense.html" .}}
<!--script - custom-->
- {{range site.Params.custom_js}}
+ {{range site.Params.customJs}}
<script src="{{.|relURL}}"></script>
{{end}}
<!--script - Hugo-->
@@ -100,7 +100,7 @@
*/
</script>
<!--svg-->
- {{if site.Params.svg_ext}}
+ {{if site.Params.enableExternalSvg}}
<link href="//use.fontawesome.com/releases/v5.13.1/css/all.css" rel="stylesheet">
{{else}}
{{partial "sk3-fa.svg" .}}
diff --git a/layouts/partials/social-link.html b/layouts/partials/social-link.html
index 5e21223..6ceb3ac 100644
--- a/layouts/partials/social-link.html
+++ b/layouts/partials/social-link.html
@@ -1,4 +1,4 @@
-{{if site.Params.svg_ext}}
+{{if site.Params.enableExternalSvg}}
{{partial "social-link-ext.html" .}}
{{else}}
{{partial "social-link-int.html" .}}
diff --git a/layouts/partials/social-share.html b/layouts/partials/social-share.html
index b4682cf..88c25c3 100644
--- a/layouts/partials/social-share.html
+++ b/layouts/partials/social-share.html
@@ -1,4 +1,4 @@
-{{if site.Params.svg_ext}}
+{{if site.Params.enableExternalSvg}}
{{partial "social-share-ext.html" .}}
{{else}}
{{partial "social-share-int.html" .}}
diff --git a/static/js/sk3.js b/static/js/sk3.js
index 1975afd..cc0d50c 100644
--- a/static/js/sk3.js
+++ b/static/js/sk3.js
@@ -28,9 +28,9 @@ var c = document.getElementsByClassName("collapsible");
for (var i = 0; i < c.length; i++) {
// Unhide
c[i].style.display = "block"
- // Default from 'openToc'
+ // Default from 'enableOpenToc'
var e = c[i].nextElementSibling;
- e.style.display = (openToc) ? "block" : "none"
+ e.style.display = (enableOpenToc) ? "block" : "none"
// Add event
c[i].addEventListener("click", function () {
this.classList.toggle(false);