From b03390d237427a2b9cfee55949cb1da62f1a6856 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 29 Oct 2022 17:14:19 +0200 Subject: Revert "Merge branch 'canary' into master" (#712) Revert "Merge branch 'canary' into master (#711)" This reverts commit 8a597a5c9c861d2bce22a5e06c7667cd9c8e263a. --- archetypes/default.md | 1 + assets/scss/partials/article.scss | 1 + assets/scss/partials/highlight/dark.scss | 2 +- assets/scss/partials/layout/article.scss | 48 ++--- assets/scss/partials/layout/search.scss | 4 +- assets/scss/partials/sidebar.scss | 6 +- assets/ts/codeblock.ts | 28 --- assets/ts/color.ts | 63 ++++++ assets/ts/gallery.ts | 240 ++++++++++++++------- assets/ts/main.ts | 69 +++++- config.yaml | 143 ++++++++++++ config/_default/module.toml | 3 - config/_default/params.toml | 52 ----- data/external.yaml | 22 ++ exampleSite/README.md | 1 + exampleSite/assets/img/favicon.png | Bin 1031 -> 0 bytes exampleSite/assets/img/logo.jpg | Bin 21951 -> 0 bytes exampleSite/config.yaml | 239 ++++++++++++++++++++ exampleSite/config/_default/config.toml | 20 -- exampleSite/config/_default/languages.toml | 16 -- exampleSite/config/_default/markup.toml | 18 -- exampleSite/config/_default/menu.toml | 20 -- exampleSite/config/_default/params.toml | 106 --------- exampleSite/config/_default/permalinks.toml | 3 - exampleSite/config/_default/related.toml | 12 -- exampleSite/content/post/emoji-support/index.md | 50 +++++ .../the-creative-exchange-d2zvqp3fpro-unsplash.jpg | Bin 0 -> 35369 bytes exampleSite/content/post/markdown-syntax/index.md | 39 ++-- go.mod | 2 +- i18n/ar.yaml | 67 ++++-- i18n/bn.yaml | 57 +++-- i18n/ca.yaml | 66 ++++-- i18n/de.yaml | 67 ++++-- i18n/el.yaml | 63 ++++-- i18n/en.yaml | 69 ++++-- i18n/es.yaml | 66 ++++-- i18n/fa.yaml | 66 ++++-- i18n/fr.yaml | 62 ++++-- i18n/hu.yaml | 66 ++++-- i18n/id.yaml | 66 ++++-- i18n/it.yaml | 66 ++++-- i18n/ja.yaml | 64 ++++-- i18n/ko.yaml | 63 ++++-- i18n/nl.yaml | 51 +++-- i18n/pl.yaml | 66 ++++-- i18n/pt-br.yaml | 62 ++++-- i18n/ru.yaml | 56 +++-- i18n/th.yaml | 63 ++++-- i18n/tr.yaml | 47 ++-- i18n/uk.yaml | 63 ++++-- i18n/zh-cn.yaml | 64 ++++-- i18n/zh-hk.yaml | 66 ++++-- i18n/zh-tw.yaml | 53 +++-- layouts/_default/_markup/render-codeblock.html | 20 -- layouts/_default/_markup/render-image.html | 2 +- layouts/_default/archives.html | 6 +- layouts/_default/list.html | 2 +- layouts/_default/rss.xml | 1 + layouts/index.html | 5 +- layouts/page/search.json | 7 +- layouts/partials/article-list/compact.html | 2 +- layouts/partials/article/components/header.html | 2 +- .../partials/article/components/photoswipe.html | 88 ++++++-- .../article/components/related-content.html | 2 +- layouts/partials/data/title.html | 7 +- layouts/partials/footer/components/script.html | 2 + layouts/partials/footer/footer.html | 2 +- layouts/partials/head/colorScheme.html | 4 +- layouts/partials/head/head.html | 7 +- .../partials/head/opengraph/provider/twitter.html | 2 +- layouts/partials/sidebar/left.html | 4 +- layouts/partials/widget/archives.html | 4 +- theme.toml | 2 +- 73 files changed, 1981 insertions(+), 897 deletions(-) delete mode 100644 assets/ts/codeblock.ts create mode 100644 assets/ts/color.ts create mode 100644 config.yaml delete mode 100644 config/_default/module.toml delete mode 100644 config/_default/params.toml create mode 100644 exampleSite/README.md delete mode 100644 exampleSite/assets/img/favicon.png delete mode 100644 exampleSite/assets/img/logo.jpg create mode 100644 exampleSite/config.yaml delete mode 100644 exampleSite/config/_default/config.toml delete mode 100644 exampleSite/config/_default/languages.toml delete mode 100644 exampleSite/config/_default/markup.toml delete mode 100644 exampleSite/config/_default/menu.toml delete mode 100644 exampleSite/config/_default/params.toml delete mode 100644 exampleSite/config/_default/permalinks.toml delete mode 100644 exampleSite/config/_default/related.toml create mode 100644 exampleSite/content/post/emoji-support/index.md create mode 100644 exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg delete mode 100644 layouts/_default/_markup/render-codeblock.html diff --git a/archetypes/default.md b/archetypes/default.md index 129dec2..0556d3a 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -5,6 +5,7 @@ date: {{ .Date }} image: math: license: +hidden: false comments: true draft: true --- \ No newline at end of file diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index a041e9b..f085ff0 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -192,6 +192,7 @@ .article-preview { font-size: 1.4rem; color: var(--card-text-color-tertiary); + margin-top: 10px; line-height: 1.5; } } diff --git a/assets/scss/partials/highlight/dark.scss b/assets/scss/partials/highlight/dark.scss index 3ea6c56..0d3f330 100644 --- a/assets/scss/partials/highlight/dark.scss +++ b/assets/scss/partials/highlight/dark.scss @@ -11,4 +11,4 @@ $text-color: $color; $name-color: #a6e22e; $literal-color: #e6db74; -@import "common.scss"; \ No newline at end of file +@import "common.scss"; diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index ba06c11..97c7e77 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -286,12 +286,10 @@ line-height: 1.428571429; word-break: break-all; padding: var(--card-padding); - // keep Codeblocks LTR [dir="rtl"] & { direction: ltr; } - code { color: unset; border: none; @@ -305,11 +303,15 @@ padding: var(--card-padding); position: relative; + &:hover { + .copyCodeButton { + opacity: 1; + } + } // keep Codeblocks LTR [dir="rtl"] & { direction: ltr; } - pre { margin: initial; padding: 0; @@ -318,30 +320,20 @@ } } - .codeblock { - header { - background-color: var(--card-background-selected); - padding: 5px var(--card-padding); - display: flex; - justify-content: space-between; - box-shadow: var(--shadow-l1); - - span { - text-transform: uppercase; - font-weight: bold; - color: var(--card-text-color-secondary); - } - } - - .codeblock-copy { - cursor: pointer; - background-color: transparent; - border: none; - padding: 8px 16px; - color: var(--card-text-color-secondary); - font-size: 14px; - font-weight: bold; - } + .copyCodeButton { + position: absolute; + top: calc(var(--card-padding)); + right: calc(var(--card-padding)); + background: var(--card-background); + border: none; + box-shadow: var(--shadow-l2); + border-radius: var(--tag-border-radius); + padding: 8px 16px; + color: var(--card-text-color-main); + cursor: pointer; + font-size: 14px; + opacity: 0; + transition: opacity 0.3s ease; } .table-wrapper { @@ -410,7 +402,7 @@ /// Negative margins blockquote, figure, - .codeblock, + .highlight, pre, .gallery, .video-wrapper, diff --git a/assets/scss/partials/layout/search.scss b/assets/scss/partials/layout/search.scss index cbf15b7..89cdcef 100644 --- a/assets/scss/partials/layout/search.scss +++ b/assets/scss/partials/layout/search.scss @@ -31,7 +31,6 @@ input { padding: 40px 20px 20px; - padding-inline-end: var(--button-size); border-radius: var(--card-border-radius); background-color: var(--card-background); box-shadow: var(--shadow-l1); @@ -79,4 +78,5 @@ height: 20px; } } -} + +} \ No newline at end of file diff --git a/assets/scss/partials/sidebar.scss b/assets/scss/partials/sidebar.scss index 75332a7..95310ca 100644 --- a/assets/scss/partials/sidebar.scss +++ b/assets/scss/partials/sidebar.scss @@ -11,6 +11,7 @@ flex-direction: column; flex-shrink: 0; align-self: stretch; + gap: var(--sidebar-element-separation); max-width: none; width: 100%; position: relative; @@ -64,11 +65,6 @@ } } } - - .social-menu, - .menu { - margin-top: var(--sidebar-element-separation); - } } .right-sidebar { diff --git a/assets/ts/codeblock.ts b/assets/ts/codeblock.ts deleted file mode 100644 index 08c3328..0000000 --- a/assets/ts/codeblock.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copy button for code blocks -*/ -export default () => { - const copyButtons = document.querySelectorAll('.codeblock-copy'); - copyButtons.forEach(button => { - const codeblockID = button.getAttribute('data-id'), - copyText = button.textContent, - copiedText = button.getAttribute('data-copied-text'); - if (!codeblockID) return; - button.addEventListener('click', (e) => { - e.preventDefault(); - const codeblock = document.getElementById(codeblockID) as HTMLElement; - if (!codeblockID) return; - navigator.clipboard.writeText(codeblock.textContent) - .then(() => { - button.textContent = copiedText; - setTimeout(() => { - button.textContent = copyText; - }, 1000); - }) - .catch(err => { - alert(err) - console.log('Something went wrong', err); - }); - }, false); - }); -} \ No newline at end of file diff --git a/assets/ts/color.ts b/assets/ts/color.ts new file mode 100644 index 0000000..50581d1 --- /dev/null +++ b/assets/ts/color.ts @@ -0,0 +1,63 @@ +interface colorScheme { + hash: string, /// Regenerate color scheme when the image hash is changed + DarkMuted: { + hex: string, + rgb: Number[], + bodyTextColor: string + }, + Vibrant: { + hex: string, + rgb: Number[], + bodyTextColor: string + } +} + +let colorsCache: { [key: string]: colorScheme } = {}; + +if (localStorage.hasOwnProperty('StackColorsCache')) { + try { + colorsCache = JSON.parse(localStorage.getItem('StackColorsCache')); + } + catch (e) { + colorsCache = {}; + } +} + +async function getColor(key: string, hash: string, imageURL: string) { + if (!key) { + /** + * If no key is provided, do not cache the result + */ + return await Vibrant.from(imageURL).getPalette(); + } + + if (!colorsCache.hasOwnProperty(key) || colorsCache[key].hash !== hash) { + /** + * If key is provided, but not found in cache, or the hash mismatches => Regenerate color scheme + */ + const palette = await Vibrant.from(imageURL).getPalette(); + + colorsCache[key] = { + hash: hash, + Vibrant: { + hex: palette.Vibrant.hex, + rgb: palette.Vibrant.rgb, + bodyTextColor: palette.Vibrant.bodyTextColor + }, + DarkMuted: { + hex: palette.DarkMuted.hex, + rgb: palette.DarkMuted.rgb, + bodyTextColor: palette.DarkMuted.bodyTextColor + } + } + + /* Save the result in localStorage */ + localStorage.setItem('StackColorsCache', JSON.stringify(colorsCache)); + } + + return colorsCache[key]; +} + +export { + getColor +} \ No newline at end of file diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts index e0124d1..9840f1e 100644 --- a/assets/ts/gallery.ts +++ b/assets/ts/gallery.ts @@ -1,92 +1,186 @@ -const wrap = (figures: HTMLElement[]) => { - const galleryContainer = document.createElement('div'); - galleryContainer.className = 'gallery'; +declare global { + interface Window { + PhotoSwipe: any; + PhotoSwipeUI_Default: any + } +} - const parentNode = figures[0].parentNode, - first = figures[0]; +interface PhotoSwipeItem { + w: number; + h: number; + src: string; + msrc: string; + title?: string; + el: HTMLElement; +} - parentNode.insertBefore(galleryContainer, first) +class StackGallery { + private galleryUID: number; + private items: PhotoSwipeItem[] = []; + + constructor(container: HTMLElement, galleryUID = 1) { + if (window.PhotoSwipe == undefined || window.PhotoSwipeUI_Default == undefined) { + console.error("PhotoSwipe lib not loaded."); + return; + } - for (const figure of figures) { - galleryContainer.appendChild(figure); + this.galleryUID = galleryUID; + + StackGallery.createGallery(container); + this.loadItems(container); + this.bindClick(); } -} -export default (container: HTMLElement) => { - /// The process of wrapping image with figure tag is done using JavaScript instead of only Hugo markdown render hook - /// because it can not detect whether image is being wrapped by a link or not - /// and it lead to a invalid HTML construction (
) - const images = container.querySelectorAll('img.gallery-image') as NodeListOf; - for (const img of Array.from(images)) { - /// Images are wrapped with figure tag if the paragraph has only images without texts - /// This is done to allow inline images within paragraphs - const paragraph = img.closest('p'); - - if (!paragraph || !container.contains(paragraph)) continue; - - if (paragraph.textContent.trim() == '') { - /// Once we insert figcaption, this check no longer works - /// So we add a class to paragraph to mark it - paragraph.classList.add('no-text'); + private loadItems(container: HTMLElement) { + this.items = []; + + const figures = container.querySelectorAll('figure.gallery-image'); + + for (const el of figures) { + const figcaption = el.querySelector('figcaption'), + img = el.querySelector('img'); + + let aux: PhotoSwipeItem = { + w: parseInt(img.getAttribute('width')), + h: parseInt(img.getAttribute('height')), + src: img.src, + msrc: img.getAttribute('data-thumb') || img.src, + el: el + } + + if (figcaption) { + aux.title = figcaption.innerHTML; + } + + this.items.push(aux); } + } + + public static createGallery(container: HTMLElement) { + /// The process of wrapping image with figure tag is done using JavaScript instead of only Hugo markdown render hook + /// because it can not detect whether image is being wrapped by a link or not + /// and it lead to a invalid HTML construction (
) + + const images = container.querySelectorAll('img.gallery-image'); + for (const img of Array.from(images)) { + /// Images are wrapped with figure tag if the paragraph has only images without texts + /// This is done to allow inline images within paragraphs + const paragraph = img.closest('p'); + + if (!paragraph || !container.contains(paragraph)) continue; + + if (paragraph.textContent.trim() == '') { + /// Once we insert figcaption, this check no longer works + /// So we add a class to paragraph to mark it + paragraph.classList.add('no-text'); + } + + let isNewLineImage = paragraph.classList.contains('no-text'); + if (!isNewLineImage) continue; - let isNewLineImage = paragraph.classList.contains('no-text'); - if (!isNewLineImage) continue; + const hasLink = img.parentElement.tagName == 'A'; - const hasLink = img.parentElement.tagName == 'A'; + let el: HTMLElement = img; + /// Wrap image with figure tag, with flex-grow and flex-basis values extracted from img's data attributes + const figure = document.createElement('figure'); + figure.style.setProperty('flex-grow', img.getAttribute('data-flex-grow') || '1'); + figure.style.setProperty('flex-basis', img.getAttribute('data-flex-basis') || '0'); + if (hasLink) { + /// Wrap if it exists + el = img.parentElement; + } + el.parentElement.insertBefore(figure, el); + figure.appendChild(el); - let el: HTMLElement = img; - /// Wrap image with figure tag, with flex-grow and flex-basis values extracted from img's data attributes - const figure = document.createElement('figure'); - figure.style.setProperty('flex-grow', img.getAttribute('data-flex-grow') || '1'); - figure.style.setProperty('flex-basis', img.getAttribute('data-flex-basis') || '0'); - if (hasLink) { - /// Wrap if it exists - el = img.parentElement; + /// Add figcaption if it exists + if (img.hasAttribute('alt')) { + const figcaption = document.createElement('figcaption'); + figcaption.innerText = img.getAttribute('alt'); + figure.appendChild(figcaption); + } + + /// Wrap img tag with tag if image was not wrapped by tag + if (!hasLink) { + figure.className = 'gallery-image'; + + const a = document.createElement('a'); + a.href = img.src; + a.setAttribute('target', '_blank'); + img.parentNode.insertBefore(a, img); + a.appendChild(img); + } } - el.parentElement.insertBefore(figure, el); - figure.appendChild(el); - - /// Add figcaption if it exists - if (img.hasAttribute('alt')) { - const figcaption = document.createElement('figcaption'); - figcaption.innerText = img.getAttribute('alt'); - figure.appendChild(figcaption); + + const figuresEl = container.querySelectorAll('figure.gallery-image'); + + let currentGallery = []; + + for (const figure of figuresEl) { + if (!currentGallery.length) { + /// First iteration + currentGallery = [figure]; + } + else if (figure.previousElementSibling === currentGallery[currentGallery.length - 1]) { + /// Adjacent figures + currentGallery.push(figure); + } + else if (currentGallery.length) { + /// End gallery + StackGallery.wrap(currentGallery); + currentGallery = [figure]; + } } - /// Wrap img tag with tag if image was not wrapped by tag - if (!hasLink) { - figure.className = 'gallery-image'; - - const a = document.createElement('a'); - a.href = img.src; - a.setAttribute('target', '_blank'); - a.setAttribute('data-pswp-width', img.width.toString()); - a.setAttribute('data-pswp-height', img.height.toString()); - img.parentNode.insertBefore(a, img); - a.appendChild(img); + if (currentGallery.length > 0) { + StackGallery.wrap(currentGallery); } } - const figuresEl = container.querySelectorAll('figure.gallery-image') as NodeListOf; - let currentGallery = []; - for (const figure of Array.from(figuresEl)) { - if (!currentGallery.length) { - /// First iteration - currentGallery = [figure]; - } - else if (figure.previousElementSibling === currentGallery[currentGallery.length - 1]) { - /// Adjacent figures - currentGallery.push(figure); - } - else if (currentGallery.length) { - /// End gallery - wrap(currentGallery); - currentGallery = [figure]; + /** + * Wrap adjacent figure tags with div.gallery + * @param figures + */ + public static wrap(figures: HTMLElement[]) { + const galleryContainer = document.createElement('div'); + galleryContainer.className = 'gallery'; + + const parentNode = figures[0].parentNode, + first = figures[0]; + + parentNode.insertBefore(galleryContainer, first) + + for (const figure of figures) { + galleryContainer.appendChild(figure); } } - if (currentGallery.length > 0) { - wrap(currentGallery); + public open(index: number) { + const pswp = document.querySelector('.pswp') as HTMLDivElement; + const ps = new window.PhotoSwipe(pswp, window.PhotoSwipeUI_Default, this.items, { + index: index, + galleryUID: this.galleryUID, + getThumbBoundsFn: (index) => { + const thumbnail = this.items[index].el.getElementsByTagName('img')[0], + pageYScroll = window.pageYOffset || document.documentElement.scrollTop, + rect = thumbnail.getBoundingClientRect(); + + return { x: rect.left, y: rect.top + pageYScroll, w: rect.width }; + } + }); + + ps.init(); } -}; \ No newline at end of file + + private bindClick() { + for (const [index, item] of this.items.entries()) { + const a = item.el.querySelector('a'); + + a.addEventListener('click', (e) => { + e.preventDefault(); + this.open(index); + }) + } + } +} + +export default StackGallery; \ No newline at end of file diff --git a/assets/ts/main.ts b/assets/ts/main.ts index 0668c7c..f3160ae 100644 --- a/assets/ts/main.ts +++ b/assets/ts/main.ts @@ -5,7 +5,8 @@ * @website: https://jimmycai.com * @link: https://github.com/CaiJimmy/hugo-theme-stack */ -import StackCodeBlock from "ts/codeblock"; +import StackGallery from "ts/gallery"; +import { getColor } from 'ts/color'; import menu from 'ts/menu'; import createElement from 'ts/createElement'; import StackColorScheme from 'ts/colorScheme'; @@ -21,12 +22,76 @@ let Stack = { const articleContent = document.querySelector('.article-content') as HTMLElement; if (articleContent) { + new StackGallery(articleContent); setupSmoothAnchors(); setupScrollspy(); } + /** + * Add linear gradient background to tile style article + */ + const articleTile = document.querySelector('.article-list--tile'); + if (articleTile) { + let observer = new IntersectionObserver(async (entries, observer) => { + entries.forEach(entry => { + if (!entry.isIntersecting) return; + observer.unobserve(entry.target); + + const articles = entry.target.querySelectorAll('article.has-image'); + articles.forEach(async articles => { + const image = articles.querySelector('img'), + imageURL = image.src, + key = image.getAttribute('data-key'), + hash = image.getAttribute('data-hash'), + articleDetails: HTMLDivElement = articles.querySelector('.article-details'); + + const colors = await getColor(key, hash, imageURL); + + articleDetails.style.background = ` + linear-gradient(0deg, + rgba(${colors.DarkMuted.rgb[0]}, ${colors.DarkMuted.rgb[1]}, ${colors.DarkMuted.rgb[2]}, 0.5) 0%, + rgba(${colors.Vibrant.rgb[0]}, ${colors.Vibrant.rgb[1]}, ${colors.Vibrant.rgb[2]}, 0.75) 100%)`; + }) + }) + }); + + observer.observe(articleTile) + } + + + /** + * Add copy button to code block + */ + const highlights = document.querySelectorAll('.article-content div.highlight'); + const copyText = `Copy`, + copiedText = `Copied!`; + + highlights.forEach(highlight => { + const copyButton = document.createElement('button'); + copyButton.innerHTML = copyText; + copyButton.classList.add('copyCodeButton'); + highlight.appendChild(copyButton); + + const codeBlock = highlight.querySelector('code[data-lang]'); + if (!codeBlock) return; + + copyButton.addEventListener('click', () => { + navigator.clipboard.writeText(codeBlock.textContent) + .then(() => { + copyButton.textContent = copiedText; + + setTimeout(() => { + copyButton.textContent = copyText; + }, 1000); + }) + .catch(err => { + alert(err) + console.log('Something went wrong', err); + }); + }); + }); + new StackColorScheme(document.getElementById('dark-mode-toggle')); - StackCodeBlock(); } } diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..fcb4bcb --- /dev/null +++ b/config.yaml @@ -0,0 +1,143 @@ +module: + hugoVersion: + extended: true + min: "0.87.0" + +params: + mainSections: + - post + featuredImageField: image + rssFullContent: true + favicon: + + footer: + since: + customText: + + dateFormat: + published: Jan 02, 2006 + lastUpdated: Jan 02, 2006 15:04 MST + + sidebar: + compact: false + emoji: + subtitle: + avatar: + enabled: true + local: true + src: img/avatar.png + + article: + math: false + toc: true + readingTime: true + license: + enabled: false + default: Licensed under CC BY-NC-SA 4.0 + + comments: + enabled: false + provider: disqus + + disqusjs: + shortname: + apiUrl: + apiKey: + admin: + adminLabel: + + utterances: + repo: + issueTerm: pathname + label: + + remark42: + host: + site: + locale: + + vssue: + platform: + owner: + repo: + clientId: + clientSecret: + autoCreateIssue: false + + # Waline client configuration see: https://waline.js.org/en/reference/client.html + waline: + serverURL: + lang: + visitor: + avatar: + emoji: + - https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo + requiredMeta: + - name + - email + - url + placeholder: + locale: + admin: Admin + + twikoo: + envId: + region: + path: + lang: + + giscus: + repo: + repoID: + category: + categoryID: + mapping: + strict: + lightTheme: + darkTheme: + reactionsEnabled: 1 + emitMetadata: 0 + inputPosition: + lang: + + gitalk: + owner: + admin: + repo: + clientID: + clientSecret: + + cusdis: + host: + id: + + widgets: + homepage: [] + page: [] + + opengraph: + twitter: + # Your Twitter username + site: + + # Available values: summary, summary_large_image + card: summary_large_image + + defaultImage: + opengraph: + enabled: false + local: false + src: + + colorScheme: + # Display toggle + toggle: true + + # Available values: auto, light, dark + default: auto + + imageProcessing: + cover: + enabled: true + content: + enabled: true diff --git a/config/_default/module.toml b/config/_default/module.toml deleted file mode 100644 index cc14cd5..0000000 --- a/config/_default/module.toml +++ /dev/null @@ -1,3 +0,0 @@ -[hugoVersion] -extended = true -min = "0.100.0" \ No newline at end of file diff --git a/config/_default/params.toml b/config/_default/params.toml deleted file mode 100644 index a6bd7ce..0000000 --- a/config/_default/params.toml +++ /dev/null @@ -1,52 +0,0 @@ -# Theme's default configuration -mainSections = ["post"] -featuredImageField = "image" -rssFullContent = true - -[footer] - -[dateFormat] -published = "Jan 02, 2006" -lastUpdated = "Jan 02, 2006 15:04 MST" - -[sidebar] -compact = false - -[sidebar.avatar] -enabled = true -local = true -src = "img/avatar.png" - -[article] -math = false -toc = true -readingTime = true - -[article.license] -enabled = false -default = "Licensed under CC BY-NC-SA 4.0" - -[comments] -enabled = false -provider = "disqus" - -[widgets] -homepage = [] -page = [] - -[opengraph.twitter] -card = "summary_large_image" - -[defaultImage.opengraph] -enabled = false -local = false - -[colorScheme] -toggle = true -default = "auto" - -[imageProcessing.cover] -enabled = true - -[imageProcessing.content] -enabled = true diff --git a/data/external.yaml b/data/external.yaml index 269ef4c..777620d 100644 --- a/data/external.yaml +++ b/data/external.yaml @@ -1,3 +1,25 @@ +Vibrant: + - src: https://cdn.jsdelivr.net/npm/node-vibrant@3.1.6/dist/vibrant.min.js + integrity: sha256-awcR2jno4kI5X0zL8ex0vi2z+KMkF24hUW8WePSA9HM= + type: script + +PhotoSwipe: + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js + integrity: sha256-ePwmChbbvXbsO02lbM3HoHbSHTHFAeChekF1xKJdleo= + type: script + defer: true + + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js + integrity: sha256-UKkzOn/w1mBxRmLLGrSeyB4e1xbrp4xylgAWb3M42pU= + type: script + defer: true + + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css + type: style + + - src: https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css + type: style + KaTeX: - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s= diff --git a/exampleSite/README.md b/exampleSite/README.md new file mode 100644 index 0000000..1b6d403 --- /dev/null +++ b/exampleSite/README.md @@ -0,0 +1 @@ +Example site modified from https://github.com/gohugoio/hugoBasicExample \ No newline at end of file diff --git a/exampleSite/assets/img/favicon.png b/exampleSite/assets/img/favicon.png deleted file mode 100644 index 74e8efa..0000000 Binary files a/exampleSite/assets/img/favicon.png and /dev/null differ diff --git a/exampleSite/assets/img/logo.jpg b/exampleSite/assets/img/logo.jpg deleted file mode 100644 index 145804e..0000000 Binary files a/exampleSite/assets/img/logo.jpg and /dev/null differ diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml new file mode 100644 index 0000000..c1b48dd --- /dev/null +++ b/exampleSite/config.yaml @@ -0,0 +1,239 @@ +baseurl: https://example.com +languageCode: en-us +theme: hugo-theme-stack +paginate: 5 +title: Example Site + +languages: + en: + languageName: English + title: Example Site + description: Example description + weight: 1 + zh-cn: + languageName: 中文 + title: 演示站点 + description: 演示说明 + weight: 2 + ar: + languageName: عربي + languagedirection: rtl + title: موقع تجريبي + description: وصف تجريبي + weight: 3 + +# Change it to your Disqus shortname before using +disqusShortname: hugo-theme-stack + +# GA Tracking ID +googleAnalytics: + +# Theme i18n support +# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw +DefaultContentLanguage: en + +# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] +# This will make .Summary and .WordCount behave correctly for CJK languages. +hasCJKLanguage: false + +permalinks: + post: /p/:slug/ + page: /:slug/ + +params: + mainSections: + - post + featuredImageField: image + rssFullContent: true + favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary) + + footer: + since: 2020 + customText: + + dateFormat: + published: Jan 02, 2006 + lastUpdated: Jan 02, 2006 15:04 MST + + sidebar: + emoji: 🍥 + subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. + avatar: + enabled: true + local: true + src: img/avatar.png + + article: + math: false + toc: true + readingTime: true + license: + enabled: true + default: Licensed under CC BY-NC-SA 4.0 + + comments: + enabled: true + provider: disqus + + disqusjs: + shortname: + apiUrl: + apiKey: + admin: + adminLabel: + + utterances: + repo: + issueTerm: pathname + label: + + remark42: + host: + site: + locale: + + vssue: + platform: + owner: + repo: + clientId: + clientSecret: + autoCreateIssue: false + + # Waline client configuration see: https://waline.js.org/en/reference/component.html + waline: + serverURL: + lang: + pageview: + emoji: + - https://unpkg.com/@waline/emojis@1.0.1/weibo + requiredMeta: + - name + - email + - url + locale: + admin: Admin + placeholder: + + twikoo: + envId: + region: + path: + lang: + + # See https://cactus.chat/docs/reference/web-client/#configuration for description of the various options + cactus: + defaultHomeserverUrl: "https://matrix.cactus.chat:8448" + serverName: "cactus.chat" + siteName: "" # You must insert a unique identifier here matching the one you registered (See https://cactus.chat/docs/getting-started/quick-start/#register-your-site) + + giscus: + repo: + repoID: + category: + categoryID: + mapping: + lightTheme: + darkTheme: + reactionsEnabled: 1 + emitMetadata: 0 + + gitalk: + owner: + admin: + repo: + clientID: + clientSecret: + + cusdis: + host: + id: + widgets: + homepage: + - type: search + - type: archives + params: + limit: 5 + - type: categories + params: + limit: 10 + - type: tag-cloud + params: + limit: 10 + page: + - type: toc + + opengraph: + twitter: + # Your Twitter username + site: + + # Available values: summary, summary_large_image + card: summary_large_image + + defaultImage: + opengraph: + enabled: false + local: false + src: + + colorScheme: + # Display toggle + toggle: true + + # Available values: auto, light, dark + default: auto + + imageProcessing: + cover: + enabled: true + content: + enabled: true + +### Custom menu +### See https://docs.stack.jimmycai.com/configuration/custom-menu.html +### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter +menu: + main: [] + + social: + - identifier: github + name: GitHub + url: https://github.com/CaiJimmy/hugo-theme-stack + params: + icon: brand-github + + - identifier: twitter + name: Twitter + url: https://twitter.com + params: + icon: brand-twitter + +related: + includeNewer: true + threshold: 60 + toLower: false + indices: + - name: tags + weight: 100 + + - name: categories + weight: 200 + +markup: + goldmark: + renderer: + ## Set to true if you have HTML content inside Markdown + unsafe: false + tableOfContents: + endLevel: 4 + ordered: true + startLevel: 2 + highlight: + noClasses: false + codeFences: true + guessSyntax: true + lineNoStart: 1 + lineNos: true + lineNumbersInTable: true + tabWidth: 4 diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml deleted file mode 100644 index 548975a..0000000 --- a/exampleSite/config/_default/config.toml +++ /dev/null @@ -1,20 +0,0 @@ -# Change baseurl before deploy -baseurl = "https://demo.stack.jimmycai.com" -languageCode = "en-us" -paginate = 5 -title = "Hugo Theme Stack Starter" -theme = "hugo-theme-stack" - -# Theme i18n support -# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw -DefaultContentLanguage = "en" - -# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] -# This will make .Summary and .WordCount behave correctly for CJK languages. -hasCJKLanguage = false - -# Change it to your Disqus shortname before using -disqusShortname = "hugo-theme-stack" - -# GA Tracking ID -googleAnalytics = "" diff --git a/exampleSite/config/_default/languages.toml b/exampleSite/config/_default/languages.toml deleted file mode 100644 index ad80c20..0000000 --- a/exampleSite/config/_default/languages.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Enable multilanguage site support -[en] -languageName = "English" -title = "Hugo Theme Stack Example Site" -weight = 1 - -[zh-cn] -languageName = "中文" -title = "Hugo 主题 Stack 演示站点" -weight = 2 - -[ar] -languageName = "عربي" -languagedirection = "rtl" -title = "موقع تجريبي" -weight = 3 diff --git a/exampleSite/config/_default/markup.toml b/exampleSite/config/_default/markup.toml deleted file mode 100644 index 591ce9e..0000000 --- a/exampleSite/config/_default/markup.toml +++ /dev/null @@ -1,18 +0,0 @@ -# Markdown renderer configuration -[goldmark.renderer] -# Set it to true if you have HTML content inside Markdown -unsafe = false - -[tableOfContents] -endLevel = 4 -ordered = true -startLevel = 2 - -[highlight] -noClasses = false -codeFences = true -guessSyntax = true -lineNoStart = 1 -lineNos = true -lineNumbersInTable = true -tabWidth = 4 diff --git a/exampleSite/config/_default/menu.toml b/exampleSite/config/_default/menu.toml deleted file mode 100644 index e01b4f7..0000000 --- a/exampleSite/config/_default/menu.toml +++ /dev/null @@ -1,20 +0,0 @@ -### Custom menu -### See https://docs.stack.jimmycai.com/configuration/custom-menu.html -### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter -main = [] - -[[social]] -identifier = "github" -name = "GitHub" -url = "https://github.com/CaiJimmy/hugo-theme-stack" - -[social.params] -icon = "brand-github" - -[[social]] -identifier = "twitter" -name = "Twitter" -url = "https://twitter.com" - -[social.params] -icon = "brand-twitter" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml deleted file mode 100644 index a87c986..0000000 --- a/exampleSite/config/_default/params.toml +++ /dev/null @@ -1,106 +0,0 @@ -mainSections = ["post"] -featuredImageField = "image" -rssFullContent = true -favicon = "img/favicon.png" - -[footer] -since = 2020 - -[dateFormat] -published = "Jan 02, 2006" -lastUpdated = "Jan 02, 2006 15:04 MST" - -[sidebar] -emoji = "🍥" -subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." - -[sidebar.avatar] -enabled = true -local = true -src = "img/logo.jpg" - -[article] -math = false -toc = true -readingTime = true - -[article.license] -enabled = true -default = "Licensed under CC BY-NC-SA 4.0" - -[comments] -enabled = true -provider = "disqus" - -[comments.disqusjs] - -[comments.utterances] -issueTerm = "pathname" - -[comments.remark42] - -[comments.vssue] -autoCreateIssue = false - -[comments.waline] -emoji = ["https://unpkg.com/@waline/emojis@1.0.1/weibo"] -requiredMeta = ["name", "email", "url"] - -[comments.waline.locale] -admin = "Admin" - -[comments.twikoo] - -[comments.cactus] -defaultHomeserverUrl = "https://matrix.cactus.chat:8448" -serverName = "cactus.chat" -siteName = "" - -[comments.giscus] -reactionsEnabled = 1 -emitMetadata = 0 - -[comments.gitalk] - -[comments.cusdis] - -[[widgets.homepage]] -type = "search" - -[[widgets.homepage]] -type = "archives" - -[widgets.homepage.params] -limit = 5 - -[[widgets.homepage]] -type = "categories" - -[widgets.homepage.params] -limit = 10 - -[[widgets.homepage]] -type = "tag-cloud" - -[widgets.homepage.params] -limit = 10 - -[[widgets.page]] -type = "toc" - -[opengraph.twitter] -card = "summary_large_image" - -[defaultImage.opengraph] -enabled = false -local = false - -[colorScheme] -toggle = true -default = "auto" - -[imageProcessing.cover] -enabled = true - -[imageProcessing.content] -enabled = true \ No newline at end of file diff --git a/exampleSite/config/_default/permalinks.toml b/exampleSite/config/_default/permalinks.toml deleted file mode 100644 index 2499a7e..0000000 --- a/exampleSite/config/_default/permalinks.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Permalinks format of each content section -post = "/p/:slug/" -page = "/:slug/" \ No newline at end of file diff --git a/exampleSite/config/_default/related.toml b/exampleSite/config/_default/related.toml deleted file mode 100644 index be52654..0000000 --- a/exampleSite/config/_default/related.toml +++ /dev/null @@ -1,12 +0,0 @@ -# Related contents configuration -includeNewer = true -threshold = 60 -toLower = false - -[[indices]] -name = "tags" -weight = 100 - -[[indices]] -name = "categories" -weight = 200 \ No newline at end of file diff --git a/exampleSite/content/post/emoji-support/index.md b/exampleSite/content/post/emoji-support/index.md new file mode 100644 index 0000000..bc3e348 --- /dev/null +++ b/exampleSite/content/post/emoji-support/index.md @@ -0,0 +1,50 @@ ++++ +author = "Hugo Authors" +title = "Emoji Support" +date = "2019-03-05" +description = "Guide to emoji usage in Hugo" +categories = [ + "Test" +] +tags = [ + "emoji", +] +image = "the-creative-exchange-d2zvqp3fpro-unsplash.jpg" ++++ + +Emoji can be enabled in a Hugo project in a number of ways. + +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). + +To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. + +

🙈 :see_no_evil: 🙉 :hear_no_evil: 🙊 :speak_no_evil:

+
+ +The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes. + +*** + +**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g. + +{{< highlight html >}} +.emoji { + font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols; +} +{{< /highlight >}} + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg b/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg new file mode 100644 index 0000000..e34a59d Binary files /dev/null and b/exampleSite/content/post/emoji-support/the-creative-exchange-d2zvqp3fpro-unsplash.jpg differ diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md index 752a655..0254cca 100644 --- a/exampleSite/content/post/markdown-syntax/index.md +++ b/exampleSite/content/post/markdown-syntax/index.md @@ -42,12 +42,12 @@ Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sap The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. -### Blockquote without attribution +#### Blockquote without attribution > Tiam, ad mint andaepu dandae nostion secatur sequo quae. > **Note** that you can use *Markdown syntax* within a blockquote. -### Blockquote with attribution +#### Blockquote with attribution > Don't communicate by sharing memory, share memory by communicating.
> — Rob Pike[^1] @@ -63,7 +63,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou Bob | 27 Alice | 23 -### Inline Markdown within tables +#### Inline Markdown within tables | Italics | Bold | Code | | -------- | -------- | ------ | @@ -74,7 +74,8 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou | Lorem ipsum dolor sit amet, consectetur adipiscing elit. | Phasellus ultricies, sapien non euismod aliquam, dui ligula tincidunt odio, at accumsan nulla sapien eget ex. | Proin eleifend dictum ipsum, non euismod ipsum pulvinar et. Vivamus sollicitudin, quam in pulvinar aliquam, metus elit pretium purus | Proin sit amet velit nec enim imperdiet vehicula. | Ut bibendum vestibulum quam, eu egestas turpis gravida nec | Sed scelerisque nec turpis vel viverra. Vivamus vitae pretium sapien | ## Code Blocks -### Code block with backticks + +#### Code block with backticks ```html @@ -89,7 +90,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou ``` -### Code block indented with four spaces +#### Code block indented with four spaces @@ -102,7 +103,21 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou -### Diff code block +#### Code block with Hugo's internal highlight shortcode +{{< highlight html >}} + + + + + Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + +#### Diff code block ```diff [dependencies.bevy] @@ -112,27 +127,21 @@ rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13" + features = ["jpeg", "dynamic"] ``` -### One line code block - -```html -

A paragraph

-``` - ## List Types -### Ordered List +#### Ordered List 1. First item 2. Second item 3. Third item -### Unordered List +#### Unordered List * List item * Another item * And another item -### Nested list +#### Nested list * Fruit * Apple diff --git a/go.mod b/go.mod index e75e573..63df635 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/CaiJimmy/hugo-theme-stack/v4 +module github.com/CaiJimmy/hugo-theme-stack/v3 go 1.17 diff --git a/i18n/ar.yaml b/i18n/ar.yaml index 61e0262..63101aa 100644 --- a/i18n/ar.yaml +++ b/i18n/ar.yaml @@ -1,45 +1,74 @@ -toggleMenu: اخفي القائمة +toggleMenu: + other: اخفي القائمة -darkMode: الوضع الداكن +darkMode: + other: الوضع الداكن list: page: one: "{{ .Count }} صفحه" other: "{{ .Count }} صفحات" - section: قسم + + section: + other: قسم + subsection: one: قسم فرعي other: اقسام فرعية article: - back: خلف - tableOfContents: جدول المحتويات - relatedContent: محتوى مشابهه - lastUpdatedOn: التعديل الاخير + back: + other: خلف + + tableOfContents: + other: جدول المحتويات + + relatedContent: + other: محتوى مشابهه + + lastUpdatedOn: + other: التعديل الاخير + readingTime: one: "تُقرأ خلال دقيقة" other: "تُقرأ خلال {{ .Count }} دقائق" notFound: - title: غير موجود - subtitle: تعذر العثور على الصفحة المطلوبة. + title: + other: غير موجود + + subtitle: + other: تعذر العثور على الصفحة المطلوبة. widget: archives: - title: الارشيفات - more: اكثر + title: + other: الارشيفات - tagCloud: - title: وسوم + more: + other: اكثر + tagCloud: + title: + other: وسوم + categoriesCloud: - title: التصنيفات + title: + other: التصنيفات search: - title: بحث - placeholder: اكتب... - resultTitle: "#PAGES_COUNT نتيجة (#TIME_SECONDS ثواني)" + title: + other: بحث + + placeholder: + other: اكتب... + + resultTitle: + other: "#PAGES_COUNT نتيجة (#TIME_SECONDS ثواني)" footer: - builtWith: "مبني بستخدام {{ .Generator }}" - designedBy: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}" + builtWith: + other: "مبني بستخدام {{ .Generator }}" + + designedBy: + other: "قالب {{ .Theme }} مصمم من {{ .DesignedBy }}" diff --git a/i18n/bn.yaml b/i18n/bn.yaml index 0e3e511..36f25a3 100644 --- a/i18n/bn.yaml +++ b/i18n/bn.yaml @@ -1,52 +1,73 @@ -toggleMenu: টগল মেনু +toggleMenu: + other: টগল মেনু -darkMode: ডার্ক মোড +darkMode: + other: ডার্ক মোড list: page: one: "{{ .Count }} পাতা" other: "{{ .Count }} পাতা" - section: অনুচ্ছেদ + section: + other: অনুচ্ছেদ subsection: one: উপ-অনুচ্ছেদ other: উপ-অনুচ্ছেদ article: - back: পেছনে + back: + other: পেছনে - tableOfContents: সূচিপত্র + tableOfContents: + other: সূচিপত্র - relatedContent: সম্পর্কিত বিষয়বস্তু + relatedContent: + other: সম্পর্কিত বিষয়বস্তু - lastUpdatedOn: সর্বশেষ আপডেট করা হয়েছে + lastUpdatedOn: + other: সর্বশেষ আপডেট করা হয়েছে readingTime: one: "{{ .Count }} মিনিটে পড়া যাবে" other: "{{ .Count }} মিনিটে পড়া যাবে" notFound: - title: পাওয়া যায়নি + title: + other: পাওয়া যায়নি - subtitle: এই পাতাটি বিদ্যমান নেই + subtitle: + other: এই পাতাটি বিদ্যমান নেই widget: archives: - title: আর্কাইভ - more: আরও + title: + other: আর্কাইভ + + more: + other: আরও + tagCloud: - title: ট্যাগ + title: + other: ট্যাগ categoriesCloud: - title: বিভাগ + title: + other: বিভাগ search: - title: অনুসন্ধান + title: + other: অনুসন্ধান - placeholder: কিছু টাইপ করুন... + placeholder: + other: কিছু টাইপ করুন... - resultTitle: "#PAGES_COUNT পাতা (#TIME_SECONDS সেকেন্ড)" + resultTitle: + other: "#PAGES_COUNT পাতা (#TIME_SECONDS সেকেন্ড)" footer: - builtWith: "{{ .Generator }} দিয়ে নির্মিত" - designedBy: "থিম {{ .Theme }} ডিজাইন করেছেন {{ .DesignedBy }}" + builtWith: + other: "{{ .Generator }} দিয়ে নির্মিত" + + designedBy: + other: "থিম {{ .Theme }} ডিজাইন করেছেন {{ .DesignedBy }}" diff --git a/i18n/ca.yaml b/i18n/ca.yaml index da2428b..af4167e 100644 --- a/i18n/ca.yaml +++ b/i18n/ca.yaml @@ -1,43 +1,73 @@ -toggleMenu: Toggle Menu +toggleMenu: + other: Toggle Menu -darkMode: Mode fosc +darkMode: + other: Mode fosc list: page: one: "{{ .Count }} pàgina" other: "{{ .Count }} pàgines" - section: Secció + + section: + other: Secció + subsection: one: Subsecció other: Subseccions article: - back: Tornar - tableOfContents: Taula de contingut - relatedContent: Continguts relacionats - lastUpdatedOn: Última vegada actualitzat + back: + other: Tornar + + tableOfContents: + other: Taula de contingut + + relatedContent: + other: Continguts relacionats + + lastUpdatedOn: + other: Última vegada actualitzat + readingTime: one: "{{ .Count }} minut a llegir" other: "{{ .Count }} minuts a llegir" notFound: - title: No Trobat - subtitle: Aquesta pàgina no existeix + title: + other: No Trobat + + subtitle: + other: Aquesta pàgina no existeix widget: archives: - title: Arxiu - more: Més + title: + other: Arxiu + + more: + other: Més + tagCloud: - title: Etiquetes + title: + other: Etiquetes categoriesCloud: - title: Categories + title: + other: Categories search: - title: Cerca - placeholder: Tecleja alguna cosa... - resultTitle: "#PAGES_COUNT pàgines en (#TIME_SECONDS segons)" + title: + other: Cerca + + placeholder: + other: Tecleja alguna cosa... + + resultTitle: + other: "#PAGES_COUNT pàgines en (#TIME_SECONDS segons)" footer: - builtWith: Creat amb {{ .Generator }} - designedBy: Tema {{ .Theme }} dissenyat per {{ .DesignedBy }} + builtWith: + other: Creat amb {{ .Generator }} + + designedBy: + other: Tema {{ .Theme }} dissenyat per {{ .DesignedBy }} diff --git a/i18n/de.yaml b/i18n/de.yaml index ff0e351..7ab5b56 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -1,43 +1,74 @@ -toggleMenu: Menü umschalten +toggleMenu: + other: Menü umschalten -darkMode: Dunkler Modus +darkMode: + other: Dunkler Modus list: page: one: "{{ .Count }} Seite" other: "{{ .Count }} Seiten" - section: Abschnitt + + section: + other: Abschnitt + subsection: one: Unterabschnitt other: Unterabschnitte article: - back: Zurück - tableOfContents: Inhaltsverzeichnis - relatedContent: Verwandte Inhalte - lastUpdatedOn: Zuletzt aktualisiert am + back: + other: Zurück + + tableOfContents: + other: Inhaltsverzeichnis + + relatedContent: + other: Verwandte Inhalte + + lastUpdatedOn: + other: Zuletzt aktualisiert am + readingTime: one: "{{ .Count }} Minute Lesezeit" other: "{{ .Count }} Minuten Lesezeit" notFound: - title: Seite nicht gefunden - subtitle: Diese Seite existiert nicht + title: + other: Seite nicht gefunden + + subtitle: + other: Diese Seite existiert nicht widget: archives: - title: Archiv - more: Weitere + title: + other: Archiv + + more: + other: Weitere + tagCloud: - title: Schlagwörter + title: + other: Schlagwörter + categoriesCloud: - title: Kategorien + title: + other: Kategorien search: - title: Suche - placeholder: Etwas tippen... - resultTitle: "#PAGES_COUNT Seiten (#TIME_SECONDS Sekunden)" + title: + other: Suche + + placeholder: + other: Etwas tippen... + + resultTitle: + other: "#PAGES_COUNT Seiten (#TIME_SECONDS Sekunden)" footer: - builtWith: Erstellt mit {{ .Generator }} - designedBy: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }} + builtWith: + other: Erstellt mit {{ .Generator }} + + designedBy: + other: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }} diff --git a/i18n/el.yaml b/i18n/el.yaml index 486914a..27a147d 100644 --- a/i18n/el.yaml +++ b/i18n/el.yaml @@ -1,41 +1,70 @@ -toggleMenu: Εναλλαγή Μενού +toggleMenu: + other: Εναλλαγή Μενού -darkMode: Σκοτεινό θέμα +darkMode: + other: Σκοτεινό θέμα list: page: one: "{{ .Count }} σελιδα" other: "{{ .Count }} σελιδες" - section: Ενότητα + + section: + other: Ενότητα + subsection: one: Υποενότητα other: Υποενότητες article: - back: Πισω - tableOfContents: Πινακας περιεχομενων - relatedContent: Σχετικο περιεχομενο - lastUpdatedOn: Τελευταια τροποποιηση στις + back: + other: Πισω + + tableOfContents: + other: Πινακας περιεχομενων + + relatedContent: + other: Σχετικο περιεχομενο + + lastUpdatedOn: + other: Τελευταια τροποποιηση στις + readingTime: one: "{{ .Count }} λεπτό ανάγνωσης" + ### Seems that there's no need to add 's' even if it's plural in English other: "{{ .Count }} λεπτά ανάγνωσης" notFound: - title: Δε βρέθηκε - subtitle: Η σελίδα δε βρέθηκε. + title: + other: Δε βρέθηκε + subtitle: + other: Η σελίδα δε βρέθηκε. widget: archives: - title: Αρχειο - more: Περισσότερα + title: + other: Αρχειο + + more: + other: Περισσότερα + tagCloud: - title: Tags + title: + other: Tags search: - title: Αναζήτηση - placeholder: Πληκτρολογήστε κάτι... - resultTitle: "#PAGES_COUNT σελιδες (#TIME_SECONDS δευτερολεπτα)" + title: + other: Αναζήτηση + + placeholder: + other: Πληκτρολογήστε κάτι... + + resultTitle: + other: "#PAGES_COUNT σελιδες (#TIME_SECONDS δευτερολεπτα)" footer: - builtWith: Δημιουργήθηκε με τη χρήση {{ .Generator }} - designedBy: Το θέμα {{ .Theme }} σχεδιάστηκε από το {{ .DesignedBy }} + builtWith: + other: Δημιουργήθηκε με τη χρήση {{ .Generator }} + + designedBy: + other: Το θέμα {{ .Theme }} σχεδιάστηκε από το {{ .DesignedBy }} diff --git a/i18n/en.yaml b/i18n/en.yaml index 3f94ab1..fb07328 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,46 +1,73 @@ -toggleMenu: Toggle Menu +toggleMenu: + other: Toggle Menu -darkMode: Dark Mode +darkMode: + other: Dark Mode list: page: one: "{{ .Count }} page" other: "{{ .Count }} pages" - section: Section + + section: + other: Section + subsection: one: Subsection other: Subsections article: - back: Back - tableOfContents: Table of contents - relatedContent: Related content - lastUpdatedOn: Last updated on + back: + other: Back + + tableOfContents: + other: Table of contents + + relatedContent: + other: Related content + + lastUpdatedOn: + other: Last updated on + readingTime: one: "{{ .Count }} minute read" other: "{{ .Count }} minute read" - codeblock: - copy: Copy - copied: Copied! notFound: - title: Not Found - subtitle: This page does not exist + title: + other: Not Found + + subtitle: + other: This page does not exist widget: archives: - title: Archives - more: More + title: + other: Archives + + more: + other: More + tagCloud: - title: Tags + title: + other: Tags categoriesCloud: - title: Categories + title: + other: Categories search: - title: Search - placeholder: Type something... - resultTitle: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" + title: + other: Search + + placeholder: + other: Type something... + + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" footer: - builtWith: Built with {{ .Generator }} - designedBy: Theme {{ .Theme }} designed by {{ .DesignedBy }} + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: Theme {{ .Theme }} designed by {{ .DesignedBy }} diff --git a/i18n/es.yaml b/i18n/es.yaml index 5614e98..76995da 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -1,43 +1,73 @@ -toggleMenu: Toggle Menu +toggleMenu: + other: Toggle Menu -darkMode: Modo oscuro +darkMode: + other: Modo oscuro list: page: one: "{{ .Count }} página" other: "{{ .Count }} páginas" - section: Sección + + section: + other: Sección + subsection: one: Subsección other: Subsecciones article: - back: Volver - tableOfContents: Tabla de contenido - relatedContent: Contenidos relacionados - lastUpdatedOn: Última vez actualizado + back: + other: Volver + + tableOfContents: + other: Tabla de contenido + + relatedContent: + other: Contenidos relacionados + + lastUpdatedOn: + other: Última vez actualizado + readingTime: one: "{{ .Count }} minuto a leer" other: "{{ .Count }} minutos a leer" notFound: - title: No Encontrado - subtitle: Esta página no existe + title: + other: No Encontrado + + subtitle: + other: Esta página no existe widget: archives: - title: Archivo - more: Más + title: + other: Archivo + + more: + other: Más + tagCloud: - title: Etiquetas + title: + other: Etiquetas categoriesCloud: - title: Categorías + title: + other: Categorías search: - title: Búsqueda - placeholder: Teclea algo... - resultTitle: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)" + title: + other: Búsqueda + + placeholder: + other: Teclea algo... + + resultTitle: + other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)" footer: - builtWith: Creado con {{ .Generator }} - designedBy: Tema {{ .Theme }} diseñado por {{ .DesignedBy }} + builtWith: + other: Creado con {{ .Generator }} + + designedBy: + other: Tema {{ .Theme }} diseñado por {{ .DesignedBy }} diff --git a/i18n/fa.yaml b/i18n/fa.yaml index 9de30b5..3655757 100644 --- a/i18n/fa.yaml +++ b/i18n/fa.yaml @@ -1,43 +1,73 @@ -toggleMenu: منو +toggleMenu: + other: منو -darkMode: حالت شب +darkMode: + other: حالت شب list: page: one: "{{ .Count }} صفحه" other: "{{ .Count }} صفحه" - section: بخش + + section: + other: بخش + subsection: one: زیربخش other: زیربخش article: - back: قبلی - tableOfContents: فهرست - relatedContent: مطالب مرتبط - lastUpdatedOn: آخرین بروزرسانی در + back: + other: قبلی + + tableOfContents: + other: فهرست + + relatedContent: + other: مطالب مرتبط + + lastUpdatedOn: + other: آخرین بروزرسانی در + readingTime: one: "مطالعه در {{ .Count }} دقیقه" other: "مطالعه در {{ .Count }} دقیقه" notFound: - title: یافت نشد - subtitle: این صحه وجود ندارد + title: + other: یافت نشد + + subtitle: + other: این صحه وجود ندارد widget: archives: - title: آرشیو - more: بیشتر + title: + other: آرشیو + + more: + other: بیشتر + tagCloud: - title: تگ ها + title: + other: تگ ها categoriesCloud: - title: دسته بندی + title: + other: دسته بندی search: - title: جستجو - placeholder: تایپ کنید ... - resultTitle: "#PAGES_COUNT صفحه (#TIME_SECONDS ثانیه)" + title: + other: جستجو + + placeholder: + other: تایپ کنید ... + + resultTitle: + other: "#PAGES_COUNT صفحه (#TIME_SECONDS ثانیه)" footer: - builtWith: قدرت گرفته از {{ .Generator }} - designedBy: قالب {{ .Theme }} ساخته شده توسط {{ .DesignedBy }} + builtWith: + other: قدرت گرفته از {{ .Generator }} + + designedBy: + other: قالب {{ .Theme }} ساخته شده توسط {{ .DesignedBy }} diff --git a/i18n/fr.yaml b/i18n/fr.yaml index f18805c..c3feb1d 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -1,41 +1,69 @@ -toggleMenu: Afficher le menu +toggleMenu: + other: Afficher le menu -darkMode: Mode sombre +darkMode: + other: Mode sombre list: page: one: "{{ .Count }} page" other: "{{ .Count }} pages" - section: Section + + section: + other: Section + subsection: one: Sous-section other: Sous-sections article: - back: Retour - tableOfContents: Table des matières - relatedContent: Contenus liés - lastUpdatedOn: Dernière mise à jour le + back: + other: Retour + + tableOfContents: + other: Table des matières + + relatedContent: + other: Contenus liés + + lastUpdatedOn: + other: Dernière mise à jour le + readingTime: one: "{{ .Count }} minute de lecture" other: "{{ .Count }} minutes de lecture" notFound: - title: Page non trouvée - subtitle: Cette page n'existe pas. + title: + other: Page non trouvée + subtitle: + other: Cette page n'existe pas. widget: archives: - title: Archives - more: Autres + title: + other: Archives + + more: + other: Autres + tagCloud: - title: Mots clés + title: + other: Mots clés search: - title: Rechercher - placeholder: Cherchez un article, une publication, etc. - resultTitle: "#PAGES_COUNT pages (#TIME_SECONDS secondes)" + title: + other: Rechercher + + placeholder: + other: Cherchez un article, une publication, etc. + + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS secondes)" footer: - builtWith: Généré avec {{ .Generator }} - designedBy: Thème {{ .Theme }} conçu par {{ .DesignedBy }} + builtWith: + other: Généré avec {{ .Generator }} + + designedBy: + other: Thème {{ .Theme }} conçu par {{ .DesignedBy }} diff --git a/i18n/hu.yaml b/i18n/hu.yaml index 0e8c6e5..5e5af92 100644 --- a/i18n/hu.yaml +++ b/i18n/hu.yaml @@ -1,43 +1,73 @@ -toggleMenu: Menü Kapcsolása +toggleMenu: + other: Menü Kapcsolása -darkMode: Sötét Mód +darkMode: + other: Sötét Mód list: page: one: "{{ .Count }} oldal" other: "{{ .Count }} oldalak" - section: Szekció + + section: + other: Szekció + subsection: one: Alszekció other: Alszekciók article: - back: Vissza - tableOfContents: Tartalomjegyzék - relatedContent: Kapcsolódó tartalom - lastUpdatedOn: Utolsó frissítés időpontja + back: + other: Vissza + + tableOfContents: + other: Tartalomjegyzék + + relatedContent: + other: Kapcsolódó tartalom + + lastUpdatedOn: + other: Utolsó frissítés időpontja + readingTime: one: "{{ .Count }} percnyi olvasmány" other: "{{ .Count }} percnyi olvasmány" notFound: - title: Nem található - subtitle: Ez az oldal nem létezik + title: + other: Nem található + + subtitle: + other: Ez az oldal nem létezik widget: archives: - title: Archívum - more: Több + title: + other: Archívum + + more: + other: Több + tagCloud: - title: Cimkék + title: + other: Cimkék categoriesCloud: - title: Kategóriák + title: + other: Kategóriák search: - title: Keresés - placeholder: Írj valamit... - resultTitle: "#PAGES_COUNT oldal (#TIME_SECONDS másodperc alatt)" + title: + other: Keresés + + placeholder: + other: Írj valamit... + + resultTitle: + other: "#PAGES_COUNT oldal (#TIME_SECONDS másodperc alatt)" footer: - builtWith: "{{ .Generator }} használatával készült" - designedBy: A {{ .Theme }} dizájnt {{ .DesignedBy }} tervezte + builtWith: + other: "{{ .Generator }} használatával készült" + + designedBy: + other: A {{ .Theme }} dizájnt {{ .DesignedBy }} tervezte diff --git a/i18n/id.yaml b/i18n/id.yaml index 42e9461..8104351 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -1,43 +1,73 @@ -toggleMenu: Tampilkan Menu +toggleMenu: + other: Tampilkan Menu -darkMode: Mode Gelap +darkMode: + other: Mode Gelap list: page: one: "{{ .Count }} halaman" other: "{{ .Count }} halaman" - section: Bagian + + section: + other: Bagian + subsection: one: Subbagian other: Subbagian article: - back: Kembali - tableOfContents: Daftar Isi - relatedContent: Konten terkait - lastUpdatedOn: Terakhir diperbarui pada + back: + other: Kembali + + tableOfContents: + other: Daftar Isi + + relatedContent: + other: Konten terkait + + lastUpdatedOn: + other: Terakhir diperbarui pada + readingTime: one: "Waktu Membaca: {{ .Count }} menit" other: "Waktu Membaca: {{ .Count }} menit" notFound: - title: Tidak ditemukan - subtitle: Halaman yang Anda akses tidak ditemukan. + title: + other: Tidak ditemukan + subtitle: + other: Halaman yang Anda akses tidak ditemukan. widget: archives: - title: Arsip - more: Lebih + title: + other: Arsip + + more: + other: Lebih + tagCloud: - title: Tag + title: + other: Tag + categoriesCloud: - title: Kategori + title: + other: Kategori search: - title: Cari - placeholder: Ketik sesuatu... - resultTitle: "#PAGES_COUNT halaman (#TIME_SECONDS detik)" + title: + other: Cari + + placeholder: + other: Ketik sesuatu... + + resultTitle: + other: "#PAGES_COUNT halaman (#TIME_SECONDS detik)" footer: - builtWith: Dibangun dengan {{ .Generator }} - designedBy: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }} + builtWith: + other: Dibangun dengan {{ .Generator }} + + designedBy: + other: Tema {{ .Theme }} dirancang oleh {{ .DesignedBy }} diff --git a/i18n/it.yaml b/i18n/it.yaml index 81f3fb4..0cbeeab 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -1,43 +1,73 @@ -toggleMenu: Toggle Menu +toggleMenu: + other: Toggle Menu -darkMode: Dark Mode +darkMode: + other: Dark Mode list: page: one: "{{ .Count }} pagina" other: "{{ .Count }} pagine" - section: Sezione + + section: + other: Sezione + subsection: one: Sottosezione other: Sottosezioni article: - back: Indietro - tableOfContents: Indice - relatedContent: Contenuti correlati - lastUpdatedOn: Aggiornato il + back: + other: Indietro + + tableOfContents: + other: Indice + + relatedContent: + other: Contenuti correlati + + lastUpdatedOn: + other: Aggiornato il + readingTime: one: "{{ .Count }} min per leggere" other: "{{ .Count }} min per leggere" notFound: - title: Non trovato - subtitle: Questa pagina non esiste. + title: + other: Non trovato + subtitle: + other: Questa pagina non esiste. widget: archives: - title: Archivi - more: Di più + title: + other: Archivi + + more: + other: Di più + tagCloud: - title: Tags + title: + other: Tags + categoriesCloud: - title: Categorie + title: + other: Categorie search: - title: Cerca - placeholder: Scrivi qualcosa... - resultTitle: "#PAGES_COUNT pagine (#TIME_SECONDS secondi)" + title: + other: Cerca + + placeholder: + other: Scrivi qualcosa... + + resultTitle: + other: "#PAGES_COUNT pagine (#TIME_SECONDS secondi)" footer: - builtWith: Realizzato con {{ .Generator }} - designedBy: Tema {{ .Theme }} realizzato da {{ .DesignedBy }} + builtWith: + other: Realizzato con {{ .Generator }} + + designedBy: + other: Tema {{ .Theme }} realizzato da {{ .DesignedBy }} diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 4a1c85f..40380fd 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -1,32 +1,60 @@ -toggleMenu: メニューを開く・閉じる +toggleMenu: + other: メニューを開く・閉じる -darkMode: ダークモード +darkMode: + other: ダークモード article: - back: 前のページ - tableOfContents: 目次 - relatedContent: 関連するコンテンツ - lastUpdatedOn: 最終更新 - readingTime: "読了時間: {{ .Count }}分" + back: + other: 前のページ + + tableOfContents: + other: 目次 + + relatedContent: + other: 関連するコンテンツ + + lastUpdatedOn: + other: 最終更新 + + readingTime: + other: "読了時間: {{ .Count }}分" notFound: - title: 404 Not Found - subtitle: 指定されたページは存在しません。 + title: + other: 404 Not Found + subtitle: + other: 指定されたページは存在しません。 widget: archives: - title: アーカイブ - more: さらに見る + title: + other: アーカイブ + + more: + other: さらに見る + tagCloud: - title: タグ + title: + other: タグ + categoriesCloud: - title: カテゴリ + title: + other: カテゴリ search: - title: 検索 - placeholder: 入力... - resultTitle: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)" + title: + other: 検索 + + placeholder: + other: 入力... + + resultTitle: + other: "#PAGES_COUNT 件 (#TIME_SECONDS 秒)" footer: - builtWith: Built with {{ .Generator }} - designedBy: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 diff --git a/i18n/ko.yaml b/i18n/ko.yaml index 05c0530..11cdc4a 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -1,45 +1,72 @@ -toggleMenu: 메뉴 여닫기 +toggleMenu: + other: 메뉴 여닫기 -darkMode: 다크 모드 +darkMode: + other: 다크 모드 list: page: one: "{{ .Count }} 페이지" other: "{{ .Count }} 페이지" - section: 섹션 + + section: + other: 섹션 + subsection: one: 서브섹션 other: 서브섹션 article: - back: 뒤로가기 - tableOfContents: 목차 - relatedContent: 관련 글 - lastUpdatedOn: "마지막 수정: " + back: + other: 뒤로가기 + + tableOfContents: + other: 목차 + + relatedContent: + other: 관련 글 + + lastUpdatedOn: + other: "마지막 수정: " + readingTime: one: "{{ .Count }} 분 정도" other: "{{ .Count }} 분 정도" notFound: - title: 찾을 수 없음 - subtitle: 페이지를 찾을 수 없습니다. + title: + other: 찾을 수 없음 + + subtitle: + other: 페이지를 찾을 수 없습니다. widget: archives: - title: 보관함 - more: 더보기 + title: + other: 보관함 + more: + other: 더보기 categoriesCloud: - title: 카테고리 + title: + other: 카테고리 tagCloud: - title: 태그 + title: + other: 태그 search: - title: 검색 - placeholder: 검색어를 입력하세요... - resultTitle: "#PAGES_COUNT 페이지 (#TIME_SECONDS 초)" + title: + other: 검색 + + placeholder: + other: 검색어를 입력하세요... + + resultTitle: + other: "#PAGES_COUNT 페이지 (#TIME_SECONDS 초)" footer: - builtWith: "{{ .Generator }}로 만듦" - designedBy: "{{ .DesignedBy }}의 {{ .Theme }} 테마 사용 중" + builtWith: + other: "{{ .Generator }}로 만듦" + designedBy: + other: "{{ .DesignedBy }}의 {{ .Theme }} 테마 사용 중" diff --git a/i18n/nl.yaml b/i18n/nl.yaml index 620d915..a814232 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -1,38 +1,57 @@ -toggleMenu: Open Menu +toggleMenu: + other: Open Menu -darkMode: Donkere modus +darkMode: + other: Donkere modus list: page: one: "{{ .Count }} pagina" other: "{{ .Count }} pagina's" - section: Sectie + + section: + other: Sectie + subsection: one: Subsectie other: Subsecties article: - relatedContent: Gerelateerde inhoud - lastUpdatedOn: Laatst bijgewerkt op + relatedContent: + other: Gerelateerde inhoud + lastUpdatedOn: + other: Laatst bijgewerkt op notFound: - title: Niet gevonden - subtitle: Deze pagina bestaat niet. + title: + other: Niet gevonden + subtitle: + other: Deze pagina bestaat niet. widget: archives: - title: Archief - more: Meer + title: + other: Archief + more: + other: Meer tagCloud: - title: Tags + title: + other: Tags + categoriesCloud: - title: Categorie + title: + other: Categorie search: - title: Zoeken - placeholder: Typ iets - resultTitle: "#PAGES_COUNT pagina's (#TIME_SECONDS seconden)" + title: + other: Zoeken + placeholder: + other: Typ iets + resultTitle: + other: "#PAGES_COUNT pagina's (#TIME_SECONDS seconden)" footer: - builtWith: Gemaakt met {{ .Generator }} - designedBy: Theme {{ .Theme }} ontworpen door {{ .DesignedBy }} + builtWith: + other: Gemaakt met {{ .Generator }} + designedBy: + other: Theme {{ .Theme }} ontworpen door {{ .DesignedBy }} diff --git a/i18n/pl.yaml b/i18n/pl.yaml index 767eb64..e44a140 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -1,43 +1,73 @@ -toggleMenu: Przełącz Menu +toggleMenu: + other: Przełącz Menu -darkMode: Tryb ciemny +darkMode: + other: Tryb ciemny list: page: one: "{{ .Count }} strona" other: "{{ .Count }} stron" - section: Sekcja + + section: + other: Sekcja + subsection: one: Podsekcja other: Podsekcje article: - back: Wróć - tableOfContents: Spis treści - relatedContent: Powiązane artykuły - lastUpdatedOn: Ostatnio zaktualizowany + back: + other: Wróć + + tableOfContents: + other: Spis treści + + relatedContent: + other: Powiązane artykuły + + lastUpdatedOn: + other: Ostatnio zaktualizowany + readingTime: one: "Przeczytasz w {{ .Count }} minutę" other: "Przeczytasz w {{ .Count }} minut" notFound: - title: Nie znaleziono - subtitle: Ta strona nie istnieje + title: + other: Nie znaleziono + subtitle: + other: Ta strona nie istnieje widget: archives: - title: Archiwum - more: Więcej + title: + other: Archiwum + + more: + other: Więcej + tagCloud: - title: Tagi + title: + other: Tagi + categoriesCloud: - title: Kategorie + title: + other: Kategorie search: - title: Szukaj - placeholder: Wpisz coś... - resultTitle: "#PAGES_COUNT stron (#TIME_SECONDS sekund)" + title: + other: Szukaj + + placeholder: + other: Wpisz coś... + + resultTitle: + other: "#PAGES_COUNT stron (#TIME_SECONDS sekund)" footer: - builtWith: Zbudowano z {{ .Generator }} - designedBy: Motyw {{ .Theme }} zaprojektowany przez {{ .DesignedBy }} + builtWith: + other: Zbudowano z {{ .Generator }} + + designedBy: + other: Motyw {{ .Theme }} zaprojektowany przez {{ .DesignedBy }} diff --git a/i18n/pt-br.yaml b/i18n/pt-br.yaml index b1235cb..2784f3d 100644 --- a/i18n/pt-br.yaml +++ b/i18n/pt-br.yaml @@ -1,45 +1,67 @@ -toggleMenu: Alternar Menu +toggleMenu: + other: Alternar Menu -darkMode: Modo Escuro +darkMode: + other: Modo Escuro list: page: one: "{{ .Count }} página" other: "{{ .Count }} páginas" - section: Seção + + section: + other: Seção + subsection: one: Subseção other: Subseções article: - back: Voltar - tableOfContents: Índice - relatedContent: Conteúdo relacionado - lastUpdatedOn: Última atualização em + back: + other: Voltar + + tableOfContents: + other: Índice + + relatedContent: + other: Conteúdo relacionado + + lastUpdatedOn: + other: Última atualização em + readingTime: one: "{{ .Count }} minuto de leitura" other: "{{ .Count }} minutos de leitura" notFound: - title: Não Encontrado - subtitle: Esta página não existe. + title: + other: Não Encontrado + subtitle: + other: Esta página não existe. widget: archives: - title: Arquivos - more: Mais - + title: + other: Arquivos + more: + other: Mais tagCloud: - title: Tags - + title: + other: Tags categoriesCloud: - title: Categorias + title: + other: Categorias search: - title: Busca - placeholder: Digite algo... - resultTitle: "#PAGES_COUNT páginas (#TIME_SECONDS segundos)" + title: + other: Busca + placeholder: + other: Digite algo... + resultTitle: + other: "#PAGES_COUNT páginas (#TIME_SECONDS segundos)" footer: - builtWith: Criado com {{ .Generator }} - designedBy: Tema {{ .Theme }} desenvolvido por {{ .DesignedBy }} + builtWith: + other: Criado com {{ .Generator }} + designedBy: + other: Tema {{ .Theme }} desenvolvido por {{ .DesignedBy }} diff --git a/i18n/ru.yaml b/i18n/ru.yaml index d04e8a3..b1f1e51 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -1,6 +1,8 @@ -toggleMenu: Показать/скрыть меню +toggleMenu: + other: Показать/скрыть меню -darkMode: Тёмный режим +darkMode: + other: Тёмный режим list: page: @@ -8,7 +10,10 @@ list: few: "{{ .Count }} страницы" many: "{{ .Count }} страниц" other: "{{ .Count }} страниц" - section: Раздел + + section: + other: Раздел + subsection: one: Подраздел few: Подразделы @@ -16,28 +21,43 @@ list: other: Подразделы article: - back: Назад - relatedContent: Также рекомендуем - lastUpdatedOn: Обновлено - tableOfContents: Содержание - readingTime: "Время чтения: {{ .Count }} мин." + back: + other: Назад + relatedContent: + other: Также рекомендуем + lastUpdatedOn: + other: Обновлено + tableOfContents: + other: Содержание + readingTime: + other: "Время чтения: {{ .Count }} мин." notFound: - title: Не найдено - subtitle: Запрашиваемая страница не существует + title: + other: Не найдено + subtitle: + other: Запрашиваемая страница не существует widget: archives: - title: Архивы - more: Ещё + title: + other: Архивы + more: + other: Ещё tagCloud: - title: Теги + title: + other: Теги search: - title: Поиск - placeholder: Введите что-нибудь... - resultTitle: "Найдено #PAGES_COUNT страниц (за #TIME_SECONDS с.)" + title: + other: Поиск + placeholder: + other: Введите что-нибудь... + resultTitle: + other: "Найдено #PAGES_COUNT страниц (за #TIME_SECONDS с.)" footer: - builtWith: Создано при помощи {{ .Generator }} - designedBy: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} + builtWith: + other: Создано при помощи {{ .Generator }} + designedBy: + other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} diff --git a/i18n/th.yaml b/i18n/th.yaml index 81e54d3..9982c06 100644 --- a/i18n/th.yaml +++ b/i18n/th.yaml @@ -1,41 +1,70 @@ -toggleMenu: สลับเมนู +toggleMenu: + other: สลับเมนู -darkMode: ธีมมืด +darkMode: + other: ธีมมืด list: page: one: "{{ .Count }} หน้า" other: "{{ .Count }} หน้า" - section: หมวดหมู่ + + section: + other: หมวดหมู่ + subsection: one: หมวดหมู่ย่อย other: หมวดหมู่ย่อยอื่นๆ article: - back: กลับไป - tableOfContents: สารบัญ - relatedContent: เนื้อหาคล้ายคลึงกัน - lastUpdatedOn: อัปเดตล่าสุดเมื่อ + back: + other: กลับไป + + tableOfContents: + other: สารบัญ + + relatedContent: + other: เนื้อหาคล้ายคลึงกัน + + lastUpdatedOn: + other: อัปเดตล่าสุดเมื่อ + readingTime: one: "น่าจะใช้เวลา {{ .Count }} นาทีในการอ่าน" other: "น่าจะใช้เวลา {{ .Count }} นาทีในการอ่าน" notFound: - title: ไม่พบหัวข้อ - subtitle: ไม่พบหน้านี้ในระบบ + title: + other: ไม่พบหัวข้อ + + subtitle: + other: ไม่พบหน้านี้ในระบบ widget: archives: - title: เนื้อหาที่เก็บถาวรแล้ว - more: อื่นๆ นอกจากนี้ + title: + other: เนื้อหาที่เก็บถาวรแล้ว + + more: + other: อื่นๆ นอกจากนี้ + tagCloud: - title: แท็ก + title: + other: แท็ก search: - title: ค้นหา - placeholder: พิมพ์เพื่อค้นหา ... - resultTitle: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" + title: + other: ค้นหา + + placeholder: + other: พิมพ์เพื่อค้นหา ... + + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" footer: - builtWith: ถูกสร้างด้วย {{ .Generator }} - designedBy: ธีม {{ .Theme }} ออกแบบโดย {{ .DesignedBy }} + builtWith: + other: ถูกสร้างด้วย {{ .Generator }} + + designedBy: + other: ธีม {{ .Theme }} ออกแบบโดย {{ .DesignedBy }} diff --git a/i18n/tr.yaml b/i18n/tr.yaml index 0df564a..2dbb9d5 100644 --- a/i18n/tr.yaml +++ b/i18n/tr.yaml @@ -1,36 +1,53 @@ -toggleMenu: Menüyü Gizle +toggleMenu: + other: Menüyü Gizle -darkMode: Koyu Mod +darkMode: + other: Koyu Mod list: page: one: "{{ .Count }} makale" other: "{{ .Count }} makale" - section: Bölüm + + section: + other: Bölüm + subsection: one: Alt bölüm other: Alt bölümler article: - relatedContent: Alakalı içerikler - lastUpdatedOn: Son güncelleme + relatedContent: + other: Alakalı içerikler + lastUpdatedOn: + other: Son güncelleme notFound: - title: Bulunamadı - subtitle: Aradığınız sayfa mevcut değil. + title: + other: Bulunamadı + subtitle: + other: Aradığınız sayfa mevcut değil. widget: archives: - title: Arşiv - more: Daha fazla + title: + other: Arşiv + more: + other: Daha fazla tagCloud: - title: Etiketler + title: + other: Etiketler search: - title: Arama - placeholder: Birşeyler yazın... - resultTitle: "#PAGES_COUNT sayfa (#TIME_SECONDS saniye)" + title: + other: Arama + placeholder: + other: Birşeyler yazın... + resultTitle: + other: "#PAGES_COUNT sayfa (#TIME_SECONDS saniye)" footer: - builtWith: "{{ .Generator }} ile oluşturuldu." - designedBy: "{{ .Theme }} teması {{ .DesignedBy }} tarafından tasarlandı" + builtWith: + other: "{{ .Generator }} ile oluşturuldu." + designedBy: + other: "{{ .Theme }} teması {{ .DesignedBy }} tarafından tasarlandı" diff --git a/i18n/uk.yaml b/i18n/uk.yaml index 2e29e26..3bd4f71 100644 --- a/i18n/uk.yaml +++ b/i18n/uk.yaml @@ -1,42 +1,71 @@ -toggleMenu: Показати меню +toggleMenu: + other: Показати меню -darkMode: Темна тема +darkMode: + other: Темна тема list: page: one: "{{ .Count }} сторінка" few: "{{ .Count }} сторінки" other: "{{ .Count }} сторінок" - section: Секція + + section: + other: Секція + subsection: one: Підсекція other: Підсекції article: - back: Назад - tableOfContents: Зміст - relatedContent: Схожі матеріали - lastUpdatedOn: Востаннє оновлено + back: + other: Назад + + tableOfContents: + other: Зміст + + relatedContent: + other: Схожі матеріали + + lastUpdatedOn: + other: Востаннє оновлено + readingTime: one: "Час читання: {{ .Count }} хв" other: "Час читання: {{ .Count }} хв" notFound: - title: Не знайдено - subtitle: Ця сторінка не існує + title: + other: Не знайдено + + subtitle: + other: Ця сторінка не існує widget: archives: - title: Архіви - more: Більше + title: + other: Архіви + + more: + other: Більше + tagCloud: - title: Теґи + title: + other: Теґи search: - title: Пошук - placeholder: Напишіть що-небудь... - resultTitle: "#PAGES_COUNT сторінок (#TIME_SECONDS секунд)" + title: + other: Пошук + + placeholder: + other: Напишіть що-небудь... + + resultTitle: + other: "#PAGES_COUNT сторінок (#TIME_SECONDS секунд)" footer: - builtWith: Створено з {{ .Generator }} - designedBy: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} + builtWith: + other: Створено з {{ .Generator }} + + designedBy: + other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index e744d08..9350c2b 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -1,32 +1,60 @@ -toggleMenu: 切换菜单 +toggleMenu: + other: 切换菜单 -darkMode: 暗色模式 +darkMode: + other: 暗色模式 article: - back: 返回 - tableOfContents: 目录 - relatedContent: 相关文章 - lastUpdatedOn: 最后更新于 - readingTime: "阅读时长: {{ .Count }} 分钟" + back: + other: 返回 + + tableOfContents: + other: 目录 + + relatedContent: + other: 相关文章 + + lastUpdatedOn: + other: 最后更新于 + + readingTime: + other: "阅读时长: {{ .Count }} 分钟" notFound: - title: 404 错误 - subtitle: 页面不存在 + title: + other: 404 错误 + subtitle: + other: 页面不存在 widget: archives: - title: 归档 - more: 更多 + title: + other: 归档 + + more: + other: 更多 + tagCloud: - title: 标签云 + title: + other: 标签云 + categoriesCloud: - title: 分类 + title: + other: 分类 search: - title: 搜索 - placeholder: 输入关键词... - resultTitle: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" + title: + other: 搜索 + + placeholder: + other: 输入关键词... + + resultTitle: + other: "#PAGES_COUNT 个结果 (用时 #TIME_SECONDS 秒)" footer: - builtWith: Built with {{ .Generator }} - designedBy: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 diff --git a/i18n/zh-hk.yaml b/i18n/zh-hk.yaml index 4f701ba..9e3c246 100644 --- a/i18n/zh-hk.yaml +++ b/i18n/zh-hk.yaml @@ -1,43 +1,73 @@ -toggleMenu: 切換選單 +toggleMenu: + other: 切換選單 -darkMode: 深色模式 +darkMode: + other: 深色模式 list: page: one: "第 {{ .Count }} 頁" other: "第 {{ .Count }} 頁" - section: Section + + section: + other: Section + subsection: one: Subsection other: Subsections article: - back: 返回 - tableOfContents: 目錄 - relatedContent: 相關內容 - lastUpdatedOn: 上次改過於 + back: + other: 返回 + + tableOfContents: + other: 目錄 + + relatedContent: + other: 相關內容 + + lastUpdatedOn: + other: 上次改過於 + readingTime: one: "需要 {{ .Count }} 分鐘閱讀" other: "需要 {{ .Count }} 分鐘閱讀" notFound: - title: Not Found - subtitle: 頁面不存在 + title: + other: Not Found + + subtitle: + other: 頁面不存在 widget: archives: - title: Archives - more: 更多 + title: + other: Archives + + more: + other: 更多 + tagCloud: - title: Tags + title: + other: Tags categoriesCloud: - title: Categories + title: + other: Categories search: - title: 搜尋 - placeholder: Type 關鍵字... - resultTitle: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" + title: + other: 搜尋 + + placeholder: + other: Type 關鍵字... + + resultTitle: + other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" footer: - builtWith: Built with {{ .Generator }} - designedBy: 主題 {{ .Theme }} 由 {{ .DesignedBy }} 設計 + builtWith: + other: Built with {{ .Generator }} + + designedBy: + other: 主題 {{ .Theme }} 由 {{ .DesignedBy }} 設計 diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index 8c1acee..d9e124e 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -1,26 +1,49 @@ -toggleMenu: 切換選單 +toggleMenu: + other: 切換選單 -darkMode: 夜晚模式 +darkMode: + other: 夜晚模式 article: - back: 返回 - tableOfContents: 目錄 - relatedContent: 相關文章 - lastUpdatedOn: 最後更新 - readingTime: "閱讀時間: {{ .Count }} 分鐘" + back: + other: 返回 + + tableOfContents: + other: 目錄 + + relatedContent: + other: 相關文章 + + lastUpdatedOn: + other: 最後更新 + + readingTime: + other: "閱讀時間: {{ .Count }} 分鐘" notFound: - title: 404 錯誤 - subtitle: 頁面不存在 + title: + other: 404 錯誤 + subtitle: + other: 頁面不存在 widget: archives: - title: 紀錄 - more: 更多 + title: + other: 紀錄 + + more: + other: 更多 + tagCloud: - title: 標籤雲 + title: + other: 標籤雲 search: - title: 搜尋 - placeholder: 輸入關鍵字... - resultTitle: "#PAGES_COUNT 個結果 (用時 #TIME_SECONDS 秒)" + title: + other: 搜尋 + + placeholder: + other: 輸入關鍵字... + + resultTitle: + other: "#PAGES_COUNT 個結果 (用時 #TIME_SECONDS 秒)" diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html deleted file mode 100644 index 21c5100..0000000 --- a/layouts/_default/_markup/render-codeblock.html +++ /dev/null @@ -1,20 +0,0 @@ -{{- $class := .Attributes.class | default "" -}} -{{- $lang := .Attributes.lang | default .Type -}} -
-
- {{ $lang }} - -
- - {{- if transform.CanHighlight $lang -}} -
{{- highlight .Inner $lang -}}
- {{- else -}} -
{{- .Inner -}}
- {{- end -}} -
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 5577736..0ed5584 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -17,7 +17,7 @@ {{- $Height = $image.Height -}} {{- $galleryImage = true -}} - {{- if .Page.Site.Params.imageProcessing.content.enabled -}} + {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}} {{- $small := $image.Resize `480x` -}} {{- $big := $image.Resize `1024x` -}} {{- $Srcset = printf `%s 480w, %s 1024w` $small.RelPermalink $big.RelPermalink -}} diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 9df633e..5d5243c 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -16,8 +16,10 @@ {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - - {{ range $pages.GroupByDate "2006" }} + {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} + {{ $filtered := ($pages | intersect $notHidden) }} + + {{ range $filtered.GroupByDate "2006" }} {{ $id := lower (replace .Key " " "-") }}

{{ .Key }}

diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4e1e0b5..9bc618d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -25,7 +25,7 @@ {{- $Width := $image.resource.Width -}} {{- $Height := $image.resource.Height -}} - {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} + {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index 0d3170e..e9f3f1a 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -6,6 +6,7 @@ {{- else -}} {{- $pages = $pctx.Pages -}} {{- end -}} +{{- $pages := where $pages "Params.hidden" "!=" true -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} diff --git a/layouts/index.html b/layouts/index.html index 5c1eaa5..0cd0b88 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,9 @@ {{ define "main" }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} - {{ $pag := .Paginate ($pages) }} + {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} + {{ $filtered := ($pages | intersect $notHidden) }} + {{ $pag := .Paginate ($filtered) }} +
{{ range $index, $element := $pag.Pages }} {{ partial "article-list/default" . }} diff --git a/layouts/page/search.json b/layouts/page/search.json index a0f5184..5d4e627 100644 --- a/layouts/page/search.json +++ b/layouts/page/search.json @@ -1,13 +1,16 @@ {{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}} +{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}} +{{- $filtered := ($pages | intersect $notHidden) -}} + {{- $result := slice -}} -{{- range $pages -}} +{{- range $filtered -}} {{- $data := dict "title" .Title "date" .Date "permalink" .Permalink "content" (.Plain) -}} {{- $image := partialCached "helper/image" (dict "Context" . "Type" "articleList") .RelPermalink "articleList" -}} {{- if $image.exists -}} {{- $imagePermalink := "" -}} - {{- if and $image.resource .Page.Site.Params.imageProcessing.cover.enabled -}} + {{- if and $image.resource (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $imagePermalink = (absURL $thumbnail.Permalink) -}} {{- else -}} diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html index edd58a0..376512a 100644 --- a/layouts/partials/article-list/compact.html +++ b/layouts/partials/article-list/compact.html @@ -19,7 +19,7 @@ {{- $Width := $image.resource.Width -}} {{- $Height := $image.resource.Height -}} - {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} + {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{- $Permalink = $thumbnail.RelPermalink -}} {{- $Width = $thumbnail.Width -}} diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 78b41bd..7582ec2 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -9,7 +9,7 @@ {{- $Height := $image.resource.Height -}} {{- $Srcset := "" -}} - {{- if .Page.Site.Params.imageProcessing.cover.enabled -}} + {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}} {{- $thumbnail := $image.resource.Resize "800x" -}} {{- $thumbnailRetina := $image.resource.Resize "1600x" -}} {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}} diff --git a/layouts/partials/article/components/photoswipe.html b/layouts/partials/article/components/photoswipe.html index 425825c..c33ff49 100644 --- a/layouts/partials/article/components/photoswipe.html +++ b/layouts/partials/article/components/photoswipe.html @@ -1,20 +1,68 @@ -{{- $opts := dict "minify" hugo.IsProduction "format" "esm" -}} -{{- $galleryScript := resources.Get "ts/gallery.ts" | js.Build $opts -}} - - - - \ No newline at end of file + + + +{{- partial "helper/external" (dict "Context" . "Namespace" "PhotoSwipe") -}} \ No newline at end of file diff --git a/layouts/partials/article/components/related-content.html b/layouts/partials/article/components/related-content.html index 822fc73..aba88e3 100644 --- a/layouts/partials/article/components/related-content.html +++ b/layouts/partials/article/components/related-content.html @@ -1,4 +1,4 @@ -{{ $related := .Site.RegularPages.Related . | first 5 }} +{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }} {{ with $related }}