🔖 Release v1.3.0

pull/155/head v1.3.0
James Panther 2021-09-29 10:56:25 +10:00
commit 34d10e04a5
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
16 changed files with 633 additions and 434 deletions

5
.github/labeller.yml vendored 100644
View File

@ -0,0 +1,5 @@
i18n:
- i18n/*
documentation:
- exampleSite/content/*

17
.github/workflows/label.yml vendored 100644
View File

@ -0,0 +1,17 @@
name: Labeller
on: [pull_request_target]
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Label
uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeller.yml

View File

@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
## [1.3.0] - 2021-09-29
### Added
- Site logo support
- Chinese translation ([#2](https://github.com/jpanther/congo/pull/2))
### Changed
- Upgrade to Tailwind v2.2.16
## [1.2.1] - 2021-08-26 ## [1.2.1] - 2021-08-26
### Added ### Added
@ -95,7 +106,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Advanced customisation using simple Tailwind colour definitions and styles - Advanced customisation using simple Tailwind colour definitions and styles
- Fully documented - Fully documented
[unreleased]: https://github.com/jpanther/Congo/compare/v1.2.1...HEAD [unreleased]: https://github.com/jpanther/Congo/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/jpanther/Congo/compare/v1.2.1...v1.3.0
[1.2.1]: https://github.com/jpanther/Congo/compare/v1.2.0...v1.2.1 [1.2.1]: https://github.com/jpanther/Congo/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/jpanther/Congo/compare/v1.1.1...v1.2.0 [1.2.0]: https://github.com/jpanther/Congo/compare/v1.1.1...v1.2.0
[1.1.1]: https://github.com/jpanther/congo/compare/v1.1.0...v1.1.1 [1.1.1]: https://github.com/jpanther/congo/compare/v1.1.0...v1.1.1

View File

@ -1,6 +1,6 @@
/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */ /*! Congo v1.3.0 | MIT License | https://github.com/jpanther/congo */
/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */ /*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
@ -477,6 +477,18 @@ button,
cursor: pointer; cursor: pointer;
} }
/**
* Override legacy focus reset from Normalize with modern Firefox focus styles.
*
* This is actually an improvement over the new defaults in Firefox in our testing,
* as it triggers the better focus styles even for links, which still use a dotted
* outline in Firefox by default.
*/
:-moz-focusring {
outline: auto;
}
table { table {
border-collapse: collapse; border-collapse: collapse;
} }
@ -2701,6 +2713,10 @@ body a, body button {
flex-direction: row; flex-direction: row;
} }
.sm\:items-center {
align-items: center;
}
.sm\:px-14 { .sm\:px-14 {
padding-left: 3.5rem; padding-left: 3.5rem;
padding-right: 3.5rem; padding-right: 3.5rem;

View File

@ -1,4 +1,4 @@
/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */ /*! Congo v1.3.0 | MIT License | https://github.com/jpanther/congo */
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;

View File

@ -6,6 +6,7 @@
# https://jpanther.github.io/congo/docs/configuration/#theme-parameters # https://jpanther.github.io/congo/docs/configuration/#theme-parameters
colorScheme = "congo" colorScheme = "congo"
# logo = "img/logo.jpg"
# description = "My awesome website" # description = "My awesome website"
# mainSections = ["section1", "section2"] # mainSections = ["section1", "section2"]
# robots = "" # robots = ""

View File

@ -21,7 +21,7 @@ Use one of the existing theme stylesheets as a template. You are free to define
## Overriding the stylesheet ## Overriding the stylesheet
Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to overrid the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `assets/css/` folder. Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to override the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `assets/css/` folder.
The `custom.css` file will be minified by Hugo and loaded automatically after all the other theme styles which means anything in your custom file will take precedence over the defaults. The `custom.css` file will be minified by Hugo and loaded automatically after all the other theme styles which means anything in your custom file will take precedence over the defaults.
@ -54,7 +54,7 @@ npm run dev
This will automatically output a CSS file to `/themes/congo/assets/css/compiled/main.css`. This will automatically output a CSS file to `/themes/congo/assets/css/compiled/main.css`.
{{< alert >}} {{< alert >}}
**Note:** You should make manual edits to the compiled CSS file. **Note:** You should not make manual edits to the compiled CSS file.
{{< /alert >}} {{< /alert >}}
Now whenever you make a change, the CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Asset files will be minified by Hugo at site build time. Now whenever you make a change, the CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Asset files will be minified by Hugo at site build time.

View File

@ -54,7 +54,8 @@ Many of the article defaults here can be overridden on a per article basis by sp
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
|Name|Type|Default|Description| |Name|Type|Default|Description|
| --- | --- | --- | --- | | --- | --- | --- | --- |
|`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`.| |`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`. Refer to [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) for more details.|
|`logo`|string|_Not set_|The relative path to the site logo file within the Hugo assets folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|`description`|string|_Not set_|The description of the website for metadata purposes.| |`description`|string|_Not set_|The description of the website for metadata purposes.|
|`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| |`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|

View File

@ -2,7 +2,7 @@
title: "Users" title: "Users"
date: 2020-08-14 date: 2020-08-14
draft: false draft: false
description: "Some real life Congo examples." description: "Some real-life Congo examples."
slug: "users" slug: "users"
tags: ["users"] tags: ["users"]
showDate: false showDate: false
@ -16,7 +16,8 @@ Real websites that are built with Congo.
{{< /lead >}} {{< /lead >}}
| Website | Details | | Website | Details |
| ------------------------------------------------ | ---------------------------- | | -------------------------------------------- | ---------------------------- |
| [jamespanther.com](https://www.jamespanther.com) | Personal site - Theme author | | [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
| [zekeriyaay.com](https://zekeriyaay.com) | Personal cheat sheets site |
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md). **Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md).

View File

@ -16,7 +16,7 @@ error:
404_description: "It seems that the page you've requested does not exist." 404_description: "It seems that the page you've requested does not exist."
footer: footer:
powered_by: "Powered by" powered_by: "Powered by {{ .Hugo }}"
list: list:
externalurl_title: "Link to external site" externalurl_title: "Link to external site"

33
i18n/zh.yaml 100644
View File

@ -0,0 +1,33 @@
article:
anchor_label: "锚点"
draft: "草稿"
edit_title: "编辑内容"
reading_time:
other: "{{ .Count }} 分钟"
reading_time_title: "预计阅读"
author:
byline_title: "作者"
error:
404_title: "找不到网页 :confused:"
404_error: "404 错误"
404_description: "您请求的页面似乎不存在。"
footer:
powered_by: "由 {{ .Hugo }} 强力驱动"
list:
externalurl_title: "链接到外部网站"
no_articles: "这里还没有任何文章可以列出。"
sharing:
email: "通过电子邮件发送"
facebook: "分享到 Facebook"
linkedin: "分享到 LinkedIn"
reddit: "提交到 Reddit"
twitter: "分享到 Twitter"
shortcode:
recent_articles: "最近的文章"
icon_none: "未找到图标。"

View File

@ -23,7 +23,7 @@
{{ end }} {{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }} {{ if and .Draft .Site.Params.article.showDraftLabel }}
<div class="ml-2"> <div class="ml-2">
{{ partial "badge.html" "Draft" }} {{ partial "badge.html" (i18n "article.draft" | emojify) }}
</div> </div>
{{ end }} {{ end }}
{{ if templates.Exists "partials/extend-article-link.html" }} {{ if templates.Exists "partials/extend-article-link.html" }}

View File

@ -12,22 +12,14 @@
{{/* Theme attribution */}} {{/* Theme attribution */}}
{{ if .Site.Params.attribution | default true }} {{ if .Site.Params.attribution | default true }}
<p class="text-xs text-neutral-300 dark:text-neutral-600"> <p class="text-xs text-neutral-300 dark:text-neutral-600">
{{ i18n "footer.powered_by" }} {{ $hugo := printf `<a class="hover:underline hover:underline-primary-300 hover:text-primary-400"
<a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>
class="hover:underline hover:underline-primary-300 hover:text-primary-400"
href="https://gohugo.io/"
target="_blank"
rel="noopener noreferrer"
>Hugo</a
>
&amp; &amp;
<a <a class="hover:underline hover:underline-primary-300 hover:text-primary-400" href="https://git.io/hugo-congo"
class="hover:underline hover:underline-primary-300 hover:text-primary-400" target="_blank" rel="noopener noreferrer">Congo</a>`
href="https://git.io/hugo-congo" }}
target="_blank"
rel="noopener noreferrer" {{ i18n "footer.powered_by" (dict "Hugo" $hugo) | safeHTML }}
>Congo</a
>
</p> </p>
{{ end }} {{ end }}
{{/* Extend footer - eg. for extra scripts, etc. */}} {{/* Extend footer - eg. for extra scripts, etc. */}}

View File

@ -1,11 +1,25 @@
<header class="flex justify-between py-6 font-semibold sm:py-10 text-neutral-800 dark:text-neutral"> <header
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-800 dark:text-neutral"
>
<div> <div>
{{ if .Site.Params.Logo -}}
{{ $logo := resources.Get .Site.Params.Logo }}
{{ if $logo }}
<img
src="{{ $logo.RelPermalink }}"
width="{{ div $logo.Width 2 }}"
height="{{ div $logo.Height 2 }}"
alt="{{ .Site.Title }}"
/>
{{ end }}
{{ else }}
<a <a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small" class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
rel="me" rel="me"
href="{{ "/" | relURL }}" href="{{ "/" | relURL }}"
>{{ .Site.Title }}</a >{{ .Site.Title }}</a
> >
{{- end }}
</div> </div>
<nav> <nav>
<ul class="flex flex-col list-none sm:flex-row"> <ul class="flex flex-col list-none sm:flex-row">

895
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "hugo-congo-theme", "name": "hugo-congo-theme",
"version": "1.2.1", "version": "1.3.0",
"description": "Congo theme for Hugo", "description": "Congo theme for Hugo",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -29,6 +29,6 @@
"prettier": "^2.3.2", "prettier": "^2.3.2",
"prettier-plugin-go-template": "^0.0.11", "prettier-plugin-go-template": "^0.0.11",
"tailwind-underline-utils": "^1.1.3", "tailwind-underline-utils": "^1.1.3",
"tailwindcss": "^2.2.7" "tailwindcss": "^2.2.16"
} }
} }