Skip to content

Commit

Permalink
🔖 Release v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpanther committed May 8, 2022
2 parents fb32b72 + c5a6b6f commit 9569c24
Show file tree
Hide file tree
Showing 18 changed files with 262 additions and 407 deletions.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ updates:
prefix: "📌"
labels:
- "dependencies"
- "npm"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand All @@ -25,4 +24,3 @@ updates:
prefix: "👷"
labels:
- "dependencies"
- "actions"
30 changes: 30 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-stale: 30
days-before-close: 14
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: >
This issue has been automatically marked as stale because it has not had any recent activity.
If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open.
This issue will automactically close in 14 days if no further activity occurs.
stale-pr-message: >
This pull request has been automatically marked as stale because it has not had any recent activity.
Please review the PR history and add a reply with any requested information. If no information has been requested, it may be that this contribution does not fit with the project objectives, or does not adhere to the [contributing guidelines](https://github.com/jpanther/congo/blob/dev/CONTRIBUTING.md). If this is in error, please add a reply with further details.
This PR will automactically close in 14 days if no further activity occurs.
26 changes: 25 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [2.2.0] - 2022-05-09

### Added

- Finnish translation ([#185](https://github.com/jpanther/congo/pull/185))

### Changed

- Updated French translation ([#178](https://github.com/jpanther/congo/pull/178))
- Analytics partial now checks `hugo.IsProduction` instead of `.Site.IsServer` before including scripts ([#179](https://github.com/jpanther/congo/issues/179))
- Upgrade to Tailwind v3.0.24 ([#176](https://github.com/jpanther/congo/pull/176))
- Upgrade to Mermaid v9.0.1 ([#183](https://github.com/jpanther/congo/pull/183))
- Upgrade to Fuse.js v6.6.1 ([#189](https://github.com/jpanther/congo/pull/189))

### Fixed

- Code blocks are rendered incorrectly in RTL languages ([#164](https://github.com/jpanther/congo/issues/164))
- Scroll to top link overlaps footer menu on mobile devices when there are several links ([#172](https://github.com/jpanther/congo/issues/172))

### Removed

- `hugo.Generator` from HTML `<head>` so that the [default Hugo generator behaviour](https://gohugo.io/getting-started/configuration/#disablehugogeneratorinject) works as expected ([#179](https://github.com/jpanther/congo/issues/179))

## [2.1.3] - 2022-04-12

### Added
Expand Down Expand Up @@ -398,7 +421,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
- Fully documented

[unreleased]: https://github.com/jpanther/congo/compare/v2.1.3...HEAD
[unreleased]: https://github.com/jpanther/congo/compare/v2.2.0...HEAD
[2.2.0]: https://github.com/jpanther/congo/compare/v2.1.3...v2.2.0
[2.1.3]: https://github.com/jpanther/congo/compare/v2.1.2...v2.1.3
[2.1.2]: https://github.com/jpanther/congo/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/jpanther/congo/compare/v2.1.0...v2.1.1
Expand Down
20 changes: 6 additions & 14 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Congo v2.1.3 | MIT License | https://github.com/jpanther/congo */
/*! Congo v2.2.0 | MIT License | https://github.com/jpanther/congo */

/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com */
/*! tailwindcss v3.0.24 | MIT License | https://tailwindcss.com */

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
Expand Down Expand Up @@ -1467,16 +1467,12 @@ body a, body button {
top: 110vh;
}

.bottom-\[-8\.25rem\] {
bottom: -8.25rem;
}

.bottom-\[-5\.5rem\] {
bottom: -5.5rem;
.bottom-0 {
bottom: 0px;
}

.top-\[calc\(100vh-5rem\)\] {
top: calc(100vh - 5rem);
.top-\[calc\(100vh-5\.5rem\)\] {
top: calc(100vh - 5.5rem);
}

.top-20 {
Expand Down Expand Up @@ -2612,10 +2608,6 @@ body a, body button {
}

@media (min-width: 640px) {
.sm\:bottom-\[-8rem\] {
bottom: -8rem;
}

.sm\:mb-0 {
margin-bottom: 0px;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Congo v2.1.3 | MIT License | https://github.com/jpanther/congo */
/*! Congo v2.2.0 | MIT License | https://github.com/jpanther/congo */

@tailwind base;
@tailwind components;
Expand Down
3 changes: 3 additions & 0 deletions assets/js/rtl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
window.addEventListener("DOMContentLoaded", (event) => {
document.querySelectorAll("pre, .highlight-wrapper").forEach((tag) => (tag.dir = "auto"));
});
6 changes: 3 additions & 3 deletions assets/lib/fuse/fuse.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/lib/mermaid/mermaid.min.js

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions exampleSite/content/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Note that the variable names provided in this table use dot notation to simplify
|`theme`|`"congo"`|When using Hugo Modules this config value should be removed. For all other installation types, this must be set to `congo` for the theme to function.|
|`baseURL`|_Not set_|The URL to the root of the website.|
|`defaultContentLanguage`|`"en"`|This value determines the default language of theme components and content. Refer to the [language and i18n](#language-and-i18n) section below for supported language codes.|
|`enableRobotsTXT`|`true`|When enabled a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. Set to `false` if you wish to provide your own file.|
|`enableRobotsTXT`|`true`|When enabled, a `robots.txt` file will be created in the site root that allows search engines to crawl the entire site. If you prefer to provide your own pre-made `robots.txt`, set to `false` and place your file in the `static` directory. For complete control, you may provide a [custom layout]({{< ref "content-examples#custom-layouts" >}}) to generate this file.|
|`paginate`|`10`|The number of articles listed on each page of the article listing.|
|`summaryLength`|`0`|The number of words that are used to generate the article summary when one is not provided in the [front matter]({{< ref "front-matter" >}}). A value of `0` will use the first sentence. This value has no effect when summaries are hidden.|
|`outputs.home`|`["HTML", "RSS", "JSON"]`|The output formats that are generated for the site. Congo requires HTML, RSS and JSON for all theme components to work correctly.|
Expand All @@ -52,6 +52,7 @@ The theme currently supports the following languages by default:
| :gb: English | `en` |
| :bangladesh: Bengali | `bn` |
| :cn: Chinese | `zh` |
| :finland: Finnish | `fi` |
| :fr: French | `fr` |
| :de: German | `de` |
| :israel: Hebrew | `he` |
Expand Down Expand Up @@ -116,7 +117,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.|
|`showAppearanceSwitcher`|`false`|Whether or not to show the appearance switcher in the site footer. The browser's local storage is used to persist the visitor's preference.|
|`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.|
|`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks.|
|`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.|
|`logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|`mainSections`|_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`|_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.|
Expand Down Expand Up @@ -152,3 +153,9 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`verification.pinterest`|_Not set_|The site verification string provided by Pinterest to be included in the site metadata.|
|`verification.yandex`|_Not set_|The site verification string provided by Yandex to be included in the site metadata.|
<!-- prettier-ignore-end -->

## Other configuration files

The theme also includes a `markup.toml` configuration file. This file contains some important parameters that ensure that Hugo is correctly configured to generate sites built with Congo.

Always ensure this file is present in the config directory and that the required values are set. Failure to do so may cause certain features to fucntion incorrectly and could result in unintended behaviour.
27 changes: 14 additions & 13 deletions exampleSite/content/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ showEdit: false
Real websites that are built with Congo.
{{< /lead >}}

| Website | Details |
| --------------------------------------------------- | ---------------------------- |
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
| [srisco.dev](https://srisco.dev) | Personal site |
| [theophile-roos.fr](https://theophile-roos.fr) | Personal site |
| [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site |
| [leif.io](https://leif.io/) | Personal site and Tech blog |
| [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog |
| [OCram85.com](https://ocram85.com) | Personal site and Blog |
| [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog |
| [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog |
| [jeremic.ca](https://jeremic.ca) | Personal site and Blog |
| [rohn.tech](https://rohn.tech) | Personal site |
| Website | Details |
| ---------------------------------------------------------------------- | ---------------------------- |
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
| [srisco.dev](https://srisco.dev) | Personal site |
| [theophile-roos.fr](https://theophile-roos.fr) | Personal site |
| [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site |
| [leif.io](https://leif.io/) | Personal site and Tech blog |
| [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog |
| [OCram85.com](https://ocram85.com) | Personal site and Blog |
| [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog |
| [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog |
| [jeremic.ca](https://jeremic.ca) | Personal site and Blog |
| [rohn.tech](https://rohn.tech) | Personal site |
| [klimafreundlicher-kochen.de](https://www.klimafreundlicher-kochen.de) | Food blog (in German) |

**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md).
55 changes: 55 additions & 0 deletions i18n/fi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
article:
anchor_label: "Ankkuri"
date: "{{ .Date }}"
date_updated: "Päivitetty: {{ .Date }}"
draft: "Luonnos"
edit_title: "Muokkaa sisältöä"
reading_time:
one: "{{ .Count }} minuutti"
other: "{{ .Count }} minuuttia"
reading_time_title: "Lukuaika"
table_of_contents: "Sisällysluettelo"
word_count:
one: "{{ .Count }} sana"
other: "{{ .Count }} sanaa"

author:
byline_title: "Kirjoittaja"

code:
copy: "Kopioi"
copied: "Kopioitu"

error:
404_title: "Sivua ei löydy :confused:"
404_error: "Virhe 404"
404_description: "Valitettavasti pyytämääsi sivua ei ole olemassa."

footer:
dark_appearance: "Vaihda tummaan teemaan"
light_appearance: "Vaihda valoisaan teemaan"
powered_by: "Voimanlähteenä {{ .Hugo }} &amp; {{ .Congo }}"

list:
externalurl_title: "Linkki ulkoiselle sivustolle"
no_articles: "Täällä ei vielä ole listattavia artikkeleita, vielä."

nav:
scroll_to_top_title: "Takaisin ylös"
skip_to_main: "Siirry pääsisältöön"

search:
open_button_title: "Hae (/)"
close_button_title: "Sulje (Esc)"
input_placeholder: "Haku"

sharing:
email: "Lähetä sähköpostilla"
facebook: "Jaa Facebookissa"
linkedin: "Jaa LinkedInissä"
pinterest: "Kiinnitä Pinterestiin"
reddit: "Lähetä Reddittiin"
twitter: "Twiittaa Twitterissä"

shortcode:
recent_articles: "Viimeaikaiset"
12 changes: 6 additions & 6 deletions i18n/fr.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
article:
anchor_label: "Ancre"
date: "{{ .Date }}"
date_updated: "Mis à jour: {{ .Date }}"
date_updated: "Mis à jour : {{ .Date }}"
draft: "Brouillon"
edit_title: "Editer"
edit_title: "Modifier"
reading_time:
one: "{{ .Count }} min"
other: "{{ .Count }} mins"
Expand Down Expand Up @@ -32,16 +32,16 @@ footer:

list:
externalurl_title: "Lien d'article externe."
no_articles: "Il n'y a pas encore d'articles ici."
no_articles: "Il n'y a pas encore d'article ici."

nav:
scroll_to_top_title: "Faire défiler jusqu'au bas de la page"
skip_to_main: "Aller au contenu"

search:
open_button_title: "Chercher (/)"
open_button_title: "Rechercher (/)"
close_button_title: "Fermer (Esc)"
input_placeholder: "Chercher"
input_placeholder: "Rechercher"

sharing:
email: "Envoyer par email"
Expand All @@ -52,4 +52,4 @@ sharing:
twitter: "Tweeter"

shortcode:
recent_articles: "Recent"
recent_articles: "Articles récents"
44 changes: 21 additions & 23 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,28 @@
>
</div>
{{- partial "header.html" . -}}
<main id="main-content" class="relative grow">
{{- block "main" . }}{{- end }}
{{ if and (.Site.Params.showScrollToTop | default true) (gt .WordCount 200) }}
<div
class="absolute top-[110vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none {{ if .Site.Menus.footer -}}
bottom-[-8.25rem] sm:bottom-[-8rem]
{{- else -}}
bottom-[-5.5rem]
{{- end }}"
>
<a
href="#the-top"
class="w-12 h-12 sticky pointer-events-auto top-[calc(100vh-5rem)] bg-neutral/50 dark:bg-neutral-800/50 backdrop-blur rounded-full text-xl flex items-center justify-center text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}"
title="{{ i18n "nav.scroll_to_top_title" }}"
<div class="relative">
<main id="main-content" class="grow">
{{- block "main" . }}{{- end }}
{{ if and (.Site.Params.showScrollToTop | default true) (gt .WordCount 200) }}
<div
class="absolute top-[110vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none bottom-0"
>
&uarr;
</a>
</div>
<a
href="#the-top"
class="w-12 h-12 sticky pointer-events-auto top-[calc(100vh-5.5rem)] bg-neutral/50 dark:bg-neutral-800/50 backdrop-blur rounded-full text-xl flex items-center justify-center text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}"
title="{{ i18n "nav.scroll_to_top_title" }}"
>
&uarr;
</a>
</div>
{{ end }}
</main>
{{ if .Site.Params.enableSearch | default false }}
{{- partial "search.html" . -}}
{{ end }}
</main>
{{ if .Site.Params.enableSearch | default false }}
{{- partial "search.html" . -}}
{{ end }}
{{- partial "footer.html" . -}}
{{- partial "footer.html" . -}}
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion layouts/partials/analytics.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if not .Site.IsServer }}
{{ if hugo.IsProduction }}
{{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }}
<script defer src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}"></script>
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
<ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.footer }}
<li class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
<li
class="mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0"
>
<a
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
href="{{ .URL }}"
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
{{ $jsCode := resources.Get "js/code.js" }}
{{ $assets.Add "js" (slice $jsCode) }}
{{ end }}
{{ if .Site.Params.rtl | default false }}
{{ $jsRTL := resources.Get "js/rtl.js" }}
{{ $assets.Add "js" (slice $jsRTL) }}
{{ end }}
{{ if $assets.Get "js" }}
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}" integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied" }}"></script>
Expand Down Expand Up @@ -93,10 +97,6 @@
{{ template "_internal/twitter_cards.html" . }}
{{/* Schema */}}
{{ partial "schema.html" . }}
{{/* Generator */}}
{{ if .Site.Params.attribution | default true }}
{{ hugo.Generator }}
{{ end }}
{{/* Me */}}
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}" />{{ end }}
{{ with .Site.Author.links }}
Expand Down
Loading

0 comments on commit 9569c24

Please sign in to comment.