diff --git a/README.md b/README.md index a6906e1..cd4ff8f 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,11 @@ Start a new journey for Hugo's theme of NexT. # Our Vision -Make `NexT` theme is easily & powerful. \ No newline at end of file +Make `NexT` theme is easily & powerful. + +# Preview + +| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status | +| :---: | :---: | :---: | :---: | :---: | :---: | +| Preliminary | [Gemini](https://hugo-next-dev.vercel.app/) | [Muse](https://hugo-next-dev.vercel.app/muse/) | [Mist](https://hugo-next-dev.vercel.app/mist/) | [Pisces](https://hugo-next-dev.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-dev&style=for-the-badge) | +| Production | [Gemini](https://hugo-next-prod.vercel.app/) | [Muse](https://hugo-next-prod.vercel.app/muse/) | [Mist](https://hugo-next-prod.vercel.app/mist/) | [Pisces](https://hugo-next-prod.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-prod&style=for-the-badge) | \ No newline at end of file diff --git a/assets/css/_common/components/post/post-footer.scss b/assets/css/_common/components/post/post-footer.scss index be39fda..cecdd95 100644 --- a/assets/css/_common/components/post/post-footer.scss +++ b/assets/css/_common/components/post/post-footer.scss @@ -15,10 +15,9 @@ margin: 24px 0 12px 0; &:after{ - content: $post_end_line_tip; font-size: .9em; font-weight: bold; - background: #fff; + background: var(--content-bg-color); padding: 0 5px; z-index:2; } diff --git a/assets/css/_common/components/third-party/gitter.scss b/assets/css/_common/components/third-party/gitter.scss index 8a1986e..7301c37 100644 --- a/assets/css/_common/components/third-party/gitter.scss +++ b/assets/css/_common/components/third-party/gitter.scss @@ -1,7 +1,7 @@ @if $gitter_enable { .gitter-open-chat-button { - $alignment : sidebar-toggle-alignment(false); - #{$alignment[0]}: auto !important; - #{$alignment[1]}: 10px !important; + $alignment: sidebar-toggle-alignment(false); + #{nth($alignment, 1)}: auto !important; + #{nth($alignment, 2)}: 10px !important; } } diff --git a/assets/css/main.scss b/assets/css/main.scss index 244128f..b214e0a 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -79,7 +79,6 @@ $motion_trans_post_header: {{ $P.motion.transition.postHeader }}; $post_edit_enable: {{ $P.postEdit.enable }}; $post_meta_item_text: {{ $P.postMeta.itemText }}; $reward_settings_animation: {{ $P.rewardSets.animation }}; -$post_end_line_tip: "{{ $P.postFooter.endLineTip }}"; $post_end_tag_icon: {{ $P.postFooter.tagIcon }}; // TODO find the paramters diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index f3c505c..8e8ed5a 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -7,11 +7,14 @@ baseURL: / theme: hugo-theme-next +canonifyURLs: true paginate: 8 enableEmoji: true +relativeurls: true + # Make markdown content support HTML syntax markup: goldmark: @@ -41,11 +44,38 @@ languages: languageCode: en hasCJKLanguage: false weight: 2 + menus: + main: + - identifier: home + name: Home + url: / + pre: home + weight: 1 + - identifier: about + name: About + url: /about.html + pre: user + weight: 2 + - identifier: archives + name: Archives + url: /posts + pre: archive + weight: 3 + - identifier: commonweal + name: Commonweal 404 + url: /404.html + pre: heartbeat + weight: 4 params: author: Theme NexT subtitle: Theme for Hugo description: Stay easily & powerful. keywords: Hugo,NexT,Theme,easily,powerful + linksSets: + icon: fa fa-globe + title: Friends + postFooter: + endLineTip: "~ End of this post ~" #-------------------------------------- # Menus Settings @@ -911,8 +941,8 @@ params: # Gitter Support # For more information: https://gitter.im gitter: - enable: false - room: + enable: true + room: hugo-next/community # --------------------------------------------------------------- diff --git a/exampleSite/content/about.en.md b/exampleSite/content/about.en.md new file mode 100644 index 0000000..a9ae199 --- /dev/null +++ b/exampleSite/content/about.en.md @@ -0,0 +1,19 @@ +--- +title: "About Hugo NexT Origination" +description: "" + +date: 2022-06-09T20:12:52+08:00 +lastmod: 2022-06-09T20:12:52+08:00 + +share: false +followme: false +nav: false +copyright: false +url: about.html +--- + +`Hugo NexT` organization is formed by many friends from all over the world who love the theme and style of `NexT`, so that this theme can continue to be carried forward in the `Hugo` engine. Welcome to join us! + +# Our vision + +Keep the classic black-and-white collocation of `NexT` & keep easily and powerful features. \ No newline at end of file diff --git a/exampleSite/content/posts/hello-world.en.md b/exampleSite/content/posts/hello-world.en.md new file mode 100644 index 0000000..dc49e61 --- /dev/null +++ b/exampleSite/content/posts/hello-world.en.md @@ -0,0 +1,58 @@ +--- +title: "Hello World" +description: "Descript some skill for Hugo build site." + +lastmod: 2022-06-03T16:43:23+08:00 +date: 2022-06-02T11:52:03+08:00 + +categories: + - Blog +tags: + - Hugo + - Startup + +url: hello-world.html +weight: 2 +--- + +> "Use keyword which is `weight` make post sticky to top." + +[Hugo](https://gohugo.io/) is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. + + + +## Quick Start + +### New Post + +```shell +$ hugo new hello-world.md +``` + +More info: [Front formats](https://gohugo.io/content-management/formats/) + +### Server + +```shell +$ hugo server +``` + +More info: [Hugo Server](https://gohugo.io/commands/hugo_server/) + +### Build + +```shell +$ hugo +``` + +More Info: [Hugo Build](https://gohugo.io/commands/hugo/) + +### Deploy + +```shell +$ hugo deploy +``` + +More Info:[Hugo Deployment](https://gohugo.io/commands/hugo_deploy/) + +Enjoy your Hugo journey & good luck for you! \ No newline at end of file diff --git a/i18n/en.yaml b/i18n/en.yaml index 2c969d6..4fef79f 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,16 +1,20 @@ #-------------------------------------- # English Version #-------------------------------------- -posts: +Posts: other: Posts -tag: +Tag: other: Tag -tags: +Tags: other: Tags -category: +TagTitle: + other: Tag Collection +Category: other: Category -categories: +Categories: other: Categories +CateTitle: + other: Classify Management AllSome: other: "All {{ .Some }}" @@ -27,17 +31,17 @@ SymbolComma: SymbolPeriod: other: "." -SitePostsTitle: +SbPostsLable: other: "Posts" -SiteCatesTitle: +SbCatesTitle: other: "Categories" -SiteTagsTitle: +SbTagsTitle: other: "Tags" TableOfContents: other: "TOC" SiteOverview: other: "Overview" -RSSTitle: +RSSLable: other: "RSS Subscribe" CCLinkTitle: other: "Creative Commons" @@ -46,16 +50,13 @@ BackTopLabel: TagsCounterTitle: zero: No tags - one: 1 tag in total other: "{{ .Count }} tags in total" CatesCounterTitle: zero: No categories - one: 1 category in total other: "{{ .Count }} categories in total" ArchiveCounterTitle: zero: No posts. - one: 1 post. - other: "{{ .Count }} posts in total." + other: "{{ .Count }} posts in total" PostArchiveCheersUm: other: Um.. @@ -75,13 +76,15 @@ PostArchiveKeepOn: PostStickyTitle: other: Strickys PostPublishDate: - other: "Publish" + other: "Publish on" PostPublishTime: other: "Create Time" PostLastModDate: - other: "Update" + other: "Update on" PostLastModTime: other: "Modify Time" +PostCategory: + other: "Classify at" PostWords: other: "Words" PostWordCount: @@ -92,8 +95,6 @@ PostReadTime: other: "{{- .ReadingTime -}}min" PostViews: other: "Views" -PostCatg: - other: "Categories" PostTag: other: "Tags" PostReadMore: diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 94bf85b..eec90dc 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -2,16 +2,20 @@ # 中文版本 #-------------------------------------- -posts: +Posts: other: 文章 -tag: +Tag: other: 标签 -tags: +Tags: other: 标签 -category: +TagTitle: + other: 标签集锦 +Category: other: 分类 -categories: +Categories: other: 分类 +CateTitle: + other: 分类管理 AllSome: other: "所有 {{ .Some }}" @@ -80,6 +84,8 @@ PostLastModDate: other: 更新于 PostLastModTime: other: 修改时间 +PostCategory: + other: "分类于" PostWords: other: 字数 PostWordCount: @@ -90,8 +96,6 @@ PostReadTime: other: "{{- .ReadingTime -}}分钟" PostViews: other: 浏览 -PostCatgs: - other: 分类 PostTags: other: 标签 PostReadMore: @@ -131,7 +135,7 @@ RewardBitcoin: PostCommentTitle: other: 评论交流 -UserVistorsLabel: +VisitorsLabel: other: 总访客量 PageViewsLabel: other: 总访问量 diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 50992ab..a4b5e10 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -4,7 +4,16 @@ {{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} {{- define "main" }}
- +
+

