document.getElementById('back-top');
5 | if (!window.__theme.backtop) return false;
6 | window.addEventListener('scroll', () => {
7 | const scrollH = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight) - document.documentElement.clientHeight - 150;
8 | const css = 157 - (~~(document.documentElement.scrollTop / scrollH * 100) * 1.57);
9 | if (css <= 0) el.classList.add('back-top-completed');
10 | else el.classList.remove('back-top-completed');
11 |
12 | const circle = el.querySelector('svg circle') as HTMLElement;
13 | circle.style.strokeDashoffset = css < 0 ? '0' : css.toString();
14 | })
15 |
16 | const _disabledMouseWheel = (e) => e.stopPropagation();
17 | function disabledMouseWheel(_) {
18 | if (_) {
19 | document.addEventListener('wheel', _disabledMouseWheel, {
20 | passive: true
21 | });
22 | document.addEventListener('touchstart', _disabledMouseWheel, {
23 | passive: true
24 | });
25 | } else {
26 | document.removeEventListener('wheel', _disabledMouseWheel);
27 | document.removeEventListener('touchstart', _disabledMouseWheel);
28 | }
29 | }
30 | el.onclick = (e) => {
31 | e.stopPropagation();
32 | e.preventDefault();
33 | if (this._jump) return false;
34 | this._jump = true;
35 | disabledMouseWheel(true);
36 | const easeInOut = (t, b, c, d) => {
37 | return t === d ? b + c : c * (-(2 ** ((-10 * t) / d)) + 1) + b;
38 | };
39 | jump(
40 | document.body,
41 | {
42 | duration: 400,
43 | offset: 0,
44 | callback: () => {
45 | this._jump = false;
46 | disabledMouseWheel(false);
47 | },
48 | easing: easeInOut,
49 | a11y: false
50 | }
51 | );
52 | }
53 | window.addEventListener(
54 | 'scroll',
55 | () => {
56 | if (!el) return false;
57 | if (window.scrollY > 800) {
58 | el.classList.add('x');
59 | } else {
60 | el.classList.remove('x');
61 | }
62 | },
63 | {
64 | passive: true
65 | }
66 | );
67 | }
--------------------------------------------------------------------------------
/assets/ts/src/initClipboard.ts:
--------------------------------------------------------------------------------
1 | import ClipboardJS from "clipboard";
2 |
3 | export default function() {
4 | if (!document.querySelector('[data-clipboard-text]')) return false;
5 | if (this._clipboard) {
6 | this._clipboard.destroy();
7 | }
8 | this._clipboard = new ClipboardJS('[data-clipboard-text]');
9 | this._clipboard.on('success', function(e) {
10 | // alert(window.__theme.i18n.copy.success);
11 | e.trigger.classList.remove('eva-clipboard-outline');
12 | e.trigger.classList.add('eva-checkmark-outline');
13 | setTimeout(() => {
14 | e.trigger.classList.remove('eva-checkmark-outline');
15 | e.trigger.classList.add('eva-clipboard-outline');
16 | }, 2000);
17 | })
18 | this._clipboard.on('error', function(e) {
19 | alert(window.__theme.i18n.copy.failed);
20 | console.error('Action:', e.action);
21 | console.error('Trigger:', e.trigger);
22 | });
23 | }
--------------------------------------------------------------------------------
/assets/ts/src/initCodeBlockCopy.ts:
--------------------------------------------------------------------------------
1 | export default function() {
2 | const highlightList = Array.from(document.querySelectorAll('.highlight'));
3 | for (let index = 0; index < highlightList.length; index++) {
4 | const el = highlightList[index];
5 | if (el.querySelector('[data-clipboard-text]')) continue;
6 | const header = document.createElement('header');
7 | const codeEl = el.querySelector('pre code[data-lang]') as HTMLElement;
8 | const lang = codeEl.getAttribute('data-lang');
9 | let code = el.querySelector('table td:nth-child(2) pre') as HTMLElement;
10 | if (!code) code = el.querySelector('pre') as HTMLElement;
11 | const codeText = code.textContent as string;
12 |
13 | header.innerHTML = ` ${lang}
`
14 | const btn = header.querySelector('i.eva') as HTMLElement;
15 | el.prepend(header);
16 | btn.setAttribute('data-clipboard-text', codeText);
17 | }
18 | }
--------------------------------------------------------------------------------
/assets/ts/src/initConsoleStyle.ts:
--------------------------------------------------------------------------------
1 | export default function() {
2 | if (!window.__theme.console.enabled) return false;
3 | const text = `\n\n%c${window.__theme.console.leftText}%c${window.__theme.console.rightText}%c\n\nhttps://github.com/Ice-Hazymoon/hugo-theme-luna\n\n`;
4 | const leftStyle = `background: ${window.__theme.console.leftColor};padding:5px 10px;border-radius:5px 0 0 5px;font-size:16px;color:#fff;`;
5 | const rightStyle = `background: ${window.__theme.console.rightColor};padding:5px 10px;border-radius:0 5px 5px 0;font-size:16px;color:#fff;`;
6 | const linkStyle = `font-style:italic;`;
7 | console.log(text,leftStyle, rightStyle, linkStyle);
8 | }
--------------------------------------------------------------------------------
/assets/ts/src/initFooterTime.ts:
--------------------------------------------------------------------------------
1 | export default function() {
2 | const el = document.getElementById('run-time');
3 | if (!el) return false;
4 | const runTimer = setInterval(() => {
5 | if (document.querySelector('.goog-te-banner-frame')) {
6 | el.remove();
7 | clearInterval(runTimer);
8 | return false;
9 | };
10 | const startDate = new Date(window.__theme.creatTime);
11 | const time = new Date();
12 | const diff = time.getTime() - startDate.getTime();
13 |
14 | const day = diff / (1000*60*60*24);
15 | const hour = 24 * parseFloat('0.' + day.toString().replace(/\d+\.(\d*)/, '$1'));
16 | const minute = 60 * parseFloat('0.' + hour.toString().replace(/\d+\.(\d*)/, '$1'));
17 | const second = 60 * parseFloat('0.' + minute.toString().replace(/\d+\.(\d*)/, '$1'));
18 |
19 | const dayEL = document.getElementById('run-time-d') as HTMLElement;
20 | const hourEL = document.getElementById('run-time-h') as HTMLElement;
21 | const minuteEL = document.getElementById('run-time-m') as HTMLElement;
22 | const secondEL = document.getElementById('run-time-s') as HTMLElement;
23 | dayEL.innerText = (~~(day)).toString();
24 | hourEL.innerText = (~~(hour)).toString();
25 | minuteEL.innerText = (~~(minute)).toString();
26 | secondEL.innerText = (~~(second)).toString();
27 | }, 1000);
28 | }
--------------------------------------------------------------------------------
/assets/ts/src/initGallery.ts:
--------------------------------------------------------------------------------
1 | export default function() {
2 | const figuresEl = Array.from(document.querySelectorAll('.gallery-box figure.gallery-image')) as HTMLElement[];
3 | let currentGallery = [] as HTMLElement[];
4 | if (figuresEl.length < 2) return false;
5 | for (const figure of figuresEl) {
6 | const parentElement = figure.parentElement as HTMLElement;
7 | if (parentElement.classList.contains('gallery')) return false;
8 | if (!currentGallery.length) {
9 | /// First iteration
10 | currentGallery = [figure];
11 | } else if (figure.previousElementSibling === currentGallery[currentGallery.length - 1]) {
12 | /// Adjacent figures
13 | currentGallery.push(figure);
14 | } else if (currentGallery.length) {
15 | /// End gallery
16 | wrap(currentGallery);
17 | currentGallery = [figure];
18 | }
19 | }
20 | if (currentGallery.length > 0) {
21 | wrap(currentGallery);
22 | }
23 |
24 | function wrap(figures) {
25 | const galleryContainer = document.createElement('div');
26 | galleryContainer.className = 'gallery';
27 |
28 | const parentNode = figures[0].parentNode,
29 | first = figures[0];
30 |
31 | parentNode.insertBefore(galleryContainer, first)
32 |
33 | for (const figure of figures) {
34 | galleryContainer.appendChild(figure);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/assets/ts/src/initKatex.ts:
--------------------------------------------------------------------------------
1 | import katexRander from 'katex-render';
2 | import 'katex-copy';
3 |
4 | export default function() {
5 | this._renderKatex = () => {
6 | if (window.__theme.katex) {
7 | katexRander(document.body, {
8 | delimiters: [
9 | {left: "$$", right: "$$", display: true},
10 | {left: "$", right: "$", display: false},
11 | {left: "\\(", right: "\\)", display: false},
12 | {left: "\\begin{equation}", right: "\\end{equation}", display: true},
13 | {left: "\\begin{align}", right: "\\end{align}", display: true},
14 | {left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
15 | {left: "\\begin{gather}", right: "\\end{gather}", display: true},
16 | {left: "\\begin{CD}", right: "\\end{CD}", display: true},
17 | {left: "\\[", right: "\\]", display: true},
18 | ],
19 | // • rendering keys, e.g.:
20 | throwOnError : true
21 | })
22 | }
23 | };
24 | this._renderKatex();
25 | }
--------------------------------------------------------------------------------
/assets/ts/src/initLazyload.ts:
--------------------------------------------------------------------------------
1 | import LazyLoad from "lazyload";
2 |
3 | export default function() {
4 | if (window.__theme.lazyload) {
5 | this._lazyLoad = new LazyLoad({
6 | elements_selector: '[data-lazyload]',
7 | class_loading: 'lazy-loading',
8 | class_error: 'lazy-error',
9 | class_loaded: 'lazy-loaded',
10 | unobserve_entered: true,
11 | callback_loaded: (el) => {
12 | if (window.__theme.imageZoom) {
13 | setTimeout(() => {
14 | if (el.hasAttribute('data-zoomable')) {
15 | el.setAttribute('src', el.currentSrc || el.getAttribute('src'));
16 | el.removeAttribute('srcset');
17 | this._zoom.attach(el)
18 | }
19 | }, 500);
20 | }
21 | },
22 | callback_error: (el) => {
23 | const errorImageURL = window.__theme.assets.error_svg;
24 | el.setAttribute("src", errorImageURL);
25 | el.setAttribute("srcset", errorImageURL);
26 | if (el.previousSibling.tagName === 'SOURCE') {
27 | el.previousSibling.setAttribute("src", errorImageURL);
28 | el.previousSibling.setAttribute("srcset", errorImageURL);
29 | }
30 | }
31 | })
32 | } else {
33 | this._noLazyload = (zoom: boolean) => {
34 | const images = Array.from(document.querySelectorAll('[data-zoomable]:not([data-lazyload]):not(.medium-zoom-image)')) as HTMLImageElement[];
35 | images.forEach(el => {
36 | el.setAttribute('src', el.currentSrc || (el.getAttribute('src') as string));
37 | el.removeAttribute('srcset');
38 | if (zoom) this._zoom.attach(el);
39 | })
40 | }
41 | this._lazyLoad = {
42 | update: () => {
43 | if (window.__theme.imageZoom) {
44 | this._noLazyload(true);
45 | }
46 | }
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/assets/ts/src/initNightMode.ts:
--------------------------------------------------------------------------------
1 | export default function() {
2 |
3 | const el = document.querySelector('.dark-mode-switch') as HTMLElement;
4 | const _i = el.querySelector('i') as HTMLElement;
5 |
6 | function setDarkMode(isDark) {
7 | let Event = new CustomEvent("onThemeChange", {
8 | detail: isDark ? 'dark' : 'light'
9 | });
10 | if (isDark) {
11 | _i.classList.remove('eva-moon');
12 | _i.classList.add('eva-sun');
13 | el.title = window.__theme.i18n.darkMode.light;
14 | document.documentElement.dataset.scheme = 'dark'
15 | document.documentElement.classList.add('dark');
16 | } else {
17 | _i.classList.remove('eva-sun');
18 | _i.classList.add('eva-moon');
19 | el.title = window.__theme.i18n.darkMode.dark;
20 | document.documentElement.dataset.scheme = 'light'
21 | document.documentElement.classList.remove('dark');
22 | }
23 | window.dispatchEvent(Event);
24 | }
25 |
26 | if (window.__theme.autoDarkMode) {
27 | setDarkMode(localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches));
28 | } else {
29 | setDarkMode(localStorage.theme === 'dark');
30 | }
31 |
32 |
33 | el.addEventListener('click', () => {
34 | if (_i.classList.contains('eva-sun')) {
35 | localStorage.setItem('theme', 'light');
36 | setDarkMode(false);
37 | } else {
38 | localStorage.setItem('theme', 'dark');
39 | setDarkMode(true);
40 | }
41 | })
42 | }
--------------------------------------------------------------------------------
/assets/ts/src/initPangu.ts:
--------------------------------------------------------------------------------
1 | import pangu from "pangu";
2 |
3 | export default function() {
4 | if (window.__theme.pangu) {
5 | pangu.spacingElementById('swup');
6 | }
7 | }
--------------------------------------------------------------------------------
/assets/ts/src/initPjax.ts:
--------------------------------------------------------------------------------
1 | // pjax
2 | import Swup from 'swup';
3 | import SwupFadeTheme from '../modules/swupFadeTheme';
4 | import SwupProgressPlugin from '../modules/swupProgressPlugin';
5 | import SwupGaPlugin from '../modules/swupGaPlugin';
6 | import SwupScriptsPlugin from '../modules/swupScriptsPlugin';
7 | import SwupMorphPlugin from '../modules/swupMorphPlugin';
8 | import SwupHeadPlugin from '../modules/swupHeadPlugin';
9 |
10 | export default function () {
11 | if (!window.__theme.pjax) return false;
12 | const swup = new Swup({
13 | cache: true,
14 | plugins: [
15 | new SwupMorphPlugin({
16 | containers: ['#i18nlist'],
17 | }),
18 | new SwupFadeTheme(),
19 | new SwupProgressPlugin(),
20 | new SwupScriptsPlugin({
21 | optin: true,
22 | // head: false,
23 | // body: false
24 | }),
25 | new SwupHeadPlugin({
26 | persistAssets: true,
27 | }),
28 | ].concat(window.__theme.googleAnalytics ? [new SwupGaPlugin() as any] : []) as any,
29 | animateHistoryBrowsing: true,
30 | linkSelector: 'a[href^="' + window.location.origin + '"]:not([data-no-swup]), a[href^="/"]:not([data-no-swup])',
31 | });
32 |
33 | this.swup = swup;
34 |
35 | swup.hooks.on('page:view', async function (n) {
36 | await window.Luna.initHugoEncrypt();
37 | window.Luna.initActiveMenu();
38 | window.Luna.renderPost();
39 |
40 | const backTopEl = document.getElementById('back-top');
41 |
42 | if (!n && backTopEl) {
43 | backTopEl.click();
44 | }
45 | });
46 | }
47 |
--------------------------------------------------------------------------------
/assets/ts/src/initZoom.ts:
--------------------------------------------------------------------------------
1 | import mediumZoom from "medium-zoom";
2 |
3 | export default function() {
4 | if (window.__theme.imageZoom) {
5 | if (!window.__theme.lazyload) {
6 | this._noLazyload(false);
7 | }
8 | this._zoom = mediumZoom('[data-zoomable]:not([data-lazyload]):not(.medium-zoom-image)', {
9 | background: 'var(--color-zoom-bg)',
10 | });
11 | }
12 | this._updateZoom = () => {
13 | if (!window.__theme.imageZoom) return false;
14 | if (!window.__theme.lazyload) {
15 | this._noLazyload(true);
16 | }
17 | // this._zoom.detach();
18 | this._zoom.attach('[data-zoomable]:not([data-lazyload]):not(.medium-zoom-image)');
19 | }
20 | }
--------------------------------------------------------------------------------
/assets/ts/window.d.ts:
--------------------------------------------------------------------------------
1 | declare global {
2 | interface Window {
3 | Luna: any;
4 | rednerKatex: any;
5 | __theme: {
6 | cdn: string,
7 | pjax: boolean,
8 | imageZoom: boolean,
9 | lazyload: boolean,
10 | backtop: boolean,
11 | pangu: boolean,
12 | console: {
13 | enabled: boolean,
14 | leftText: string,
15 | leftColor: string,
16 | rightText: string,
17 | rightColor: string,
18 | },
19 | bionicReading: {
20 | enabled: boolean,
21 | autoBionic: boolean,
22 | skipLinks: boolean,
23 | excludeWords: string[],
24 | excludeNodeNames: string[],
25 | excludeClasses: string[],
26 | },
27 | katex: boolean,
28 | search: boolean,
29 | isServer: boolean,
30 | $version: string,
31 | autoDarkMode: boolean,
32 | googleAnalytics: boolean,
33 | lang: string,
34 | hugoEncrypt: {
35 | wrongPasswordText: string,
36 | userStorage: any,
37 | },
38 | assets: {
39 | error_svg: string,
40 | search_svg: string,
41 | },
42 | i18n: {
43 | copy: {
44 | success: string,
45 | failed: string,
46 | copyCode: string,
47 | }
48 | search: {
49 | untitled: string,
50 | loadFailure: string,
51 | input: string,
52 | results: Function,
53 | },
54 | darkMode: {
55 | dark: string,
56 | light: string
57 | }
58 | },
59 | createTime: Date;
60 | }
61 | }
62 | }
63 |
64 | export {};
--------------------------------------------------------------------------------
/config.yaml:
--------------------------------------------------------------------------------
1 | module:
2 | hugoVersion:
3 | extended: true
4 | min: "0.146.0"
5 |
6 | params:
7 | publicCDN: ""
8 |
9 | topTitle: false
10 |
11 | announcement:
12 | enabled: false
13 | file: "README.md"
14 |
15 | comments:
16 | enabled: false
17 | provider: "custom"
18 | giscus:
19 | mapping: "title"
20 | reactionsEnabled: 1
21 | emitMetadata: 0
22 | lang: "en"
23 | lazy: false
24 |
25 | rss:
26 | enabled: true
27 | fullText: true
28 |
29 | sitemap: true
30 |
31 | themeColor: "#dd6065"
32 |
33 | blackAndWhite: false
34 |
35 | console:
36 | enabled: true
37 | leftColor: "#dd6065"
38 | leftText: "Hugo Theme Luna"
39 | rightColor: "#feb462"
40 | rightText: "Powered by Hugo ❤ Luna"
41 |
42 | headlineCounter: true
43 |
44 | fixedNav: false
45 |
46 | font: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif'
47 |
48 | customScript:
49 | enabled: false
50 | pjax: true
51 |
52 | runTime:
53 | enabled: true
54 | creatTime: 2022/01/01
55 |
56 | since: "2022"
57 |
58 | outdatedInfoWarning:
59 | enabled: true
60 | day: 90
61 |
62 | autoDarkMode: false
63 |
64 | share:
65 | twitter: true
66 | facebook: true
67 | weibo: true
68 | copyLinkText: true
69 | qrcode: true
70 |
71 | qrcodeAPI: "https://www.lofter.com/genBitmaxImage?url="
72 |
73 | license:
74 | enabled: true
75 | name: "CC BY-NC-ND 4.0"
76 | icon: "Cc-by-nc-nd.svg"
77 | url: "https://creativecommons.org/licenses/by-nc-nd/4.0"
78 |
79 | i18nlist: false
80 |
81 | github:
82 | id: ""
83 | minStars: 5
84 |
85 | imageZoom: true
86 |
87 | lazyload: true
88 |
89 | bionicReading:
90 | enabled: true
91 | autoBionic: false
92 | skipLinks: false
93 | excludeWords: []
94 | excludeNodeNames: []
95 | excludeClasses: []
96 |
97 | googleTranslate: true
98 |
99 | pangu: true
100 |
101 | search: true
102 |
103 | lastmod: true
104 |
105 | readingTime: true
106 |
107 | wordCount: false
108 |
109 | toc:
110 | enabled: true
111 | wordCount: 400
112 |
113 | HugoEncrypt:
114 | Password: ""
115 | Storage: "session"
116 |
117 | pjax: true
118 |
119 | pwa: true
120 |
121 | katex: true
122 |
123 | backtop: true
124 |
125 | defaultFeaturedImage: false
126 |
127 | featuredImageHeight: "42%"
128 |
129 | imageProcessing:
130 | cover: true
131 | content: true
132 | autoResize:
133 | - 1080
134 | - 1440
135 | webp: true
136 |
137 | opengraph:
138 | twitter:
139 | cardType: summary_large_image
140 | site:
141 | image:
142 |
--------------------------------------------------------------------------------
/exampleSite/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on: [push]
4 |
5 | jobs:
6 | deploy:
7 | env:
8 | HUGO_VERSION: ${{ github.sha }}
9 | TZ: Asia/Shanghai
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - name: Git checkout
14 | uses: actions/checkout@v2
15 | with:
16 | fetch-depth: 0
17 | submodules: true
18 |
19 | - name: Set git config core.quotepath false # https://github.com/gohugoio/hugo/issues/9810#issuecomment-1107519804
20 | run: git config --global core.quotepath false
21 |
22 | - name: Use Node.js
23 | uses: actions/setup-node@v1
24 | with:
25 | node-version: "16.x"
26 |
27 | - name: Install Theme
28 | run: cd themes/hugo-theme-luna && yarn install
29 |
30 | - name: Install PostCSS-CLI
31 | run: npm install postcss-cli -g
32 |
33 | - name: Setup hugo
34 | uses: peaceiris/actions-hugo@v2
35 | with:
36 | hugo-version: "0.146.0"
37 | extended: true
38 |
39 | - name: Build Hugo
40 | run: echo "HUGO_VERSION -> $HUGO_VERSION" && hugo --gc --minify --cleanDestinationDir
41 |
42 | - name: Hugo-Encrypt
43 | run: cd themes/hugo-theme-luna && node ./hugo-encrypt.js
44 |
45 | - name: Deploy
46 | uses: peaceiris/actions-gh-pages@v3
47 | with:
48 | personal_token: ${{ secrets.TOKEN }} # https://github.com/settings/tokens
49 | external_repository: "Ice-Hazymoon/blog-hugo-pages" # The build will be pushed to this repository when it is complete
50 | publish_branch: master
51 | publish_dir: ./public
52 | user_name: Ice-Hazymoon
53 | user_email: imiku.me@gmail.com
54 |
--------------------------------------------------------------------------------
/exampleSite/assets/README.ja.md:
--------------------------------------------------------------------------------
1 | 詳しくは、[英語](/)または[中国語](/zh-cn/)のウェブサイトをご覧ください。
--------------------------------------------------------------------------------
/exampleSite/assets/README.md:
--------------------------------------------------------------------------------
1 | 🎉🎉🎉 Hi everyone!! Hugo theme Luna has been released, welcome to use it, if you encounter problems, you can ask questions in [issues](https://github.com/Ice-Hazymoon/hugo-theme-luna/issues). Here are some notices that you can modify in [this file](https://github.com/Ice-Hazymoon/hugo-theme-luna/blob/master/exampleSite/assets/README.md) or delete it
2 |
3 |
4 |
--------------------------------------------------------------------------------
/exampleSite/assets/README.zh.md:
--------------------------------------------------------------------------------
1 | 🎉🎉🎉 哈喽,大家好!!HUGO 主题 Luna 已经发布,欢迎使用,如果遇到问题可以在 [issues](https://github.com/Ice-Hazymoon/hugo-theme-luna/issues) 里提问。这里是一些公告内容,你可以在 [这里](https://github.com/Ice-Hazymoon/hugo-theme-luna/blob/master/exampleSite/assets/README.zh.md) 修改它,或者删除这个文件。
2 |
--------------------------------------------------------------------------------
/exampleSite/assets/featured.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/assets/featured.png
--------------------------------------------------------------------------------
/exampleSite/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/assets/icon.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "About"
3 | date: 2017-01-14T06:31:45+00:00
4 | layout: "page"
5 | type: page
6 | comments: false
7 | ---
8 |
9 | # About me
10 |
11 | Some introductions...
12 |
13 | 
--------------------------------------------------------------------------------
/exampleSite/content/en-us/about.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "关于"
3 | date: 2017-01-14T06:31:45+00:00
4 | layout: "page"
5 | type: page
6 | comments: false
7 | ---
8 |
9 | # 关于我
10 |
11 | 一些介绍...
12 |
13 | 
--------------------------------------------------------------------------------
/exampleSite/content/en-us/archives.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Archives"
3 | layout: "archives"
4 | date: 2021-08-23T15:26:35+08:00
5 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/archives.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "归档"
3 | layout: "archives"
4 | date: 2021-08-23T15:26:35+08:00
5 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/github.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "GitHub"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "github"
5 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/github.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "GitHub"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "github"
5 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/douban.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/douban.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/github.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Links"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "links"
5 | ---
6 |
7 | #### WebSite
8 |
9 | {{< link url="https://github.com/" image="github.png" title="GitHub" desc="some desc text..." >}}
10 | {{< link url="https://douban.com/" image="douban.png" title="Douban" desc="some desc text..." >}}
11 | {{< link url="https://youtube.com/" image="youtube.png" title="YouTube" desc="some desc text..." >}}
12 | {{< link url="https://sspai.com/" image="sspai.png" title="Sspai" desc="some desc text..." >}}
13 | {{< link url="https://translate.google.com" image="translate.png" title="Translate" desc="some desc text..." >}}
14 | {{< link url="https://tieba.com/" image="tieba.png" title="Tieba" desc="some desc text..." >}}
15 | {{< link url="https://zhihu.com/" image="zhihu.png" title="Zhihu" desc="some desc text..." >}}
16 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/index.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "友情链接"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "links"
5 | ---
6 |
7 | #### 常用网站
8 |
9 | {{< link url="https://github.com/" image="github.png" title="GitHub" desc="some desc text..." >}}
10 | {{< link url="https://douban.com/" image="douban.png" title="Douban" desc="some desc text..." >}}
11 | {{< link url="https://youtube.com/" image="youtube.png" title="YouTube" desc="some desc text..." >}}
12 | {{< link url="https://sspai.com/" image="sspai.png" title="Sspai" desc="some desc text..." >}}
13 | {{< link url="https://translate.google.com" image="translate.png" title="Translate" desc="some desc text..." >}}
14 | {{< link url="https://tieba.com/" image="tieba.png" title="Tieba" desc="some desc text..." >}}
15 | {{< link url="https://zhihu.com/" image="zhihu.png" title="Zhihu" desc="some desc text..." >}}
16 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/sspai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/sspai.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/tieba.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/tieba.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/translate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/translate.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/youtube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/youtube.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/links/zhihu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/links/zhihu.png
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/ArticleEncryptionTest/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Article Encryption Test"
3 | date: 2022-04-09T02:49:13+02:00
4 | slug: hugo-encrypt
5 | summary: "This is a test article for encryption"
6 | tags:
7 | - "Hugo"
8 | ---
9 |
10 | ## Hugo Encrypt
11 |
12 | > password: **2022**
13 |
14 | ````markdown
15 | {{%/* hugo-encrypt 2022 */%}}
16 | 
17 | {{%/* /hugo-encrypt */%}}
18 | ````
19 |
20 | {{% hugo-encrypt 2022 %}}
21 | 
22 | {{% /hugo-encrypt %}}
23 |
24 | ***
25 |
26 | ## Multi-block encryption
27 |
28 | > Default password: **123456**
29 |
30 | ```markdown
31 | {{%/* hugo-encrypt */%}}`Here is the test content `{{%/* /hugo-encrypt */%}}
32 | ```
33 |
34 | {{% hugo-encrypt %}}`Here is the test content `{{%/ hugo-encrypt %}}
35 |
36 | End...
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/ArticleEncryptionTest/index.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "加密文章测试"
3 | date: 2022-04-09T02:49:13+02:00
4 | slug: hugo-encrypt
5 | summary: "Hugo 文章加密测试"
6 | ---
7 |
8 | ## 加密文章测试
9 |
10 | > 密码:**2022**
11 |
12 | ````markdown
13 | {{%/* hugo-encrypt 2022 */%}}
14 | 
15 | {{%/* /hugo-encrypt */%}}
16 | ````
17 |
18 | {{%hugo-encrypt 2022 %}}
19 | 
20 | {{%/hugo-encrypt %}}
21 |
22 | ***
23 |
24 | ## 多块测试
25 |
26 | > 默认密码:**123456**
27 |
28 | ```markdown
29 | {{%/*hugo-encrypt */%}}`这里是第二段密文`{{%/*/hugo-encrypt */%}}
30 | ```
31 |
32 | {{%hugo-encrypt %}}`这里是第二段密文`{{%/hugo-encrypt %}}
33 |
34 | 小尾巴~
35 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/1.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/2.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/3.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/4.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/5.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/6.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/7.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/FlowersGallery/cover.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Flower Gallery
3 | date: 2022-04-15T02:49:13+02:00
4 | slug: flower-gallery
5 | featured_image: cover.jpg
6 | summary: Some photos of flowers
7 | layout: gallery
8 | tags:
9 | - Flower
10 | categories:
11 | - Gallery
12 | ---
13 |
14 | {{< gallery >}}
15 | 
16 | 
17 | 
18 |
19 | 
20 | 
21 | 
22 | {{< /gallery >}}
23 |
24 | ## Grid Gallery
25 |
26 | > Spring, the sweet spring, is the year's pleasant king.
27 |
28 | {{< gallery-grid >}}
29 | 
30 | 
31 | 
32 | 
33 | 
34 | 
35 | {{< /gallery-grid >}}
36 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/FlowersGallery/index.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 画廊(春)
3 | date: 2022-04-15T02:49:13+02:00
4 | slug: flower-gallery
5 | featured_image: cover.jpg
6 | summary: 一些关于花的照片
7 | layout: gallery
8 | tags:
9 | - 花
10 | categories:
11 | - 画廊
12 | ---
13 |
14 | {{< gallery >}}
15 | 
16 | 
17 | 
18 |
19 | 
20 | 
21 | 
22 | {{< /gallery >}}
23 |
24 | ## Grid 布局
25 |
26 | > 春,甘美之春,一年之中的尧舜,
27 |
28 | {{< gallery-grid >}}
29 | 
30 | 
31 | 
32 | 
33 | 
34 | 
35 | {{< /gallery-grid >}}
36 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/Shortcodes/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/Shortcodes/1.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/Shortcodes/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/Shortcodes/2.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/Shortcodes/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/Shortcodes/3.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/Typography/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/en-us/posts/Typography/cover.jpg
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/status/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | author: Ice-Hazymoon
3 | type: status
4 | date: 2019-02-15T07:01:32+00:00
5 | slug: luna-released
6 | categories:
7 | - Luna
8 | ---
9 |
10 | Hugo theme luna has been released, welcome to use it!
--------------------------------------------------------------------------------
/exampleSite/content/en-us/posts/status/index.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | author: Ice-Hazymoon
3 | type: status
4 | date: 2019-02-16T07:01:32+00:00
5 | slug: luna-released
6 | categories:
7 | - 主题
8 | ---
9 |
10 | Hugo 主题 Luna 已发布,欢迎使用!
11 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/search.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Search"
3 | layout: "search"
4 | outputs:
5 | - html
6 | - json
7 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/search.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "搜索"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "search"
5 | outputs:
6 | - html
7 | - json
8 | ---
--------------------------------------------------------------------------------
/exampleSite/content/en-us/twitter.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Twitter"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "twitter"
5 | ---
6 |
--------------------------------------------------------------------------------
/exampleSite/content/en-us/twitter.zh-cn.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "Twitter"
3 | date: 2021-08-23T15:26:35+08:00
4 | layout: "twitter"
5 | ---
6 |
--------------------------------------------------------------------------------
/exampleSite/content/ja/archives.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "アーカイブ"
3 | layout: "archives"
4 | date: 2021-08-23T15:26:35+08:00
5 | ---
--------------------------------------------------------------------------------
/exampleSite/content/ja/posts/Typography/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "源氏物語 1 桐壷 きりつぼ"
3 | date: 2022-06-15T20:15:03+02:00
4 | slug: typography
5 | featured_image: https://upload.wikimedia.org/wikipedia/commons/b/ba/Ch5_wakamurasaki.jpg
6 | tags:
7 | - 源氏物語
8 | refs:
9 | - link: http://james.3zoku.com/genji/genji01.html
10 | ---
11 |
12 | ## 父帝と母桐壺更衣の物語
13 |
14 | いずれの帝の御代であったか、大勢の女御、更衣がお仕えしているなかで、身分はそれほど高くはないが、ひときわ時めいていた更衣がいた。入内のときから、われこそはと思い上がっていた女御たちは、その更衣を目障りな女、とさげすみ妬んだ。それより下位の更衣たちは、なおのこと心安からず思っていた。朝夕の宮仕えのたびに、女御たちの心を掻き立て、怨みを負ったせいか、その更衣は病気がちになり、里帰りがしげく、(帝は)それにつれいっそう 更衣を不憫に思われ、人々のそしりをもかまわず、世間の語り草になるほどのご寵愛であった。
15 |
16 | 殿上人たちも、かかわるのを避けるように見ないふりをして、「大変なご寵愛ぶりだ。唐の国でもこのようなことがあって、世が乱れる悪い先例があった」と私語をかわし、世間でも苦々しく人々の噂の種になって、楊貴妃の例も引き合いに出され、更衣は居たたまれなかったが、恐れ多い帝の類ない御心をただ一筋の頼りとして仕えていた。
17 | 更衣の父の大納言は亡くなり、母は旧家の出で教養もあり、両親がそろっていて、当世の高い評判を得ている人々にもさほど劣ることなく、どんな儀式もそつなくやってきたが、格別の頼りになる後ろ盾がないので、事あるときは、拠り所がなく心細げであった。
18 |
19 | 
20 |
21 | ## 御子誕生(一歳)
22 |
23 | 前世でも深い契りがあったのであろうか、その更衣に世にも稀な美しい男の子が生まれた。帝は早く見たいと心がせいて、急ぎ参上させてご覧になるに、実に美しい容貌の稚児であった。
24 |
25 | 一の宮の皇子は右大臣の女御が生んだ子であったから、後見もしっかりし、当然皇太子だ、と世間でも見られていたが、この輝くような稚児の美しさには比べようもなく、帝は一の宮を一通りは大事にしていたが、この稚児に対しては、自分のものとして格別に可愛がられた。
26 |
27 | もともとこの更衣は普通の宮仕えする身分ではなかった。世間の信望もあり貴人の品格もあったが、帝が無理にもそばに呼び、管弦の遊びの折々、また行事の折々に参上させたのであった。あるときには寝過ごしてなお引き続きお傍に侍らせ、御前から去らせようとしなかったこともあり、身分の軽い女房のようにも見えたのだが、この稚児がお生まれになってからは、一段とご寵愛が深くなり、「ひよっとすると、この稚児が皇太子の御所に入るべきとお考えなのだろうか」と一の宮の女御は疑念をもつほどであった。この女御は最初に入内した方であったから、帝の思いも並々ならぬものがあり、皇女たちもいましたので、帝は一の宮の女御の苦言だけは、けむたくまた心苦しく思っていたのであった。
28 |
29 | おそれおおくも帝の庇護のみを頼りにしていたが、あらさがしをする人は多く、更衣は病弱で心もとない状態のなかで、かえって辛い思いをしたのであった。お部屋は桐壷であった。帝はたくさんの女御たちの部屋を通り過ぎて、ひんぱんに通うので、女御たちが気をやきもきさせるのも無理からぬことであった。更衣が御前に参上されるときも、あまりに繁くなると、打橋、渡殿などの通り道のあちこちに、よからぬ仕掛けをして、送り迎えの女官の着物の裾が汚れてどうにもならないこともあった。またあるときは、どうしても通らなけれならない馬道の戸が、示しあわせて閉じられて、中でみじめな思いをしたこともしばしばあった。事あるごとに嫌がらせにあって、すっかり気落ちした更衣を、帝はあわれに思い、後涼殿に元からいた更衣を他の局に移し、この更衣に上局として賜った。その怨みたるや、晴らしようがなかったであろう。
30 |
31 | ## 若宮の御袴着(三歳)
32 |
33 | この稚児が三歳になった年、御袴着の行事は一の宮に劣らず、内蔵寮、納殿の宝物をふんだんにつかって盛大に行った。このようなやり方に世間の批判も多かったが、この御子の早熟な容姿の世にも稀な美しさに、そんな非難も自然におさまっていった。物知りの老人たちも「このような美しい子供が本当にいるものだ」と讃嘆の声をあげたのであった。
34 |
--------------------------------------------------------------------------------
/exampleSite/content/ja/search.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "検索"
3 | layout: "search"
4 | outputs:
5 | - html
6 | - json
7 | ---
--------------------------------------------------------------------------------
/exampleSite/content/zh-hans/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/exampleSite/content/zh-hans/.gitkeep
--------------------------------------------------------------------------------
/exampleSite/layouts/partials/custom/head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/exampleSite/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | command = "cd themes/hugo-theme-luna && npm install postcss-cli -g && npm install --production && cd ../../ && hugo --gc --minify --cleanDestinationDir --enableGitInfo"
3 | publish = "public"
4 |
5 | [build.environment]
6 | HUGO_VERSION = "0.146.0"
7 |
8 | [[plugins]]
9 | package = "netlify-plugin-hugo-cache-resources"
10 | [plugins.inputs]
11 | debug = true
--------------------------------------------------------------------------------
/exampleSite/static/CNAME:
--------------------------------------------------------------------------------
1 | hugo-theme-luna.imiku.me
--------------------------------------------------------------------------------
/exampleSite/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": true,
3 | "build": {
4 | "env": {
5 | "HUGO_VERSION": "0.146.0"
6 | }
7 | },
8 | "buildCommand": "hugo --gc --minify --cleanDestinationDir --enableGitInfo",
9 | "installCommand": "cd themes/hugo-theme-luna && npm install postcss-cli -g && npm install --production && cd ../../",
10 | "outputDirectory": "public"
11 | }
12 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/Ice-Hazymoon/hugo-theme-luna
2 |
3 | go 1.16
--------------------------------------------------------------------------------
/i18n/es-es.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/i18n/es-es.yaml
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/images/screenshot.png
--------------------------------------------------------------------------------
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/images/tn.png
--------------------------------------------------------------------------------
/layouts/404.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
3 |
4 |
5 |
13 | {{- end -}}
14 |
--------------------------------------------------------------------------------
/layouts/_default/_markup/render-heading.html:
--------------------------------------------------------------------------------
1 |
2 | {{/* prettier-ignore-start */}}
3 | {{- .Text | safeHTML -}}
7 | {{/* prettier-ignore-end */}}
8 |
--------------------------------------------------------------------------------
/layouts/_default/_markup/render-link.html:
--------------------------------------------------------------------------------
1 | {{- .Text | safeHTML -}}
7 |
--------------------------------------------------------------------------------
/layouts/_default/baseof.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{- partial "html/head/head" . -}}
5 | {{- block "head" . -}}{{ end }}
6 |
7 |
8 |
9 |
10 |
11 | {{- partial "html/header" . -}}
12 |
13 |
14 |
15 | {{- partial "html/style" . -}}
16 | {{- block "main" . -}}{{- end -}}
17 |
18 |
19 | {{- partial "html/footer" . -}}
20 |
21 |
22 | {{- partial "components/backtop" . -}}
23 |
24 | {{- partial "components/i18nlist" . -}}
25 |
26 | {{- partial "noscript" . -}}
27 |
28 |
29 |
--------------------------------------------------------------------------------
/layouts/_default/gallery.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
3 |
4 |
{{- .Title -}}
5 | {{- with .Summary -}}
6 |
7 | -
8 | {{ . }}
9 | -
10 |
11 | {{- end -}}
12 |
13 | {{- if .Date -}}
14 |
15 |
21 | {{- end -}}
22 |
23 | {{- if .Params.categories -}}
24 |
34 | {{- end -}}
35 |
36 | {{- if .Params.tags -}}
37 |
46 | {{- end -}}
47 |
48 |
49 |
50 |
{{- .Content -}}
51 |
- End -
52 |
53 | {{- if eq .Type "posts" -}}
54 | {{- partial "article/components/footer" . }}
55 | {{- end -}}
56 |
57 | {{- end -}}
58 |
--------------------------------------------------------------------------------
/layouts/_default/links.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
3 |
4 |
5 |
6 | {{- .Title -}}
7 |
8 |
9 | {{- T "linksRank" -}}
10 |
11 |
12 |
13 |
14 | {{- .Content -}}
15 |
16 |
17 |
18 | {{- partial "comments/include" . }}
19 | {{- end -}}
20 |
--------------------------------------------------------------------------------
/layouts/_default/page.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
5 | {{- partial "comments/include" . }}
6 | {{- end -}}
7 |
--------------------------------------------------------------------------------
/layouts/_default/search.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
3 |
4 |
5 |
6 |
7 |
15 |
16 |
17 |
18 |
21 |
22 |

27 |
28 |
29 |
30 | {{- $countHTML := "${keyword}" -}}
31 | {{- $keywordHTML := "${results}" -}}
32 | {{- T "search.results" (dict "Count" $countHTML "Keyword" $keywordHTML) | safeHTML -}}
33 |
34 |
35 |
36 |
37 |
38 | {{- end -}}
39 |
--------------------------------------------------------------------------------
/layouts/_default/search.json:
--------------------------------------------------------------------------------
1 | {{- $pages := where .Site.RegularPages "Type" "in" (slice "posts" "status") -}}
2 | {{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}}
3 | {{- $filtered := ($pages | intersect $notHidden) -}}
4 |
5 | {{- $result := slice -}}
6 |
7 | {{- range $filtered -}}
8 | {{- $data := slice (slice .Title (.Date.Format "2006年01月01日") .RelPermalink (replaceRE "( )+?|\r?\n" " " (replaceRE "```(.|\n)+?```|{{.+?}}(.|\r?\n?)+?{{.+?}}|{{.+?}}|`(.+?)`" " " .RawContent | markdownify | plainify)) ) -}}
9 |
10 | {{- $result = $result | append slice (slice .Title (.Date.Format "2006年01月01日") .RelPermalink (replaceRE "( )+?|\r?\n" " " (replaceRE "```(.|\n)+?```|{{.+?}}(.|\r?\n?)+?{{.+?}}|{{.+?}}|`(.+?)`" " " .RawContent | markdownify | plainify)) ) -}}
11 | {{- end -}}
12 |
13 | {{- jsonify $result -}}
14 |
--------------------------------------------------------------------------------
/layouts/_default/section.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/layouts/_default/section.html
--------------------------------------------------------------------------------
/layouts/_default/single.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 | {{- partial "article/article" . }}
3 | {{ end }}
4 |
--------------------------------------------------------------------------------
/layouts/_default/taxonomy.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
3 |
4 |
5 |
6 | {{- $coundHTML := printf `%s` (len .Pages | string) -}}
7 | {{- $titleHTML := printf `%s` .Title -}}
8 | {{- if eq .Data.Plural "tags" -}}
9 | {{- T "taxonomy.tag" (dict "Count" $coundHTML "Title" $titleHTML) | safeHTML -}}
10 | {{- else -}}
11 | {{- T "taxonomy.category" (dict "Count" $coundHTML "Title" $titleHTML) | safeHTML -}}
12 | {{- end -}}
13 |
14 |
15 | {{- $paginator := .Paginate (where .Pages "Type" "in" (slice "posts" "status")) -}}
16 | {{- range $paginator.Pages -}}
17 | {{- partial "article-list/article" . -}}
18 | {{- end -}}
19 |
20 |
21 |
22 | {{- partial "article-list/components/pagination" . -}}
23 |
24 | {{- end -}}
25 |
--------------------------------------------------------------------------------
/layouts/_default/terms.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
3 |
4 |
5 | {{- if eq .Title "Categories" -}}
6 |
7 | {{- else -}}
8 |
9 | {{- end -}}
10 | {{- .Title -}}
11 |
12 |
13 | {{- if eq .Title "Categories" -}}
14 | {{- $totalCategories := len .Site.Taxonomies.categories | string -}}
15 | {{- $totalCategoriesHTML := printf `%s` $totalCategories -}}
16 | {{- T "taxonomy.totalCategories" $totalCategoriesHTML | safeHTML -}}
17 | {{- else -}}
18 | {{- $totalTags := len .Site.Taxonomies.tags | string -}}
19 | {{- $totalTagsHTML := printf `%s` $totalTags -}}
20 | {{- T "taxonomy.totalTags" $totalTagsHTML | safeHTML -}}
21 | {{- end -}}
22 |
23 |
24 |
25 |
53 |
54 | {{- end -}}
55 |
--------------------------------------------------------------------------------
/layouts/index.html:
--------------------------------------------------------------------------------
1 | {{- define "main" -}}
2 |
3 |
4 |
5 |
6 | {{- $totalPost := len (where site.RegularPages "Type" "in" (slice "posts" "status")) | string -}}
7 | {{- $totalPostHTML := printf `%s` $totalPost -}}
8 | {{- T "post.archiveCounter" $totalPostHTML | safeHTML -}}
9 |
10 |
11 | {{- partial "components/announcement" . -}}
12 |
13 |
14 | {{- $paginator := .Paginate (where site.RegularPages "Type" "in" (slice "posts" "status")) -}}
15 | {{- range $paginator.Pages -}}
16 | {{- partial "article-list/article" . -}}
17 | {{- end -}}
18 |
19 |
20 |
21 | {{- partial "article-list/components/pagination" . -}}
22 |
23 | {{- end -}}
24 |
--------------------------------------------------------------------------------
/layouts/index.rss.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | {{- .Site.Title -}}
12 |
13 | {{- .Permalink -}}
14 | {{- .Site.Params.author.name -}}
15 | {{- or .Site.Params.Description .Site.Title -}}
16 | {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
17 | {{- .Site.LanguageCode -}}
18 | Hugo -- gohugo.io
19 | {{- $outputFullText := .Site.Params.rss.fullText -}}
20 | {{- range first 10 (where .Site.RegularPages "Type" "in" (slice "posts" "status")) -}}
21 | -
22 | {{- .Title -}}
23 | {{- .Permalink -}}
24 | {{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}}
25 | {{- with .Site.Params.author.email -}}{{.}}{{- with $.Site.Params.author.name -}} ({{.}}){{end}}{{end}}
26 | {{- .Permalink -}}
27 | {{- if $outputFullText -}}
28 | {{- (replaceRE "" (print "
" (T "encrypt.protectedByPassword") "
") (replaceRE "(.|\n)+?|" "" .Content)) | html -}}
29 | {{- else -}}
30 | {{- .Summary -}}
31 | {{- end -}}
32 |
33 | {{- end -}}
34 |
35 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/article.html:
--------------------------------------------------------------------------------
1 | {{- if eq .Type "posts" -}}
2 | {{- partial "article-list/type/posts" . }}
3 | {{- else -}}
4 | {{- partial "article-list/type/status" . }}
5 | {{- end -}}
6 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/components/cover.html:
--------------------------------------------------------------------------------
1 | {{- $hasCover := or (.Site.Params.defaultFeaturedImage) (.Params.featured_image) -}}
2 |
3 | {{- if $hasCover -}}
4 | {{- partial "article-list/components/with-cover" . }}
5 | {{- else -}}
6 | {{- partial "article-list/components/no-cover" . }}
7 | {{- end -}}
8 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/components/info.html:
--------------------------------------------------------------------------------
1 | {{- $hasCover := or (.Site.Params.defaultFeaturedImage) (.Params.featured_image) -}}
2 |
3 |
4 |
5 |
6 |
7 |
13 |
14 |
15 |
16 |
17 | {{- T "post.readingTime" .ReadingTime }}
18 |
19 |
30 |
31 |
32 | {{- if .Params.tags -}}
33 | {{- range first 4 .Params.tags -}}
34 |
39 |
40 | {{- . -}}
41 |
42 | {{- end -}}
43 | {{- end -}}
44 |
45 |
46 | {{- if .Params.tags -}}
47 | {{- range first 3 .Params.tags -}}
48 |
53 |
54 | {{- . -}}
55 |
56 | {{- end -}}
57 | {{- end -}}
58 |
59 |
60 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/components/no-cover.html:
--------------------------------------------------------------------------------
1 | {{- $Summary := .Summary | plainify -}}
2 |
3 | {{- .Title -}}
4 | {{- with $Summary -}}{{ . }}
{{- end -}}
5 |
6 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/components/pagination.html:
--------------------------------------------------------------------------------
1 |
30 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/type/posts.html:
--------------------------------------------------------------------------------
1 |
4 | {{- partial "article-list/components/cover" . }}
5 | {{- partial "article-list/components/info" . }}
6 |
7 |
--------------------------------------------------------------------------------
/layouts/partials/article-list/type/status.html:
--------------------------------------------------------------------------------
1 | {{- $Summary := .Summary | plainify -}}
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 | {{- with $Summary -}}
{{ . }}
{{- end -}}
12 |
13 |
14 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/layouts/partials/article/article.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{- partial "article/components/cover" . }}
5 |
6 | {{- partial "article/components/info" . }}
7 |
8 | {{- partial "article/components/toc" . }}
9 |
10 | {{- partial "article/components/lastmod" . }}
11 |
12 | {{- partial "article/components/content" . }}
13 |
14 | {{- partial "article/components/footer" . }}
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/content.html:
--------------------------------------------------------------------------------
1 |
2 | {{- if .Site.Params.bionicReading.enabled -}}
3 | {{- $.Site.Data.luna.icon.wand | safeHTML -}}
6 | {{- end -}}
7 | {{- .Content -}}
8 |
9 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/cover.html:
--------------------------------------------------------------------------------
1 |
2 | {{- if .Params.featured_image -}}
3 | {{- partial "article/components/with-cover" . }}
4 | {{- else -}}
5 | {{- partial "article/components/no-cover" . }}
6 | {{- end -}}
7 |
8 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/footer.html:
--------------------------------------------------------------------------------
1 | {{- partial "article/components/refs" . }}
2 | {{- partial "article/components/share" . }}
3 |
4 | {{- partial "article/components/pagination" . }}
5 | {{- partial "comments/include.html" . -}}
6 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/lastmod.html:
--------------------------------------------------------------------------------
1 | {{- $config := .Site.Params.outdatedInfoWarning -}}
2 | {{- if $config.enabled -}}
3 | {{- $updateTime := .Lastmod -}}
4 | {{- if .GitInfo -}}
5 | {{- if lt .GitInfo.AuthorDate.Unix .Lastmod.Unix -}}
6 | {{- $updateTime := .GitInfo.AuthorDate -}}
7 | {{- end -}}
8 | {{- end -}}
9 | {{- $lastMod := int (div (now.Sub ($updateTime)).Hours 24) -}}
10 | {{- $lastModHTML := printf `%s` ($lastMod | string) -}}
11 | {{- if (gt $lastMod $config.day) -}}
12 |
13 |
17 |
18 | {{- end -}}
19 | {{- end -}}
20 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/license.html:
--------------------------------------------------------------------------------
1 | {{- $license := .Site.Params.license -}}
2 |
3 | {{- if $license.enabled -}}
4 |
5 | {{ T "post.license" }} 「
6 |
{{- $license.name -}}
7 | 」
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{- end -}}
15 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/no-cover.html:
--------------------------------------------------------------------------------
1 | {{- $Title := or $.Title (T "post.untitled") -}}
2 |
3 |
4 |
5 | {{ $Title }}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/pagination.html:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 | {{- partial "article/components/license" . }}
17 |
18 |
24 | {{- T "post.nextPost" -}}
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/refs.html:
--------------------------------------------------------------------------------
1 | {{- if .Params.refs -}}
2 |
3 |
{{- T "post.refs" -}}
4 |
5 | {{- range $index, $ref := .Params.refs -}}
6 |
12 | {{- end -}}
13 |
14 |
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/share.html:
--------------------------------------------------------------------------------
1 | {{- $url := .Permalink | safeURL -}}
2 | {{- $text := (trim (replaceRE "\r?\n" "" (.Summary | plainify)) " ") | safeURL -}}
3 | {{- $config := .Site.Params.share -}}
4 | {{- if $config -}}
5 |
6 | {{- if (index $config "twitter") -}}
7 |
15 | {{- end -}}
16 |
17 | {{- if (index $config "facebook") -}}
18 |
26 | {{- end -}}
27 |
28 | {{- if (index $config "weibo") -}}
29 |
36 | {{- $.Site.Data.luna.icon.weibo | safeHTML -}}
37 |
38 | {{- end -}}
39 | {{- if (index $config "copyLinkText") -}}
40 |
41 | {{- end -}}
42 |
43 | {{- if (index $config "qrcode") -}}
44 |
45 |
46 |
49 |

50 |
51 |
52 | {{- end -}}
53 |
54 | {{- end -}}
55 |
--------------------------------------------------------------------------------
/layouts/partials/article/components/toc.html:
--------------------------------------------------------------------------------
1 | {{- $showTOC := false -}}
2 |
3 | {{- if isset .Params "toc" -}}
4 | {{- $showTOC = .Params.Toc -}}
5 | {{- else if .Site.Params.Toc.enabled -}}
6 | {{- $showTOC = true -}}
7 | {{- end -}}
8 |
9 | {{- if $showTOC -}}
10 | {{- if gt .WordCount .Site.Params.Toc.wordCount -}}
11 |
19 | {{- end -}}
20 | {{- end -}}
21 |
--------------------------------------------------------------------------------
/layouts/partials/comments/include.html:
--------------------------------------------------------------------------------
1 | {{- $showComments := .Site.Params.comments.enabled -}}
2 |
3 | {{- if isset .Page.Params "comments" -}}
4 | {{- if not .Page.Params.comments -}}
5 | {{- $showComments = false -}}
6 | {{- end -}}
7 | {{- end -}}
8 |
9 | {{- if $showComments -}}
10 |
11 | {{ partial (printf "comments/provider/%s" .Site.Params.comments.provider) . }}
12 |
13 | {{ end }}
14 |
--------------------------------------------------------------------------------
/layouts/partials/comments/provider/custom.html:
--------------------------------------------------------------------------------
1 | your comment code
2 |
5 |
--------------------------------------------------------------------------------
/layouts/partials/comments/provider/giscus.html:
--------------------------------------------------------------------------------
1 | {{- with .Site.Params.comments.giscus -}}
2 |
19 |
20 |
53 | {{- end -}}
54 |
--------------------------------------------------------------------------------
/layouts/partials/components/announcement.html:
--------------------------------------------------------------------------------
1 | {{- if .Site.Params.announcement.enabled -}}
2 | {{- with resources.Get .Site.Params.announcement.file -}}
3 |
4 |
5 | {{- .Content | markdownify -}}
6 |
7 | {{- end -}}
8 | {{- end -}}
9 |
--------------------------------------------------------------------------------
/layouts/partials/components/backtop.html:
--------------------------------------------------------------------------------
1 | {{- if .Site.Params.backtop -}}
2 |
8 |
9 |
10 |
11 |
12 |
25 |
26 |
27 | {{- end -}}
28 |
--------------------------------------------------------------------------------
/layouts/partials/components/dark-mode.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/layouts/partials/components/i18nlist.html:
--------------------------------------------------------------------------------
1 | {{- if .Site.Params.i18nlist -}}
2 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
3 |
4 |
5 |
6 | {{- if .IsTranslated -}}
7 |
15 |
16 |
21 |
35 |
36 | {{- end -}}
37 |
38 | {{- end -}}
39 |
--------------------------------------------------------------------------------
/layouts/partials/components/run-time.html:
--------------------------------------------------------------------------------
1 |
2 | {{ T "runTime.text" }} 0
3 | {{ T "runTime.days" }}
4 | 0
5 | {{ T "runTime.hours" }}
6 | 0
7 | {{ T "runTime.minutes" }}
8 | 0
9 | {{ T "runTime.seconds" }}
10 |
11 |
--------------------------------------------------------------------------------
/layouts/partials/custom/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/layouts/partials/custom/head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/layouts/partials/custom/icons.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/layouts/partials/custom/script.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/layouts/partials/data/description.html:
--------------------------------------------------------------------------------
1 |
2 | {{ $description := or .Description .Site.Params.description }}
3 | {{- if .IsPage -}}
4 |
5 | {{- $description = .Summary -}}
6 | {{- end -}}
7 |
8 | {{- return ($description | plainify) -}}
9 |
--------------------------------------------------------------------------------
/layouts/partials/data/image.html:
--------------------------------------------------------------------------------
1 | {{ $image := false }}
2 | {{- if or .Site.Params.opengraph.image .Params.featured_image -}}
3 | {{- if .Params.featured_image -}}
4 | {{- $image = .Resources.GetMatch .Params.featured_image -}}
5 | {{- else -}}
6 | {{- $image = resources.Get .Site.Params.opengraph.image -}}
7 | {{- end -}}
8 | {{- end -}}
9 |
10 | {{- return $image -}}
11 |
--------------------------------------------------------------------------------
/layouts/partials/data/title.html:
--------------------------------------------------------------------------------
1 | {{- $title := .Title -}}
2 | {{- $siteTitle := .Site.Title -}}
3 |
4 | {{- if .IsHome -}}
5 |
6 |
7 |
8 | {{ $pages := where site.RegularPages "Type" "in" (slice "posts" "status") }}
9 | {{ $pag := .Paginate $pages }}
10 |
11 | {{ if .Paginator.HasPrev }}
12 |
13 | {{ $title = printf "%s - %s" (T "page.page" (string .Paginator.PageNumber)) $siteTitle }}
14 | {{ else }}
15 | {{ $title = $siteTitle }}
16 | {{ end }}
17 | {{- else if eq .Kind "term" -}}
18 |
19 |
20 |
21 | {{ $pages := where .Pages "Type" "in" (slice "posts" "status") }}
22 | {{ $pag := .Paginate $pages }}
23 |
24 |
25 |
26 | {{ $title = slice (T (printf `taxonomy._%s` .Data.Plural)) ": " $title }}
27 |
28 | {{ if .Paginator.HasPrev }}
29 |
30 | {{ $title = $title | append " - " (T "page.page" (string .Paginator.PageNumber)) }}
31 | {{ end }}
32 |
33 | {{ $title = $title | append " - " $siteTitle }}
34 | {{ $title = delimit $title "" }}
35 | {{- else -}}
36 | {{ $title = printf "%s - %s" $title $siteTitle }}
37 | {{- end -}}
38 |
39 | {{ return $title }}
40 |
--------------------------------------------------------------------------------
/layouts/partials/helper/resources.html:
--------------------------------------------------------------------------------
1 | {{- $svg_files := dict "error_svg" "images/error.svg" "search_svg" "images/search.svg" "outload_svg" "images/outload.svg" "offline_html" "offline.html" -}}
2 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
3 |
4 | {{- range $filename, $path := $svg_files -}}
5 | {{- $svg := resources.Get $path | resources.ExecuteAsTemplate $path $ -}}
6 | {{- $.Store.Set $filename (print $public_cdn $svg.RelPermalink) -}}
7 | {{- end -}}
8 |
--------------------------------------------------------------------------------
/layouts/partials/html/head/head.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 |
3 | {{- $title := partial "data/title" . .RelPermalink -}}
4 | {{- $description := partial "data/description" . .RelPermalink -}}
5 |
6 | {{- partial "helper/resources" . -}}
7 |
8 |
9 |
10 | {{- if .Site.Params.keywords -}}
11 |
12 | {{- end -}}
13 |
14 |
15 |
16 |
17 |
18 | {{- $title -}}
19 | {{- $sassTemplate := resources.Get "sass/main.scss" -}}
20 | {{- $styles := $sassTemplate | resources.ExecuteAsTemplate "main.css" . | css.Sass | postCSS (dict "config" "postcss.config.js") -}}
21 |
22 | {{- if hugo.IsServer -}}
23 |
24 | {{- else -}}
25 | {{- $styles := $styles | fingerprint | resources.PostProcess -}}
26 |
27 | {{- end -}}
28 |
29 | {{- partial "html/head/opengraph/include.html" . -}}
30 |
31 | {{- $favicon_icon := resources.Get "icon.png" -}}
32 | {{- $favicon_icon = $favicon_icon.Resize "48x48 ico icon" -}}
33 | {{- $favicon_icon = slice $favicon_icon | resources.Concat "favicon.ico" -}}
34 | {{- $favicon_icon = print $public_cdn $favicon_icon.RelPermalink -}}
35 |
36 |
37 |
38 | {{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate (print ("/" | relLangURL) "manifest.json") . -}}
39 |
40 |
41 | {{- $icon := print $public_cdn (resources.Get "icon.png").RelPermalink -}}
42 |
43 |
44 |
45 | {{- partial "html/head/site-schema.html" . -}}
46 |
47 | {{- partial "custom/head" . -}}
48 |
--------------------------------------------------------------------------------
/layouts/partials/html/head/opengraph/include.html:
--------------------------------------------------------------------------------
1 | {{ partial "html/head/opengraph/provider/base" . }}
2 | {{ partial "html/head/opengraph/provider/twitter" . }}
3 |
--------------------------------------------------------------------------------
/layouts/partials/html/head/opengraph/provider/base.html:
--------------------------------------------------------------------------------
1 | {{- $title := partial "data/title" . .RelPermalink -}}
2 | {{- $description := partial "data/description" . .RelPermalink -}}
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{- if .Site.Params.opengraph.image -}}
10 | {{- $image := partial "data/image" . .RelPermalink -}}
11 | {{- with $image.Permalink -}}{{- end -}}
12 | {{- with $image.Width -}}{{- end -}}
13 | {{- with $image.Height -}}{{- end -}}
14 | {{- end -}}
15 |
16 |
17 | {{- if .IsPage -}}
18 | {{- if not .Date.IsZero -}}
19 |
20 | {{- end -}}
21 | {{- if not .Lastmod.IsZero -}}
22 |
23 | {{- end -}}
24 | {{- else -}}
25 | {{- if not .Site.Lastmod.IsZero -}}
26 |
27 | {{- end -}}
28 | {{- end -}}
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/layouts/partials/html/head/opengraph/provider/twitter.html:
--------------------------------------------------------------------------------
1 | {{- $twitterSummary := .Site.Params.opengraph.twitter -}}
2 | {{- $title := partial "data/title" . .RelPermalink -}}
3 | {{- $description := partial "data/description" . .RelPermalink -}}
4 |
5 |
6 | {{- with $twitterSummary.site -}}
7 |
8 |
9 | {{- end -}}
10 |
11 |
12 |
13 |
14 | {{- if .Site.Params.opengraph.image -}}
15 | {{- $image := partial "data/image" . .RelPermalink -}}
16 |
17 | {{- end -}}
18 |
--------------------------------------------------------------------------------
/layouts/partials/html/head/site-schema.html:
--------------------------------------------------------------------------------
1 | {{- if .IsHome -}}
2 | {{/* "potentialAction": {
28 | "@type": "SearchAction",
29 | "target": "http://example.com/search?&q={query}",
30 | "query-input": "required"
31 | }
32 | */}}
33 | {{- else if .IsPage -}}
34 |
96 | {{- end -}}
97 |
--------------------------------------------------------------------------------
/layouts/partials/html/style.html:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/layouts/partials/noscript.html:
--------------------------------------------------------------------------------
1 |
19 |
--------------------------------------------------------------------------------
/layouts/partials/scripts/custom.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 | {{- $customScript := resources.Get "ts/custom.ts" | js.Build (dict "minify" hugo.IsProduction) -}}
3 | {{- if hugo.IsServer -}}
4 |
9 | {{- else -}}
10 | {{- $customScript = $customScript | fingerprint -}}
11 |
17 | {{- end -}}
18 |
--------------------------------------------------------------------------------
/layouts/partials/scripts/google-translate.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 | {{- $script := resources.Get "translate-google.js" | js.Build (dict "minify" hugo.IsProduction) -}}
3 |
4 | {{- if hugo.IsServer -}}
5 |
6 | {{- else -}}
7 | {{- $script := $script | fingerprint -}}
8 |
9 | {{- end -}}
10 |
11 | {{- $sass := resources.Get "sass/translateelement.scss" -}}
12 | {{- $style := $sass | css.Sass | minify | fingerprint -}}
22 |
--------------------------------------------------------------------------------
/layouts/partials/scripts/main-script.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 |
3 | {{- $scratch := newScratch -}}
4 | {{- $scratch.SetInMap "jsModules" "lazyload" (cond .Site.Params.lazyload "ts/modules/lazyload.js" "ts/_.ts") -}}
5 | {{- $scratch.SetInMap "jsModules" "medium-zoom" (cond .Site.Params.imageZoom "ts/modules/medium-zoom.js" "ts/_.ts") -}}
6 | {{- $scratch.SetInMap "jsModules" "jump.js" (cond .Site.Params.backtop "ts/modules/jump.js" "ts/_.ts") -}}
7 | {{- $scratch.SetInMap "jsModules" "pangu" (cond .Site.Params.pangu "ts/modules/pangu.js" "ts/_.ts") -}}
8 | {{- $scratch.SetInMap "jsModules" "katex" (cond .Site.Params.katex "ts/modules/katex" "ts/_.ts") -}}
9 | {{- $scratch.SetInMap "jsModules" "katex-render" (cond .Site.Params.katex "ts/modules/katex-render" "ts/_.ts") -}}
10 | {{- $scratch.SetInMap "jsModules" "katex-copy" (cond .Site.Params.katex "ts/modules/katex-copy" "ts/_.ts") -}}
11 | {{- $scratch.SetInMap "jsModules" "flexsearch" (cond .Site.Params.search "ts/modules/flexsearch" "ts/_.ts") -}}
12 | {{- $scratch.SetInMap "jsModules" "clipboard" "ts/modules/clipboard" -}}
13 |
14 | {{- $scratch.SetInMap "jsModules" "swup" (cond .Site.Params.pjax "ts/modules/swup.js" "ts/_.ts") -}}
15 | {{- $scratch.SetInMap "jsModules" "swupFadeTheme" (cond .Site.Params.pjax "ts/modules/swupFadeTheme.js" "ts/_.ts") -}}
16 | {{- $scratch.SetInMap "jsModules" "swupProgressPlugin" (cond .Site.Params.pjax "ts/modules/swupProgressPlugin.js" "ts/_.ts") -}}
17 | {{- $scratch.SetInMap "jsModules" "swupGaPlugin" (cond .Site.Params.pjax "ts/modules/swupGaPlugin.js" "ts/_.ts") -}}
18 | {{- $scratch.SetInMap "jsModules" "swupScriptsPlugin" (cond .Site.Params.pjax "ts/modules/swupScriptsPlugin.js" "ts/_.ts") -}}
19 | {{- $scratch.SetInMap "jsModules" "swupMorphPlugin" (cond .Site.Params.pjax "ts/modules/swupMorphPlugin.js" "ts/_.ts") -}}
20 | {{- $scratch.SetInMap "jsModules" "swupHeadPlugin" (cond .Site.Params.pjax "ts/modules/swupHeadPlugin.js" "ts/_.ts") -}}
21 |
22 | {{- $mainScript := resources.Get "ts/main.ts" | js.Build (dict "minify" hugo.IsProduction "params" (dict "foo" "bar") "shims" ($scratch.Get "jsModules")) -}}
23 | {{- if hugo.IsServer -}}
24 |
25 | {{- else -}}
26 | {{- $mainScript := $mainScript | fingerprint -}}
27 |
28 | {{- end -}}
29 |
--------------------------------------------------------------------------------
/layouts/partials/scripts/pwa.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 |
3 | {{- $script := resources.Get "sw.js" | js.Build (dict "minify" hugo.IsProduction "params" (dict "cdn" $public_cdn "url" .Site.BaseURL)) -}}
10 |
--------------------------------------------------------------------------------
/layouts/partials/scripts/theme-script.html:
--------------------------------------------------------------------------------
1 | {{- $pjax := .Site.Params.pjax -}}
2 | {{- $isServer := hugo.IsServer -}}
3 | {{- $version := getenv "HUGO_VERSION" -}}
4 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
63 |
--------------------------------------------------------------------------------
/layouts/shortcodes/abbr.html:
--------------------------------------------------------------------------------
1 | {{- .Get 0 -}}
2 |
--------------------------------------------------------------------------------
/layouts/shortcodes/accordion.html:
--------------------------------------------------------------------------------
1 |
2 | {{- index .Params 0 -}}
3 | {{- .Inner | markdownify -}}
4 |
5 |
--------------------------------------------------------------------------------
/layouts/shortcodes/align.html:
--------------------------------------------------------------------------------
1 | {{- index .Params 1 | markdownify -}}
2 |
--------------------------------------------------------------------------------
/layouts/shortcodes/bilibili.html:
--------------------------------------------------------------------------------
1 | {{- $vid := (.Get 0) -}}
2 | {{- $videopage := default 1 (.Get 1) -}}
3 | {{- $basicQuery := querify "page" $videopage "high_quality" 1 "as_wide" 1 -}}
4 | {{- $videoQuery := "" -}}
5 |
6 | {{- if strings.HasPrefix (lower $vid) "av" -}}
7 | {{- $videoQuery = querify "aid" (strings.TrimPrefix "av" (lower $vid)) -}}
8 | {{- else if strings.HasPrefix (lower $vid) "bv" -}}
9 | {{- $videoQuery = querify "bvid" $vid -}}
10 | {{- else -}}
11 | Bilibili 视频av号或BV号错误!请检查视频av号或BV号是否正确
12 | 当前视频av或BV号:{{- $vid -}},视频分P:{{- $videopage -}}
13 | {{- end -}}
14 |
15 |
26 |
27 |
--------------------------------------------------------------------------------
/layouts/shortcodes/button-outline.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "theme" "bg-theme/10 text-theme hover:bg-theme/5" -}}
3 | {{- $colors.Set "red" "bg-red-500/10 text-red-500 hover:bg-red-500/5" -}}
4 | {{- $colors.Set "green" "bg-green-500/10 text-green-500 hover:bg-green-500/5" -}}
5 | {{- $colors.Set "blue" "bg-blue-500/10 text-blue-500 hover:bg-blue-500/5" -}}
6 | {{- $colors.Set "orange" "bg-orange-500/10 text-orange-500 hover:bg-orange-500/5" -}}
7 | {{- $color := $colors.Get (or (.Get "color") "theme") -}}
8 |
9 | {{- $sizes := newScratch -}}
10 | {{- $sizes.Set "small" "text-sm px-3 py-1.5" -}}
11 | {{- $sizes.Set "normal" "text-base px-4 py-2" -}}
12 | {{- $sizes.Set "large" "text-lg px-5 py-3" -}}
13 | {{- $size := $sizes.Get (or (.Get "size") "normal") -}}
14 |
15 | {{- if .Get "link" -}}
16 |
21 |
22 | {{- .Get "content" | markdownify -}}
23 |
24 | {{- else -}}
25 |
26 |
27 | {{- .Get "content" | markdownify -}}
28 |
29 | {{- end -}}
30 |
--------------------------------------------------------------------------------
/layouts/shortcodes/button.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "theme" "bg-theme" -}}
3 | {{- $colors.Set "red" "bg-red-400" -}}
4 | {{- $colors.Set "green" "bg-green-400" -}}
5 | {{- $colors.Set "blue" "bg-blue-400" -}}
6 | {{- $colors.Set "orange" "bg-orange-400" -}}
7 | {{- $color := $colors.Get (or (.Get "color") "theme") -}}
8 |
9 | {{- $sizes := newScratch -}}
10 | {{- $sizes.Set "small" "text-sm px-3 py-1.5" -}}
11 | {{- $sizes.Set "normal" "text-base px-4 py-2" -}}
12 | {{- $sizes.Set "large" "text-lg px-5 py-3" -}}
13 | {{- $size := $sizes.Get (or (.Get "size") "normal") -}}
14 |
15 | {{- if .Get "link" -}}
16 |
21 |
22 | {{- .Get "content" | markdownify -}}
23 |
24 | {{- else -}}
25 |
26 |
27 | {{- .Get "content" | markdownify -}}
28 |
29 | {{- end -}}
30 |
--------------------------------------------------------------------------------
/layouts/shortcodes/carousel.html:
--------------------------------------------------------------------------------
1 | {{- $id := print "slide-" (delimit (shuffle (seq 1 9)) "") "-" -}}
2 |
3 |
4 |
5 |
6 | {{- range $i, $img := .Params -}}
7 |
8 | {{- end -}}
9 |
10 |
11 |
12 | {{- range $i, $img := .Params -}}
13 |
14 | {{- end -}}
15 |
16 |
17 | {{- range $i, $img := .Params -}}
18 |
19 | {{- end -}}
20 |
21 |
22 | {{- range $i, $img := .Params -}}
23 |
24 | {{- end -}}
25 |
26 |
27 | {{- range $i, $img := .Params -}}
28 |
29 |

30 |

31 |
32 | {{- end -}}
33 |
34 |
35 |
56 |
57 |
--------------------------------------------------------------------------------
/layouts/shortcodes/color.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "red" "text-red-400" -}}
3 | {{- $colors.Set "green" "text-green-400" -}}
4 | {{- $colors.Set "blue" "text-blue-400" -}}
5 | {{- $colors.Set "orange" "text-orange-400" -}}
6 | {{- $colors.Set "theme" "text-theme" -}}
7 |
8 | {{- $color := index .Params 0 -}}
9 | {{- $content := index .Params 1 | markdownify -}}
10 |
11 | {{- if ($colors.Get $color) -}}
12 | {{- $content -}}
13 | {{- else -}}
14 | {{- $content -}}
15 | {{- end -}}
16 |
--------------------------------------------------------------------------------
/layouts/shortcodes/gallery-grid.html:
--------------------------------------------------------------------------------
1 |
2 | {{ with .Inner }}{{ $.Page.RenderString . }}{{ end }}
3 |
4 |
--------------------------------------------------------------------------------
/layouts/shortcodes/gallery.html:
--------------------------------------------------------------------------------
1 |
2 | {{ with .Inner }}{{ $.Page.RenderString . }}{{ end }}
3 |
4 |
--------------------------------------------------------------------------------
/layouts/shortcodes/github-auto.html:
--------------------------------------------------------------------------------
1 | {{- $githubData := dict -}}
2 | {{ with try (resources.GetRemote (print "https://api.github.com/repos/" (.Get "name"))) }}
3 | {{ with .Err }}
4 | {{ errorf "%s" . }}
5 | {{ else with .Value }}
6 | {{ $githubData = . | transform.Unmarshal }}
7 | {{ else }}
8 | {{ errorf "Unable to get remote resource %q" (print "https://api.github.com/repos/" (.Get "name")) }}
9 | {{ end }}
10 | {{ end }}
11 | {{- $githubColors := .Site.Data.luna.githubColors -}}
12 | {{- with $githubData -}}
13 |
14 |
18 |
{{- .description -}}
19 |
20 |
21 |
22 | {{- .language -}}
23 |
24 |
25 |
26 | {{- .stargazers_count -}}
27 |
28 |
29 |
30 | {{- .forks -}}
31 |
32 |
33 |
34 | {{- end -}}
35 |
--------------------------------------------------------------------------------
/layouts/shortcodes/github.html:
--------------------------------------------------------------------------------
1 |
2 |
6 |
{{- .Get "description" -}}
7 |
8 |
9 | {{- .Get "language" -}}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/layouts/shortcodes/hidden-text.html:
--------------------------------------------------------------------------------
1 | {{- if .Get 1 -}}
2 | {{- .Get 0 | markdownify -}}
3 | {{- else -}}
4 | {{- .Get 0 | markdownify -}}
8 | {{- end -}}
9 |
--------------------------------------------------------------------------------
/layouts/shortcodes/hidden.html:
--------------------------------------------------------------------------------
1 | {{- if .Get 0 -}}
2 |
3 | {{- .Inner | markdownify -}}
4 |
5 | {{- else -}}
6 |
9 | {{- .Inner | markdownify -}}
10 |
11 | {{- end -}}
12 |
--------------------------------------------------------------------------------
/layouts/shortcodes/hr.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/layouts/shortcodes/hugo-encrypt.html:
--------------------------------------------------------------------------------
1 | {{ $_hugo_config := `{ "version": 1 }` }}
2 | {{- $randomID := delimit (shuffle (split (md5 now.Unix) "" )) "" -}}
3 |
4 | {{- if .Get 0 -}}
5 | {{- $.Page.Store.Set "passphrase" (.Get 0) -}}
6 | {{- else if .Site.Params.HugoEncrypt.Password -}}
7 | {{- $.Page.Store.Set "passphrase" .Site.Params.HugoEncrypt.Password -}}
8 | {{- else -}}
9 | {{- warnf "!!! [Hugo Encrypt] Please set a password" -}}
10 | {{- end -}}
11 |
12 | {{- if ($.Page.Store.Get "passphrase") -}}
13 |
14 |
15 |
{{- i18n "encrypt.protectedByPassword" -}}
16 |
17 |
18 |
19 |
23 |
29 |
30 |
31 |
32 |
38 |
39 | {{- end -}}
40 |
--------------------------------------------------------------------------------
/layouts/shortcodes/link-card.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
{{- .Get "name" -}}
10 | {{- if (.Get "desc") -}}
11 |
{{- .Get "desc" -}}
12 | {{- end -}}
13 |
14 |
15 | {{- if (.Get "link") -}}
16 |
17 | {{- $url := urls.Parse (.Get "link") -}}
18 |

19 |
{{- .Get "link" -}}
20 |
21 | {{- end -}}
22 |
23 | {{- if (.Get "img") -}}
24 |
25 | {{- end -}}
26 |
27 |
--------------------------------------------------------------------------------
/layouts/shortcodes/link.html:
--------------------------------------------------------------------------------
1 | {{- $title := .Get "title" -}}
2 | {{- $url := .Get "url" -}}
3 | {{- $desc := .Get "desc" -}}
4 | {{- $image := .Get "image" -}}
5 | {{- $lazyload := .Site.Params.lazyload -}}
6 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
7 | {{- $svg_outload := "images/outload.svg" | relURL -}}
8 |
9 | {{- if not (urls.Parse $image).Scheme -}}
10 | {{- $image = print $public_cdn (.Page.Resources.Get $image).RelPermalink -}}
11 | {{- end -}}
12 |
41 |
--------------------------------------------------------------------------------
/layouts/shortcodes/notice.html:
--------------------------------------------------------------------------------
1 | {{- $noticeType := .Get 0 -}}
2 |
3 | {{- $raw := (markdownify .Inner | chomp) -}}
4 |
5 | {{- $block := findRE "(?is)^<(?:address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h(?:1|2|3|4|5|6)|header|hgroup|hr|li|main|nav|noscript|ol|output|p|pre|section|table|tfoot|ul|video)\\b" $raw 1 -}}
6 |
7 | {{- $icons := newScratch -}}
8 | {{- $colors := newScratch -}}
9 |
10 | {{- $icons.Set "warn" "eva-alert-circle-outline" -}}
11 | {{- $colors.Set "warn" "yellow-400" -}}
12 |
13 | {{- $icons.Set "success" "eva-checkmark-circle-2-outline" -}}
14 | {{- $colors.Set "success" "green-400" -}}
15 |
16 | {{- $icons.Set "error" "eva-minus-circle-outline" -}}
17 | {{- $colors.Set "error" "red-400" -}}
18 |
19 | {{- $icons.Set "info" "eva-question-mark-circle-outline" -}}
20 | {{- $colors.Set "info" "blue-400" -}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
31 |
32 |
33 |
34 | {{- if or $block (not $raw) -}}
35 | {{- $raw -}}
36 | {{- else -}}
37 |
{{- $raw -}}
38 | {{- end -}}
39 |
40 |
--------------------------------------------------------------------------------
/layouts/shortcodes/progress.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "red" "bg-red-400" -}}
3 | {{- $colors.Set "green" "bg-green-400" -}}
4 | {{- $colors.Set "blue" "bg-blue-400" -}}
5 | {{- $colors.Set "orange" "bg-orange-400" -}}
6 | {{- $colors.Set "theme" "bg-theme" -}}
7 |
8 |
9 |
10 |
11 |
{{- index .Params 2 -}}
12 |
{{- index .Params 0 -}}%
13 |
14 |
17 |
18 |
--------------------------------------------------------------------------------
/layouts/shortcodes/quote-center.html:
--------------------------------------------------------------------------------
1 |
2 | {{- $content := .Inner | markdownify -}}
3 | {{- if not (strings.HasPrefix $content "") -}}
4 | {{ printf `
%s
` $content | safeHTML -}}
5 | {{- else -}}
6 | {{- $content -}}
7 | {{- end -}}
8 |
9 |
--------------------------------------------------------------------------------
/layouts/shortcodes/quote.html:
--------------------------------------------------------------------------------
1 |
2 | {{- $content := .Inner | markdownify -}}
3 | {{- if not (strings.HasPrefix $content "") }}
4 | {{- printf `
%s
` $content | safeHTML -}}
5 | {{- else }}
6 | {{- $content }}
7 | {{- end -}}
8 |
9 |
--------------------------------------------------------------------------------
/layouts/shortcodes/rating.html:
--------------------------------------------------------------------------------
1 |
2 | {{- if ge (.Get 0) (.Get 1) -}}
3 | {{- $star_outline := sub (int (.Get 0)) (int (.Get 1)) -}}
4 | {{- range $i, $sequence := (seq (.Get 1)) -}}
5 |
6 | {{- end -}}
7 | {{- range $i, $sequence := (seq $star_outline) -}}
8 |
9 | {{- end -}}
10 | {{- end -}}
11 |
12 |
--------------------------------------------------------------------------------
/layouts/shortcodes/tab-panel.html:
--------------------------------------------------------------------------------
1 | {{- $id := print "tab-" (delimit (shuffle (seq 1 9)) "") "-" -}}
2 |
3 |
4 |
5 |
6 |
7 | {{- .Inner | markdownify -}}
8 |
9 |
--------------------------------------------------------------------------------
/layouts/shortcodes/tab-view.html:
--------------------------------------------------------------------------------
1 |
2 | {{- .Inner -}}
3 |
4 |
--------------------------------------------------------------------------------
/layouts/shortcodes/tag-outlined.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "red" "bg-red-500/10 text-red-500" -}}
3 | {{- $colors.Set "green" "bg-green-500/10 text-green-500" -}}
4 | {{- $colors.Set "blue" "bg-blue-500/10 text-blue-500" -}}
5 | {{- $colors.Set "orange" "bg-orange-500/10 text-orange-500" -}}
6 | {{- $colors.Set "theme" "bg-theme/10 text-theme" -}}
7 |
8 |
9 | {{- index .Params 1 | markdownify -}}
10 |
--------------------------------------------------------------------------------
/layouts/shortcodes/tag.html:
--------------------------------------------------------------------------------
1 | {{- $colors := newScratch -}}
2 | {{- $colors.Set "red" "bg-red-500" -}}
3 | {{- $colors.Set "green" "bg-green-500" -}}
4 | {{- $colors.Set "blue" "bg-blue-500" -}}
5 | {{- $colors.Set "orange" "bg-orange-500" -}}
6 | {{- $colors.Set "theme" "bg-theme" -}}
7 |
8 |
9 | {{- index .Params 1 | markdownify -}}
10 |
--------------------------------------------------------------------------------
/layouts/shortcodes/timeline.html:
--------------------------------------------------------------------------------
1 |
2 | {{- range $i, $text := .Params -}}
3 |
4 | {{- $text -}}
5 |
6 | {{- end -}}
7 |
8 |
--------------------------------------------------------------------------------
/layouts/shortcodes/video.html:
--------------------------------------------------------------------------------
1 | {{- $public_cdn := cond hugo.IsServer "" .Site.Params.publicCDN -}}
2 | {{- $src := .Get "src" | default (.Get 0) -}}
3 | {{- if not (urls.Parse $src).Scheme -}}
4 | {{- $src = print $public_cdn .Page.RelPermalink $src -}}
5 | {{- end -}}
6 |
7 |
18 |
19 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | command = "npm install postcss-cli -g && npm install --production && hugo --gc --minify --cleanDestinationDir -s ./exampleSite --themesDir ../.. --enableGitInfo"
3 | publish = "exampleSite/public"
4 |
5 | [build.environment]
6 | HUGO_VERSION = "0.146.0"
7 | HUGO_THEME = "repo"
8 |
9 | [[plugins]]
10 | package = "netlify-plugin-hugo-cache-resources"
11 | [plugins.inputs]
12 | debug = true
13 | # Relative path to source directory in case you use Hugo's "--s" option
14 | srcdir = "exampleSite"
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hugo-theme-luna",
3 | "description": "A simple, performance-first, SEO-friendly Hugo theme",
4 | "version": "0.0.1",
5 | "license": "GPL V3.0 ",
6 | "author": "Ice-Hazymoon",
7 | "scripts": {
8 | "updateModules": "node ./updateModules.js",
9 | "prettier": "npx prettier --write ./layouts/**/*.html ./assets/sass/**/*.scss"
10 | },
11 | "homepage": "https://github.com/Ice-Hazymoon/hugo-theme-luna",
12 | "bugs": {
13 | "url": "https://github.com/Ice-Hazymoon/hugo-theme-luna/issues"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/Ice-Hazymoon/hugo-theme-luna.git"
18 | },
19 | "dependencies": {
20 | "@fullhuman/postcss-purgecss": "^5.0.0",
21 | "autoprefixer": "^10.4.21",
22 | "cssnano": "^6.1.2",
23 | "cssnano-preset-advanced": "^6.1.2",
24 | "postcss-cli": "^10.1.0",
25 | "postcss-easing-gradients": "^3.0.1",
26 | "postcss-font-display": "^0.3.0",
27 | "postcss-pxtorem": "^6.1.0",
28 | "postcss-replace-values": "^2.3.0",
29 | "tailwindcss": "^3.4.17"
30 | },
31 | "devDependencies": {
32 | "@swup/fade-theme": "^2.0.1",
33 | "@swup/ga-plugin": "^2.0.0",
34 | "@swup/head-plugin": "^2.3.1",
35 | "@swup/progress-plugin": "^3.2.0",
36 | "@swup/scripts-plugin": "^2.1.0",
37 | "@swup/slide-theme": "^2.0.1",
38 | "clipboard": "^2.0.11",
39 | "eva-icons": "^1.1.3",
40 | "flexsearch": "^0.7.43",
41 | "jump.js": "github:Ice-Hazymoon/jump.js",
42 | "katex": "^0.16.22",
43 | "medium-zoom": "^1.1.0",
44 | "normalize.css": "^8.0.1",
45 | "pangu": "^4.0.7",
46 | "postcss": "^8.5.3",
47 | "prettier": "^3.5.3",
48 | "prettier-plugin-go-template": "^0.0.15",
49 | "prettier-plugin-tailwindcss": "^0.5.14",
50 | "swup": "^4.8.1",
51 | "swup-morph-plugin": "^1.3.0",
52 | "vanilla-lazyload": "^17.9.0"
53 | },
54 | "browserslist": [
55 | "last 1 Chrome versions"
56 | ]
57 | }
58 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const isDev = process.env.HUGO_ENVIRONMENT !== 'production';
3 | module.exports = {
4 | modules: true,
5 | plugins: !isDev ? [
6 | require('tailwindcss')({
7 | config: path.join(__dirname, '/tailwind.config.js')
8 | }),
9 | require('postcss-pxtorem')({
10 | rootValue: 16,
11 | propList: ['*'],
12 | selectorBlackList: ['html']
13 | }),
14 | require('autoprefixer')({}),
15 | require('postcss-easing-gradients')({}),
16 | require('postcss-font-display')({
17 | display: 'swap',
18 | replace: false
19 | }),
20 | require('@fullhuman/postcss-purgecss')({
21 | content: [
22 | path.join(__dirname, '/data/luna/icon.yaml').split(path.sep).join(path.posix.sep),
23 | path.join(__dirname, '/layouts/**/*.html').split(path.sep).join(path.posix.sep),
24 | path.join(__dirname, '/layouts/*.html').split(path.sep).join(path.posix.sep),
25 | path.join(__dirname, '/assets/**/*.ts').split(path.sep).join(path.posix.sep),
26 | ],
27 | safelist: {
28 | // xx
29 | standard: [/scrollbar/, /sm|md|lg|xl|2xl|[0-9]{1,2}\.[0-9]{1,2}/, /:/, /\//, /h[1-6]|hover|dark|last|after|before/, 'a', 'blockquote', 'body', 'code', 'fieldset', 'figure', 'hr', 'html', 'img', 'kbd', 'ol', 'p', 'pre', 'strong', 'sup', 'table', 'ul'],
30 | // xx包括子项
31 | deep: [/skiptranslate/, /goog-te/, /katex/, /hugo-encrypt/, /medium-zoom/, /lazy/, /swup/, /eva/],
32 | // button.bg-xx.other-class
33 | greedy: []
34 | },
35 | keyframes: true,
36 | fontFace: false,
37 | variables: false,
38 | rejected: true,
39 | }),
40 | require('cssnano')({
41 | preset: ['cssnano-preset-advanced', {
42 | discardComments: {
43 | removeAll: true,
44 | }
45 | }]
46 | }),
47 | ] : [
48 | require('tailwindcss')({
49 | config: path.join(__dirname, '/tailwind.config.js')
50 | }),
51 | require('postcss-easing-gradients')({}),
52 | ]
53 | }
54 |
--------------------------------------------------------------------------------
/screenshots/gtmetrix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/gtmetrix.png
--------------------------------------------------------------------------------
/screenshots/lighthouse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/lighthouse.png
--------------------------------------------------------------------------------
/screenshots/luna-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/luna-white.png
--------------------------------------------------------------------------------
/screenshots/luna.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/luna.png
--------------------------------------------------------------------------------
/screenshots/screen-archives.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-archives.png
--------------------------------------------------------------------------------
/screenshots/screen-gallery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-gallery.png
--------------------------------------------------------------------------------
/screenshots/screen-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-github.png
--------------------------------------------------------------------------------
/screenshots/screen-home-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-home-dark.png
--------------------------------------------------------------------------------
/screenshots/screen-home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-home.png
--------------------------------------------------------------------------------
/screenshots/screen-links.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-links.png
--------------------------------------------------------------------------------
/screenshots/screen-search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-search.png
--------------------------------------------------------------------------------
/screenshots/screen-twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/screenshots/screen-twitter.png
--------------------------------------------------------------------------------
/static/fonts/Eva-Icons.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/Eva-Icons.eot
--------------------------------------------------------------------------------
/static/fonts/Eva-Icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/Eva-Icons.ttf
--------------------------------------------------------------------------------
/static/fonts/Eva-Icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/Eva-Icons.woff
--------------------------------------------------------------------------------
/static/fonts/Eva-Icons.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/Eva-Icons.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_AMS-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_AMS-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_AMS-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_AMS-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_AMS-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_AMS-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Bold.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Bold.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Bold.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Caligraphic-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Caligraphic-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Bold.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Bold.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Bold.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Fraktur-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Fraktur-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Bold.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Bold.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Bold.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-BoldItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-BoldItalic.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-BoldItalic.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Italic.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Italic.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Italic.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Main-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Main-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-BoldItalic.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-BoldItalic.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-BoldItalic.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-Italic.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-Italic.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Math-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Math-Italic.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Bold.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Bold.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Bold.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Italic.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Italic.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Italic.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_SansSerif-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_SansSerif-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Script-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Script-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Script-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Script-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Script-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Script-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size1-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size1-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size1-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size1-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size1-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size1-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size2-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size2-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size2-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size2-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size2-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size2-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size3-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size3-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size3-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size3-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size3-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size3-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size4-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size4-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size4-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size4-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Size4-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Size4-Regular.woff2
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Typewriter-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Typewriter-Regular.ttf
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Typewriter-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Typewriter-Regular.woff
--------------------------------------------------------------------------------
/static/fonts/KaTeX_Typewriter-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/fonts/KaTeX_Typewriter-Regular.woff2
--------------------------------------------------------------------------------
/static/offline.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ice-Hazymoon/hugo-theme-luna/f3a4b5ec418b9e23a6a92576a72332fb10254534/static/offline.jpg
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | const { boxShadow } = require('tailwindcss/defaultTheme');
2 | const plugin = require('tailwindcss/plugin');
3 | const path = require('path');
4 | module.exports = {
5 | future: {
6 | removeDeprecatedGapUtilities: true,
7 | purgeLayersByDefault: true
8 | },
9 | content: [
10 | path.join(__dirname, '/data/luna/icon.yaml'),
11 | path.join(__dirname, '/layouts/**/*.html'),
12 | path.join(__dirname, '/layouts/*.html'),
13 | path.join(__dirname, '/assets/**/*.ts'),
14 | ],
15 | safelist: [],
16 | darkMode: 'class', // or 'media' or 'class'
17 | theme: {
18 | extend: {
19 | colors: {
20 | theme: 'var(--theme)',
21 | text: 'var(--color-text)',
22 | transparent: 'transparent',
23 | darkBg: 'var(--color-dark-bg)',
24 | darkFg: 'var(--color-dark-fg)',
25 | darkBgAccent: 'var(--color-dark-bg-accent)',
26 | darkBorder: 'var(--color-dark-border)',
27 | darkText: 'var(--color-dark-text)',
28 | darkTextPlaceholder: 'var(--color-dark-text-placeholder)',
29 | },
30 | boxShadow: Object.assign(boxShadow, {
31 | custom:
32 | '8px 14px 38px rgba(39, 44, 49, 0.06), 1px 3px 8px rgba(39, 44, 49, 0.03);',
33 | custom2: '-8px 14px 38px rgba(39, 44, 49, 0.06), -1px 3px 8px rgba(39, 44, 49, 0.03);'
34 | })
35 | },
36 | },
37 | plugins: [
38 | plugin(function({ addUtilities, addComponents, e, prefix, config }) {
39 | const obj = {};
40 | // obj[`.line-clamp-1`] = {
41 | // 'text-overflow': 'ellipsis',
42 | // 'white-space': 'nowrap',
43 | // overflow: 'hidden'
44 | // };
45 | addUtilities(obj, {
46 | variants: ['responsive']
47 | });
48 | }),
49 | ]
50 | }
--------------------------------------------------------------------------------
/theme.toml:
--------------------------------------------------------------------------------
1 | name = "Luna"
2 | license = "GPL V3.0"
3 | licenselink = "https://github.com/Ice-Hazymoon/hugo-theme-luna/blob/master/LICENSE"
4 | description = "A simple, performance-first, SEO-friendly Hugo theme"
5 | homepage = "https://github.com/Ice-Hazymoon/hugo-theme-luna"
6 | demosite = "https://hugo-theme-luna.imiku.me"
7 | tags = [
8 | "blog",
9 | "responsive",
10 | "minimal",
11 | "personal",
12 | "light",
13 | "dark",
14 | "gallery",
15 | "archive",
16 | "tailwind",
17 | "search",
18 | "multilingual"
19 | ]
20 | features = [
21 | "blog",
22 | "responsive",
23 | "minimal",
24 | "personal",
25 | "light",
26 | "dark",
27 | "gallery",
28 | "tailwind",
29 | "search",
30 | "multilingual"
31 | ]
32 | min_version = "0.146.0"
33 |
34 | [author]
35 | name = "Ice-Hazymoon"
36 | homepage = "https://imiku.me"
37 |
--------------------------------------------------------------------------------
/updateModules.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 |
4 | const js_modules_path = './assets/ts/modules';
5 | const css_modules_path = './assets/sass/modules';
6 | const static_path = './static';
7 |
8 | const modules = {
9 | 'jump.js/dist/jump.js': `${js_modules_path}/jump.js`,
10 | 'clipboard/dist/clipboard.js': `${js_modules_path}/clipboard.js`,
11 | 'vanilla-lazyload/dist/lazyload.js': `${js_modules_path}/lazyload.js`,
12 | 'medium-zoom/dist/medium-zoom.js': `${js_modules_path}/medium-zoom.js`,
13 | 'swup/dist/Swup.umd.js': `${js_modules_path}/swup.js`,
14 | '@swup/fade-theme/dist/index.umd.js': `${js_modules_path}/swupFadeTheme.js`,
15 | '@swup/ga-plugin/dist/index.umd.js': `${js_modules_path}/swupGaPlugin.js`,
16 | '@swup/progress-plugin/dist/index.umd.js': `${js_modules_path}/swupProgressPlugin.js`,
17 | '@swup/scripts-plugin/dist/index.umd.js': `${js_modules_path}/swupScriptsPlugin.js`,
18 | '@swup/slide-theme/dist/index.umd.js': `${js_modules_path}/swupSlideTheme.js`,
19 | '@swup/head-plugin/dist/index.umd.js': `${js_modules_path}/swupHeadPlugin.js`,
20 | 'swup-morph-plugin/dist/index.umd.js': `${js_modules_path}/swupMorphPlugin.js`,
21 | 'flexsearch/dist/flexsearch.bundle.min.js': `${js_modules_path}/flexsearch.js`,
22 | 'katex/dist/katex.js': `${js_modules_path}/katex.js`,
23 | 'pangu/dist/browser/pangu.js': `${js_modules_path}/pangu.js`,
24 | 'katex/dist/katex.css': `${css_modules_path}/katex.css`,
25 | 'katex/dist/fonts': `${static_path}/fonts`,
26 | 'katex/dist/contrib/auto-render.js': `${js_modules_path}/katex-render.js`,
27 | 'katex/dist/contrib/copy-tex.js': `${js_modules_path}/katex-copy.js`,
28 | 'normalize.css/normalize.css': `${css_modules_path}/normalize.css`,
29 | 'eva-icons/style/eva-icons.css': `${css_modules_path}/eva-icons.css`,
30 | 'eva-icons/style/fonts': `${static_path}/fonts`,
31 | }
32 |
33 | function copyFolderSync(from, to) {
34 | try {
35 | fs.mkdirSync(to);
36 | } catch (error) {}
37 | fs.readdirSync(from).forEach(element => {
38 | if (fs.lstatSync(path.join(from, element)).isFile()) {
39 | fs.copyFileSync(path.join(from, element), path.join(to, element));
40 | } else {
41 | copyFolderSync(path.join(from, element), path.join(to, element));
42 | }
43 | });
44 | }
45 |
46 | for (let index = 0; index < Object.keys(modules).length; index++) {
47 | const key = Object.keys(modules)[index];
48 | const key_path = `node_modules/${key}`;
49 | const value = modules[key];
50 | const value_path = value;
51 | if (!fs.existsSync(key_path)) {
52 | console.log(`${key_path} not found`);
53 | continue;
54 | }
55 |
56 | const dir_path = path.join(value_path, '..');
57 | if (!fs.existsSync(dir_path)) {
58 | fs.mkdirSync(dir_path, { recursive: true });
59 | }
60 | if (fs.lstatSync(key_path).isDirectory() ) {
61 | // copy dir
62 | copyFolderSync(key_path, value_path);
63 | } else {
64 | // copy file
65 | fs.copyFileSync(key_path, value_path);
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/vercel.json:
--------------------------------------------------------------------------------
1 | {
2 | "public": true,
3 | "build": {
4 | "env": {
5 | "HUGO_VERSION": "0.146.0",
6 | "HUGO_THEME": "path0"
7 | }
8 | },
9 | "buildCommand": "hugo --gc --minify --cleanDestinationDir -s ./exampleSite --themesDir ../.. --enableGitInfo",
10 | "installCommand": "npm install postcss-cli -g && npm install --production",
11 | "outputDirectory": "exampleSite/public"
12 | }
--------------------------------------------------------------------------------