diff --git a/README.md b/README.md index ddacf82..6ac9e91 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ## Demo -[Example Site](https://theme-stack.jimmycai.com/) +[Example Site](https://demo.stack.jimmycai.com/) [![Netlify Status](https://api.netlify.com/api/v1/badges/a2d2807a-a905-4bcb-97da-8da8d847da3d/deploy-status)](https://app.netlify.com/sites/hugo-theme-stack/deploys) @@ -77,4 +77,4 @@ Some references that I took while building this theme: | Project | Licence| | ------- | ------| | [artchen/hexo-theme-element](https://github.com/artchen/hexo-theme-element) | [MIT](https://github.com/artchen/hexo-theme-element/blob/master/LICENSE) | -| [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo) | [MIT](https://github.com/MunifTanjim/minimo/blob/master/LICENSE) | \ No newline at end of file +| [MunifTanjim/minimo](https://github.com/MunifTanjim/minimo) | [MIT](https://github.com/MunifTanjim/minimo/blob/master/LICENSE) | diff --git a/assets/scss/partials/highlight/light.scss b/assets/scss/partials/highlight/light.scss index 9ddcff9..1798218 100644 --- a/assets/scss/partials/highlight/light.scss +++ b/assets/scss/partials/highlight/light.scss @@ -10,7 +10,8 @@ } /* Other */ -.chroma .x {} +.chroma .x { +} /* Error */ .chroma .err { @@ -40,367 +41,369 @@ .chroma .hl { display: block; width: 100%; - background-color: #ffffcc + background-color: #ffffcc; } /* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; - color: #7f7f7f + color: #7f7f7f; } /* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; - color: #7f7f7f + color: #7f7f7f; } /* Keyword */ .chroma .k { - color: #00a8c8 + color: #00a8c8; } /* KeywordConstant */ .chroma .kc { - color: #00a8c8 + color: #00a8c8; } /* KeywordDeclaration */ .chroma .kd { - color: #00a8c8 + color: #00a8c8; } /* KeywordNamespace */ .chroma .kn { - color: #f92672 + color: #f92672; } /* KeywordPseudo */ .chroma .kp { - color: #00a8c8 + color: #00a8c8; } /* KeywordReserved */ .chroma .kr { - color: #00a8c8 + color: #00a8c8; } /* KeywordType */ .chroma .kt { - color: #00a8c8 + color: #00a8c8; } /* Name */ .chroma .n { - color: #111111 + color: #111111; } /* NameAttribute */ .chroma .na { - color: #75af00 + color: #75af00; } /* NameBuiltin */ .chroma .nb { - color: #111111 + color: #111111; } /* NameBuiltinPseudo */ .chroma .bp { - color: #111111 + color: #111111; } /* NameClass */ .chroma .nc { - color: #75af00 + color: #75af00; } /* NameConstant */ .chroma .no { - color: #00a8c8 + color: #00a8c8; } /* NameDecorator */ .chroma .nd { - color: #75af00 + color: #75af00; } /* NameEntity */ .chroma .ni { - color: #111111 + color: #111111; } /* NameException */ .chroma .ne { - color: #75af00 + color: #75af00; } /* NameFunction */ .chroma .nf { - color: #75af00 + color: #75af00; } /* NameFunctionMagic */ .chroma .fm { - color: #111111 + color: #111111; } /* NameLabel */ .chroma .nl { - color: #111111 + color: #111111; } /* NameNamespace */ .chroma .nn { - color: #111111 + color: #111111; } /* NameOther */ .chroma .nx { - color: #75af00 + color: #75af00; } /* NameProperty */ .chroma .py { - color: #111111 + color: #111111; } /* NameTag */ .chroma .nt { - color: #f92672 + color: #f92672; } /* NameVariable */ .chroma .nv { - color: #111111 + color: #111111; } /* NameVariableClass */ .chroma .vc { - color: #111111 + color: #111111; } /* NameVariableGlobal */ .chroma .vg { - color: #111111 + color: #111111; } /* NameVariableInstance */ .chroma .vi { - color: #111111 + color: #111111; } /* NameVariableMagic */ .chroma .vm { - color: #111111 + color: #111111; } /* Literal */ .chroma .l { - color: #ae81ff + color: #ae81ff; } /* LiteralDate */ .chroma .ld { - color: #d88200 + color: #d88200; } /* LiteralString */ .chroma .s { - color: #d88200 + color: #d88200; } /* LiteralStringAffix */ .chroma .sa { - color: #d88200 + color: #d88200; } /* LiteralStringBacktick */ .chroma .sb { - color: #d88200 + color: #d88200; } /* LiteralStringChar */ .chroma .sc { - color: #d88200 + color: #d88200; } /* LiteralStringDelimiter */ .chroma .dl { - color: #d88200 + color: #d88200; } /* LiteralStringDoc */ .chroma .sd { - color: #d88200 + color: #d88200; } /* LiteralStringDouble */ .chroma .s2 { - color: #d88200 + color: #d88200; } /* LiteralStringEscape */ .chroma .se { - color: #8045ff + color: #8045ff; } /* LiteralStringHeredoc */ .chroma .sh { - color: #d88200 + color: #d88200; } /* LiteralStringInterpol */ .chroma .si { - color: #d88200 + color: #d88200; } /* LiteralStringOther */ .chroma .sx { - color: #d88200 + color: #d88200; } /* LiteralStringRegex */ .chroma .sr { - color: #d88200 + color: #d88200; } /* LiteralStringSingle */ .chroma .s1 { - color: #d88200 + color: #d88200; } /* LiteralStringSymbol */ .chroma .ss { - color: #d88200 + color: #d88200; } /* LiteralNumber */ .chroma .m { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberBin */ .chroma .mb { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberFloat */ .chroma .mf { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberHex */ .chroma .mh { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberInteger */ .chroma .mi { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberIntegerLong */ .chroma .il { - color: #ae81ff + color: #ae81ff; } /* LiteralNumberOct */ .chroma .mo { - color: #ae81ff + color: #ae81ff; } /* Operator */ .chroma .o { - color: #f92672 + color: #f92672; } /* OperatorWord */ .chroma .ow { - color: #f92672 + color: #f92672; } /* Punctuation */ .chroma .p { - color: #111111 + color: #111111; } /* Comment */ .chroma .c { - color: #75715e + color: #75715e; } /* CommentHashbang */ .chroma .ch { - color: #75715e + color: #75715e; } /* CommentMultiline */ .chroma .cm { - color: #75715e + color: #75715e; } /* CommentSingle */ .chroma .c1 { - color: #75715e + color: #75715e; } /* CommentSpecial */ .chroma .cs { - color: #75715e + color: #75715e; } /* CommentPreproc */ .chroma .cp { - color: #75715e + color: #75715e; } /* CommentPreprocFile */ .chroma .cpf { - color: #75715e + color: #75715e; } /* Generic */ -.chroma .g {} - +.chroma .g { +} /* GenericDeleted */ -.chroma .gd {} - +.chroma .gd { + color: #f92672; +} /* GenericEmph */ .chroma .ge { - font-style: italic + font-style: italic; } - /* GenericError */ -.chroma .gr {} - +.chroma .gr { +} /* GenericHeading */ -.chroma .gh {} - +.chroma .gh { +} /* GenericInserted */ -.chroma .gi {} - +.chroma .gi { + color: #7ca727; +} /* GenericOutput */ -.chroma .go {} - +.chroma .go { +} /* GenericPrompt */ -.chroma .gp {} - +.chroma .gp { +} /* GenericStrong */ .chroma .gs { - font-weight: bold + font-weight: bold; } - /* GenericSubheading */ -.chroma .gu {} - +.chroma .gu { + color: #75715e; +} /* GenericTraceback */ -.chroma .gt {} - +.chroma .gt { +} /* GenericUnderline */ -.chroma .gl {} - +.chroma .gl { +} /* TextWhitespace */ -.chroma .w {} \ No newline at end of file +.chroma .w { +} diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore index ca4d540..6db5459 100644 --- a/exampleSite/.gitignore +++ b/exampleSite/.gitignore @@ -22,6 +22,9 @@ _testmain.go *.exe *.test -/public -/themes +public +themes +resources + +assets/jsconfig.json .DS_Store diff --git a/exampleSite/content/page/about.md b/exampleSite/content/page/about/index.md similarity index 100% rename from exampleSite/content/page/about.md rename to exampleSite/content/page/about/index.md diff --git a/exampleSite/content/page/archives.md b/exampleSite/content/page/archives/index.md similarity index 100% rename from exampleSite/content/page/archives.md rename to exampleSite/content/page/archives/index.md diff --git a/exampleSite/content/page/links/index.md b/exampleSite/content/page/links/index.md new file mode 100644 index 0000000..9e29bf3 --- /dev/null +++ b/exampleSite/content/page/links/index.md @@ -0,0 +1,37 @@ +--- +title: Links +links: + - title: GitHub + description: GitHub is the world's largest software development platform. + website: https://github.com + image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + - title: TypeScript + description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. + website: https://www.typescriptlang.org + image: ts-logo-128.jpg +menu: + main: + weight: -50 + params: + icon: link + +comments: false +--- + +To use this feature, add `links` section to frontmatter. + +This page's frontmatter: + +```yaml +links: + - title: GitHub + description: GitHub is the world's largest software development platform. + website: https://github.com + image: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png + - title: TypeScript + description: TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. + website: https://www.typescriptlang.org + image: ts-logo-128.jpg +``` + +`image` field accepts both local and external images. \ No newline at end of file diff --git a/exampleSite/content/page/links/ts-logo-128.jpg b/exampleSite/content/page/links/ts-logo-128.jpg new file mode 100644 index 0000000..85e3323 Binary files /dev/null and b/exampleSite/content/page/links/ts-logo-128.jpg differ diff --git a/exampleSite/content/page/search.md b/exampleSite/content/page/search/index.md similarity index 100% rename from exampleSite/content/page/search.md rename to exampleSite/content/page/search/index.md diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md index 8c53bc2..85fdcff 100644 --- a/exampleSite/content/post/markdown-syntax/index.md +++ b/exampleSite/content/post/markdown-syntax/index.md @@ -113,6 +113,16 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou {{< /highlight >}} +#### Diff code block + +```diff +[dependencies.bevy] +git = "https://github.com/bevyengine/bevy" +rev = "11f52b8c72fc3a568e8bb4a4cd1f3eb025ac2e13" +- features = ["dynamic"] ++ features = ["jpeg", "dynamic"] +``` + ## List Types #### Ordered List diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 9217ea3..ac2e51a 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -29,6 +29,10 @@ article: lastUpdatedOn: other: Dernière mise à jour le + readingTime: + one: "{{ .Count }} minute de lecture" + other: "{{ .Count }} minutes de lecture" + notFound: title: other: Page non trouvée diff --git a/i18n/ko.yaml b/i18n/ko.yaml index d9916cd..b2202e6 100644 --- a/i18n/ko.yaml +++ b/i18n/ko.yaml @@ -1,15 +1,42 @@ toggleMenu: other: 메뉴 여닫기 +darkMode: + other: 다크 모드 + +list: + page: + one: "{{ .Count }} 페이지" + other: "{{ .Count }} 페이지" + + section: + other: 섹션 + + subsection: + one: 서브섹션 + other: 서브섹션 + article: + back: + other: 뒤로가기 + + tableOfContents: + other: 목차 + relatedContents: other: 관련 글 + lastUpdatedOn: other: "마지막 수정: " + + readingTime: + one: "{{ .Count }} 분 정도" + other: "{{ .Count }} 분 정도" notFound: title: other: 찾을 수 없음 + subtitle: other: 페이지를 찾을 수 없습니다. @@ -19,6 +46,7 @@ widget: other: 보관함 more: other: 더보기 + tagCloud: title: other: 태그 @@ -26,8 +54,10 @@ widget: search: title: other: 검색 + placeholder: other: 검색어를 입력하세요... + resultTitle: other: "#PAGES_COUNT 페이지 (#TIME_SECONDS 초)" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8b21c52..8ce42e9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,6 +15,10 @@ {{ define "main" }} {{ partial "article/article.html" . }} + {{ if .Params.links }} + {{ partial "article/components/links" . }} + {{ end }} + {{ partial "article/components/related-contents" . }} {{ if not (eq .Params.comments false) }} diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html index 0f5a216..376512a 100644 --- a/layouts/partials/article-list/compact.html +++ b/layouts/partials/article-list/compact.html @@ -29,6 +29,7 @@ {{ .Title }} {{ else }} Featured image of post {{ .Title }} diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html index 0fbf812..4ec5d57 100644 --- a/layouts/partials/article-list/tile.html +++ b/layouts/partials/article-list/tile.html @@ -20,8 +20,9 @@ Featured image of post {{ .context.Title }} {{ else }} diff --git a/layouts/partials/article/components/links.html b/layouts/partials/article/components/links.html new file mode 100644 index 0000000..118dbb3 --- /dev/null +++ b/layouts/partials/article/components/links.html @@ -0,0 +1,26 @@ +
+ {{ range $i, $link := .Params.links }} +
+ +
+

+ {{- $link.title -}} +

+
+ {{ with $link.description }} + {{ . }} + {{ else }} + {{ $link.website }} + {{ end }} +
+
+ + {{ with $link.image }} +
+ +
+ {{ end }} +
+
+ {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index ba38464..a2baf19 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -1,4 +1,4 @@ -{{- $ThemeVersion := "3.5.0" -}} +{{- $ThemeVersion := "3.6.0" -}}