+ {{- if eq .Data.Plural "categories" }} + {{- T "CateTitle" }} + {{- else if eq .Data.Plural "tags" }} + {{- T "TagTitle" }} + {{- end }} +

+
+
{{- if eq .Data.Plural "categories" }} {{ $cats := .Site.Taxonomies.categories }}
@@ -33,7 +42,9 @@ {{ $randNums := (seq 10) }} {{- range $name, $items := $tags }} {{ $name }} - ({{ len $items }}) + + ({{ len $items }}) + {{- end }}
diff --git a/layouts/partials/_thirdparty/chat/gitter.html b/layouts/partials/_thirdparty/chat/gitter.html new file mode 100644 index 0000000..763650a --- /dev/null +++ b/layouts/partials/_thirdparty/chat/gitter.html @@ -0,0 +1,6 @@ + + \ No newline at end of file diff --git a/layouts/partials/head/style.html b/layouts/partials/head/style.html index 8584a0e..7b54c39 100644 --- a/layouts/partials/head/style.html +++ b/layouts/partials/head/style.html @@ -22,4 +22,12 @@ {{- $scss = $scss | resources.ExecuteAsTemplate "main.scss" . }} {{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} - \ No newline at end of file + +{{- if .IsPage }} + +{{- end }} + \ No newline at end of file diff --git a/layouts/partials/header/brand.html b/layouts/partials/header/brand.html index 29d36b9..0c1a8ad 100644 --- a/layouts/partials/header/brand.html +++ b/layouts/partials/header/brand.html @@ -13,7 +13,7 @@ {{ $title }} {{- end }} - +

{{ $title }}

diff --git a/layouts/partials/header/menus.html b/layouts/partials/header/menus.html index b286f3e..d4ba243 100644 --- a/layouts/partials/header/menus.html +++ b/layouts/partials/header/menus.html @@ -6,7 +6,7 @@ {{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }} {{- $active = or $active (eq .URL "/")}}
  • {{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} {{- $ccText := .Site.Params.creativeCommons.license | upper }} - {{- $lang := .Scratch.Get "lang" }} - {{- $ccLink := printf "%s" (substr $lang 0 2) $ccText }} + {{- $ccLink := printf "%s" (substr .Site.LanguageCode 0 2) $ccText }} {{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
  • diff --git a/layouts/partials/post/header.html b/layouts/partials/post/header.html index ca492b3..f78979d 100644 --- a/layouts/partials/post/header.html +++ b/layouts/partials/post/header.html @@ -12,7 +12,7 @@ {{- else }} - + {{- end }} {{- else }} {{- .Title }} diff --git a/layouts/partials/post/header_meta/categories.html b/layouts/partials/post/header_meta/categories.html index e0dc326..6daa8e2 100644 --- a/layouts/partials/post/header_meta/categories.html +++ b/layouts/partials/post/header_meta/categories.html @@ -4,10 +4,10 @@ - + {{- range (first 1 .Params.categories) }} - diff --git a/layouts/partials/widgets.html b/layouts/partials/widgets.html index 327c075..1bdf4ef 100644 --- a/layouts/partials/widgets.html +++ b/layouts/partials/widgets.html @@ -21,6 +21,10 @@ {{- end }} {{- end }} +{{- if .Site.Params.gitter.enable }} + {{ partial "_thirdparty/chat/gitter.html" . }} +{{- end }} + \ No newline at end of file