mirror of https://github.com/jpanther/congo.git
commit
668805d3d5
|
@ -1,5 +1,9 @@
|
||||||
{
|
{
|
||||||
|
"htmlWhitespaceSensitivity": "css",
|
||||||
"printWidth": 100,
|
"printWidth": 100,
|
||||||
|
"singleQuote": false,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "es5",
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to Congo will be documented in this file.
|
||||||
|
|
||||||
|
Things that need attention when upgrading from a prior version are marked ⚠️.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## [1.1.0] - 2020-08-18
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Breadcrumbs
|
||||||
|
- i18n support
|
||||||
|
- Recent articles partial
|
||||||
|
- CSS transitions
|
||||||
|
- Hugo module support
|
||||||
|
- JSON-LD structured metadata
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- ⚠️ Renamed parameter: `homepage.showList` -> `homepage.showRecent`
|
||||||
|
- ⚠️ Renamed parameter: `homepage.listSections` -> `mainSections`
|
||||||
|
- ⚠️ Consolidated author configuration parameters into `config.toml`
|
||||||
|
- General style tweaks to enhance design consistency
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- URLs being incorrect in some cases when the site is deployed in a subfolder
|
||||||
|
|
||||||
|
## [1.0.0] - 2020-08-16
|
||||||
|
|
||||||
|
### Initial release 🎉
|
||||||
|
|
||||||
|
- Built with Tailwind CSS JIT for minified stylesheets without any excess code
|
||||||
|
- Fully responsive layout
|
||||||
|
- Dark mode (auto-switching based upon browser)
|
||||||
|
- Highly customisable configuration
|
||||||
|
- Multiple homepage layouts
|
||||||
|
- Flexible with any content types, taxonomies and menus
|
||||||
|
- Ability to link to posts on third-party websites
|
||||||
|
- Diagrams and visualisations using Mermaid JS
|
||||||
|
- SVG icons from FontAwesome 5
|
||||||
|
- Heading anchors, Buttons, Badges and more
|
||||||
|
- HTML and Emoji support in articles
|
||||||
|
- SEO friendly with links for sharing to social media
|
||||||
|
- RSS feeds
|
||||||
|
- Fathom Analytics and Google Analytics support
|
||||||
|
- Favicons support
|
||||||
|
- Comments support
|
||||||
|
- Advanced customisation using simple Tailwind colour definitions and styles
|
||||||
|
- Fully documented
|
||||||
|
|
||||||
|
[unreleased]: https://github.com/jpanther/Congo/compare/v1.1.0...HEAD
|
||||||
|
[1.1.0]: https://github.com/jpanther/Congo/compare/v1.0.0...v1.1.0
|
||||||
|
[1.0.0]: https://github.com/jpanther/Congo/releases/tag/v1.0.0
|
|
@ -69,19 +69,12 @@ A few things you need to set for a new installation:
|
||||||
|
|
||||||
baseURL = "https://your_domain.com"
|
baseURL = "https://your_domain.com"
|
||||||
languageCode = "en-AU"
|
languageCode = "en-AU"
|
||||||
|
|
||||||
title = "My awesome website"
|
title = "My awesome website"
|
||||||
```
|
|
||||||
|
|
||||||
It's also useful to set the author configuration in the `config/_default/author.toml` file. You can also add links to your profiles here to enable them in the theme.
|
|
||||||
|
|
||||||
```toml
|
|
||||||
# config/_default/author.toml
|
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Your name"
|
name = "Your name"
|
||||||
links = [
|
links = [
|
||||||
{ twitter = "https://twitter.com/username" }
|
{ twitter = "https://twitter.com/jpanther" }
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
|
|
||||||
|
body a,
|
||||||
|
body button {
|
||||||
|
@apply transition;
|
||||||
|
}
|
||||||
|
|
||||||
/* Scale SVG icons to text size */
|
/* Scale SVG icons to text size */
|
||||||
.icon svg {
|
.icon svg {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
@ -29,6 +34,15 @@
|
||||||
@apply mt-0 last:mb-0;
|
@apply mt-0 last:mb-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Article pagination */
|
||||||
|
.article-pagination a:hover .article-pagination-title {
|
||||||
|
@apply underline underline-primary-500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.article-pagination a:hover .article-pagination-direction {
|
||||||
|
@apply text-primary-700 dark:text-primary-400;
|
||||||
|
}
|
||||||
|
|
||||||
/* -- Chroma Highlight -- */
|
/* -- Chroma Highlight -- */
|
||||||
/* Background */
|
/* Background */
|
||||||
.prose .chroma {
|
.prose .chroma {
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
# -- Site Author Details --
|
|
||||||
# To display the author box below each article, configure the settings below.
|
|
||||||
# The author image should be placed inside the `/static` folder.
|
|
||||||
# Uncomment any links to enable them. The icons will be displayed in the order listed.
|
|
||||||
|
|
||||||
[author]
|
|
||||||
# name = "Your name here"
|
|
||||||
# image = "/img/author.jpg"
|
|
||||||
# links = [
|
|
||||||
# { email = "mailto:hello@your_domain.com" },
|
|
||||||
# { link = "https://link-to-some-website.com/" },
|
|
||||||
# { codepen = "https://codepen.io/username" },
|
|
||||||
# { dev = "https://dev.to/username" },
|
|
||||||
# { discord = "https://discord.gg/invitecode" },
|
|
||||||
# { dribbble = "https://dribbble.com/username" },
|
|
||||||
# { facebook = "https://facebook.com/username" },
|
|
||||||
# { github = "https://github.com/username" },
|
|
||||||
# { gitlab = "https://gitlab.com/username" },
|
|
||||||
# { instagram = "https://instagram.com/username" },
|
|
||||||
# { keybase = "https://keybase.io/username" },
|
|
||||||
# { lastfm = "https://lastfm.com/user/username" },
|
|
||||||
# { linkedin = "https://linkedin.com/in/username" },
|
|
||||||
# { mastodon = "https://mastodon.instance/@username" },
|
|
||||||
# { medium = "https://medium.com/username" },
|
|
||||||
# { reddit = "https://reddit.com/user/username" },
|
|
||||||
# { slack = "https://workspace.url/team/userid" },
|
|
||||||
# { snapchat = "https://snapchat.com/add/username" },
|
|
||||||
# { soundcloud = "https://soundcloud.com/username" },
|
|
||||||
# { steam = "https://steamcommunity.com/profiles/userid" },
|
|
||||||
# { tiktok = "https://tiktok.com/@username" },
|
|
||||||
# { twitch = "https://twitch.tv/username" },
|
|
||||||
# { twitter = "https://twitter.com/username" },
|
|
||||||
# { youtube = "https://youtube.com/username" },
|
|
||||||
# ]
|
|
|
@ -1,23 +1,45 @@
|
||||||
# -- Site Configuration --
|
# -- Site Configuration --
|
||||||
|
# Refer to the theme docs for more details about each of these parameters.
|
||||||
|
# https://jpanther.github.io/Congo/docs/getting-started/
|
||||||
|
|
||||||
theme = "congo"
|
theme = "congo"
|
||||||
|
|
||||||
# Speficiy the base URL for the website.
|
|
||||||
# baseURL = "https://your_domain.com/"
|
# baseURL = "https://your_domain.com/"
|
||||||
|
|
||||||
# The language code of the language that the website is written in.
|
|
||||||
# This can be a base language (ie. "en") or a specific variant (ie. "en-AU").
|
|
||||||
languageCode = "en"
|
languageCode = "en"
|
||||||
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
# The website title. This will be displayed in the site header.
|
|
||||||
title = "Congo"
|
title = "Congo"
|
||||||
|
|
||||||
# A default copyright message is generated automatically.
|
|
||||||
# Uncomment the line below to provide a custom copyright Markdown string.
|
|
||||||
# copyright = "Copy, _right?_ :thinking_face:"
|
# copyright = "Copy, _right?_ :thinking_face:"
|
||||||
|
|
||||||
# To automatically convert strings such as :bang: to emoji, set this to true.
|
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
|
|
||||||
# Congo will generate a robots file that allows search engines to index
|
|
||||||
# the entire site. If you don't want a robots file, set this to false.
|
|
||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
|
|
||||||
|
[author]
|
||||||
|
# name = "Your name here"
|
||||||
|
# image = "img/author.jpg"
|
||||||
|
# links = [
|
||||||
|
# { email = "mailto:hello@your_domain.com" },
|
||||||
|
# { link = "https://link-to-some-website.com/" },
|
||||||
|
# { codepen = "https://codepen.io/username" },
|
||||||
|
# { dev = "https://dev.to/username" },
|
||||||
|
# { discord = "https://discord.gg/invitecode" },
|
||||||
|
# { dribbble = "https://dribbble.com/username" },
|
||||||
|
# { facebook = "https://facebook.com/username" },
|
||||||
|
# { github = "https://github.com/username" },
|
||||||
|
# { gitlab = "https://gitlab.com/username" },
|
||||||
|
# { instagram = "https://instagram.com/username" },
|
||||||
|
# { keybase = "https://keybase.io/username" },
|
||||||
|
# { lastfm = "https://lastfm.com/user/username" },
|
||||||
|
# { linkedin = "https://linkedin.com/in/username" },
|
||||||
|
# { mastodon = "https://mastodon.instance/@username" },
|
||||||
|
# { medium = "https://medium.com/username" },
|
||||||
|
# { reddit = "https://reddit.com/user/username" },
|
||||||
|
# { slack = "https://workspace.url/team/userid" },
|
||||||
|
# { snapchat = "https://snapchat.com/add/username" },
|
||||||
|
# { soundcloud = "https://soundcloud.com/username" },
|
||||||
|
# { steam = "https://steamcommunity.com/profiles/userid" },
|
||||||
|
# { tiktok = "https://tiktok.com/@username" },
|
||||||
|
# { twitch = "https://twitch.tv/username" },
|
||||||
|
# { twitter = "https://twitter.com/username" },
|
||||||
|
# { youtube = "https://youtube.com/username" },
|
||||||
|
# ]
|
||||||
|
|
|
@ -2,17 +2,21 @@
|
||||||
# These options control how the theme functions and allow you to
|
# These options control how the theme functions and allow you to
|
||||||
# customise the display of your website.
|
# customise the display of your website.
|
||||||
#
|
#
|
||||||
# Refer to the README for more details about each of these parameters.
|
# Refer to the theme docs for more details about each of these parameters.
|
||||||
|
# https://jpanther.github.io/Congo/docs/configuration/#theme-parameters
|
||||||
|
|
||||||
|
# description = "My awesome website"
|
||||||
|
# mainSections = ["section1", "section2"]
|
||||||
|
|
||||||
[homepage]
|
[homepage]
|
||||||
layout = "page" # valid options: page, profile, custom
|
layout = "page" # valid options: page, profile, custom
|
||||||
showList = false
|
showRecent = false
|
||||||
listSections = ["blog"]
|
|
||||||
|
|
||||||
[article]
|
[article]
|
||||||
showDate = true
|
showDate = true
|
||||||
dateFormat = "2 January 2006"
|
dateFormat = "2 January 2006"
|
||||||
showAuthor = true
|
showAuthor = true
|
||||||
|
showBreadcrumbs = false
|
||||||
showDraftLabel = true
|
showDraftLabel = true
|
||||||
showHeadingAnchors = true
|
showHeadingAnchors = true
|
||||||
showPagination = true
|
showPagination = true
|
||||||
|
@ -20,6 +24,7 @@
|
||||||
# sharingLinks = ["facebook", "twitter", "reddit", "linkedin", "email"]
|
# sharingLinks = ["facebook", "twitter", "reddit", "linkedin", "email"]
|
||||||
|
|
||||||
[list]
|
[list]
|
||||||
|
showBreadcrumbs = false
|
||||||
groupByYear = true
|
groupByYear = true
|
||||||
|
|
||||||
[taxonomy]
|
[taxonomy]
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
{
|
{
|
||||||
"email": {
|
"email": {
|
||||||
"icon": "email",
|
"icon": "email",
|
||||||
"title": "Send via email",
|
"title": "sharing.email",
|
||||||
"url": "mailto:?body=%s&subject=%s"
|
"url": "mailto:?body=%s&subject=%s"
|
||||||
},
|
},
|
||||||
"facebook": {
|
"facebook": {
|
||||||
"icon": "facebook",
|
"icon": "facebook",
|
||||||
"title": "Share on Facebook",
|
"title": "sharing.facebook",
|
||||||
"url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
|
"url": "https://www.facebook.com/sharer/sharer.php?u=%s"e=%s"
|
||||||
},
|
},
|
||||||
"linkedin": {
|
"linkedin": {
|
||||||
"icon": "linkedin",
|
"icon": "linkedin",
|
||||||
"title": "Share on LinkedIn",
|
"title": "sharing.linkedin",
|
||||||
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
|
"url": "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s"
|
||||||
},
|
},
|
||||||
"reddit": {
|
"reddit": {
|
||||||
"icon": "reddit",
|
"icon": "reddit",
|
||||||
"title": "Submit to Reddit",
|
"title": "sharing.reddit",
|
||||||
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
|
"url": "https://reddit.com/submit/?url=%s&resubmit=true&title=%s"
|
||||||
},
|
},
|
||||||
"twitter": {
|
"twitter": {
|
||||||
"icon": "twitter",
|
"icon": "twitter",
|
||||||
"title": "Tweet on Twitter",
|
"title": "sharing.twitter",
|
||||||
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
|
"url": "https://twitter.com/intent/tweet/?url=%s&text=%s"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,16 @@
|
||||||
# as it does not contain all the required theme settings!
|
# as it does not contain all the required theme settings!
|
||||||
#
|
#
|
||||||
# Refer to the theme docs for configuration instructions if you're unsure.
|
# Refer to the theme docs for configuration instructions if you're unsure.
|
||||||
# https://github.com/jpanther/Congo#readme
|
# https://jpanther.github.io/Congo/docs/
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
|
|
||||||
baseURL = "https://example.com"
|
baseURL = "https://jpanther.github.io/Congo/"
|
||||||
theme = "Congo"
|
theme = "Congo"
|
||||||
languageCode = "en-AU"
|
languageCode = "en-AU"
|
||||||
|
defaultContentLanguage = "en"
|
||||||
title = "Congo"
|
title = "Congo"
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
|
relativeURLs = true
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Congo"
|
name = "Congo"
|
||||||
|
@ -28,11 +30,15 @@ enableEmoji = true
|
||||||
|
|
||||||
[params.homepage]
|
[params.homepage]
|
||||||
layout = "custom"
|
layout = "custom"
|
||||||
showList = true
|
showRecent = true
|
||||||
listSections = "samples"
|
mainSections = ["samples"]
|
||||||
|
|
||||||
[params.list]
|
[params.list]
|
||||||
groupByYear = false
|
groupByYear = false
|
||||||
|
showBreadcrumbs = true
|
||||||
|
|
||||||
|
[params.article]
|
||||||
|
showBreadcrumbs = true
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Docs"
|
name = "Docs"
|
||||||
|
|
|
@ -7,6 +7,21 @@ description: "This is a demo of the Congo theme for Hugo."
|
||||||
A simple, lightweight theme for Hugo built with Tailwind CSS.
|
A simple, lightweight theme for Hugo built with Tailwind CSS.
|
||||||
{{< /lead >}}
|
{{< /lead >}}
|
||||||
|
|
||||||
|
<div class="flex px-4 py-1 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
||||||
|
<span class="flex items-center pr-3 text-primary-400">
|
||||||
|
{{< icon "exclamation-triangle" >}}
|
||||||
|
</span>
|
||||||
|
<span class="flex items-center justify-between flex-grow dark:text-gray-300">
|
||||||
|
<span class="prose">This is a demo of the <code id="layout">page</code> layout.</span>
|
||||||
|
<button
|
||||||
|
class="px-4 py-1 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||||
|
onclick="switchLayout()"
|
||||||
|
>
|
||||||
|
Switch layout ↻
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation](/docs/). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
|
This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation](/docs/). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts.
|
||||||
|
|
||||||
Explore the [sample pages](/samples/) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/Congo) or read the [Installation guide](/docs/installation/) to get started.
|
Explore the [sample pages](/samples/) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/Congo) or read the [Installation guide](/docs/installation/) to get started.
|
||||||
|
|
|
@ -21,7 +21,33 @@ The default theme configuration is documented in each file so you can freely adj
|
||||||
As outlined in the [installation instructions](/docs/installation/#set-up-your-configuration-files), you should adjust your theme configuration by modifying the files in the `config/_default/` folder of your Hugo project and delete the `config.toml` file in your project root.
|
As outlined in the [installation instructions](/docs/installation/#set-up-your-configuration-files), you should adjust your theme configuration by modifying the files in the `config/_default/` folder of your Hugo project and delete the `config.toml` file in your project root.
|
||||||
{{< /alert >}}
|
{{< /alert >}}
|
||||||
|
|
||||||
## Parameters
|
## Site Configuration
|
||||||
|
|
||||||
|
Standard Hugo configuration variables are respected throughout the theme, however there are some specific things that should be configured for the best experience.
|
||||||
|
|
||||||
|
The site configuration is managed through the `config/_default/config.toml` file. The table below outlines all the settings that the Congo takes advantage of.
|
||||||
|
|
||||||
|
Note that the variable names provided in this table use dot notation to simplify the TOML data structure (ie. `author.name` refers to `[author] name`).
|
||||||
|
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
|Name|Type|Default|Description|
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
|`theme`|string|`"congo"`|This must be set to `"congo"` for the theme to function.|
|
||||||
|
|`baseURL`|string|_Not set_|The URL to the root of the website.|
|
||||||
|
|`languageCode`|string|`"en"`|The language of the website for site metadata purposes. It can be a top-level language (ie. `"en"`) or a sub-variant (ie. `"en-AU"`)."|
|
||||||
|
|`defaultContentLanguage`|string|`"en"`|This value determines the language of theme components."|
|
||||||
|
|`title`|string|`"Congo"`|The title of the website. This will be displayed in the site header and footer.|
|
||||||
|
|`copyright`|string|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.
|
||||||
|
|`enableEmoji`|boolean|`true`|Whether emoji strings in content should be converted to emoji symbols.|
|
||||||
|
|`enableRobotsTXT`|boolean|`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.|
|
||||||
|
|`author.name`|string|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.|
|
||||||
|
|`author.image`|string|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `static/` folder.|
|
||||||
|
|`author.links`|array of objects|_Not set_|The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`.|
|
||||||
|
|`[permalinks]`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/urls/#permalinks) for permalink configuration.|
|
||||||
|
|`[taxonomies]`||_Not set_|Refer to the [Hugo docs](https://gohugo.io/content-management/taxonomies/) for taxonomy configuration.|
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
## Theme Parameters
|
||||||
|
|
||||||
Congo provides a large number of configuration parameters that control how the theme functions. The table below outlines every available parameter in the `config/_default/params.toml` file.
|
Congo provides a large number of configuration parameters that control how the theme functions. The table below outlines every available parameter in the `config/_default/params.toml` file.
|
||||||
|
|
||||||
|
@ -30,18 +56,21 @@ 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|
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
|
|`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.|
|
||||||
|`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout](/docs/homepage-layout/) section for more details.|
|
|`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout](/docs/homepage-layout/) section for more details.|
|
||||||
|`homepage.showList`|boolean|`false`|Whether or not recent articles are listed on the homepage beneath the page content. Refer to the [Recent Articles](/docs/homepage-layout/#recent-articles) docs for more details.|
|
|`homepage.showRecent`|boolean|`false`|Whether or not to display the recent articles list on the homepage.|
|
||||||
|`homepage.listSections`|array of strings|`["blog"]`|The sections of content to include in the recent list when `homepage.showList` is `true`.|
|
|
||||||
|`article.showDate`|boolean|`true`|Whether or not article dates are displayed.|
|
|`article.showDate`|boolean|`true`|Whether or not article dates are displayed.|
|
||||||
|`article.dateFormat`|string|`"2 January 2006"`|How article dates are formatted. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|
|`article.dateFormat`|string|`"2 January 2006"`|How article dates are formatted. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|
||||||
|`article.showAuthor`|boolean|`true`|Whether or not the author box is displayed in the article footer.|
|
|`article.showAuthor`|boolean|`true`|Whether or not the author box is displayed in the article footer.|
|
||||||
|
|`article.showBreadcrumbs`|boolean|`false`|Whether or not breadcrumbs are displayed in the article header.|
|
||||||
|`article.showDraftLabel`|boolean|`true`|Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`.|
|
|`article.showDraftLabel`|boolean|`true`|Whether or not the draft indicator is shown next to articles when site is built with `--buildDrafts`.|
|
||||||
|`article.showHeadingAnchors`|boolean|`true`|Whether or not heading anchor links are displayed alongside headings within articles.|
|
|`article.showHeadingAnchors`|boolean|`true`|Whether or not heading anchor links are displayed alongside headings within articles.|
|
||||||
|`article.showPagination`|boolean|`true`|Whether or not the next/previous article links are displayed in the article footer.|
|
|`article.showPagination`|boolean|`true`|Whether or not the next/previous article links are displayed in the article footer.|
|
||||||
|`article.showReadingTime`|boolean|`true`|Whether or not article reading times are displayed.|
|
|`article.showReadingTime`|boolean|`true`|Whether or not article reading times are displayed.|
|
||||||
|`article.sharingLinks`|array of strings|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|
|`article.sharingLinks`|array of strings|_Not set_|Which sharing links to display at the end of each article. When not provided, or set to `false` no links will be displayed.|
|
||||||
|`list.groupByYear`|boolean|`true`|Whether or not articles are grouped under years in the article listing.|
|
|`list.showBreadcrumbs`|boolean|`false`|Whether or not breadcrumbs are displayed in the header on list pages.|
|
||||||
|
|`list.groupByYear`|boolean|`true`|Whether or not articles are grouped by year on list pages.|
|
||||||
|`sitemap.excludedKinds`|array of strings|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
|`sitemap.excludedKinds`|array of strings|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
||||||
|`taxonomy.showTermCount`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|
|`taxonomy.showTermCount`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|
||||||
|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs](#analyticshtml) below for more details.|
|
|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs](#analyticshtml) below for more details.|
|
||||||
|
|
|
@ -22,22 +22,20 @@ A few things you need to set for a new installation:
|
||||||
|
|
||||||
baseURL = "https://your_domain.com"
|
baseURL = "https://your_domain.com"
|
||||||
languageCode = "en-AU"
|
languageCode = "en-AU"
|
||||||
|
|
||||||
title = "My awesome website"
|
title = "My awesome website"
|
||||||
```
|
|
||||||
|
|
||||||
It's also useful to set the author configuration in the `config/_default/author.toml` file. You can also add links to your profiles here to enable them in the theme.
|
|
||||||
|
|
||||||
```toml
|
|
||||||
# config/_default/author.toml
|
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Your name"
|
name = "Your name"
|
||||||
|
image = "img/author.jpg"
|
||||||
links = [
|
links = [
|
||||||
{ twitter = "https://twitter.com/username" }
|
{ twitter = "https://twitter.com/username" }
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `static/` folder. Links will be displayed in the order they are listed.
|
||||||
|
|
||||||
|
Further detail about these configuration options is covered in the [Configuration](/docs/configuration/) section.
|
||||||
|
|
||||||
## Organising content
|
## Organising content
|
||||||
|
|
||||||
By default, Congo doesn't force you to use a particular content type. In doing so you are free to define your content as you wish. You might prefer _pages_ for a static site, _posts_ for a blog, or _projects_ for a portfolio.
|
By default, Congo doesn't force you to use a particular content type. In doing so you are free to define your content as you wish. You might prefer _pages_ for a static site, _posts_ for a blog, or _projects_ for a portfolio.
|
||||||
|
|
|
@ -39,9 +39,11 @@ To enable the custom layout, set `homepage.layout = "custom"` in the `params.tom
|
||||||
|
|
||||||
With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You can use whatever HTML, Tailwind, or Hugo templating functions to define your layout.
|
With the configuration value set, create a new `custom.html` file and place it in `layouts/partials/home/custom.html`. Now whatever is in the `custom.html` file will be placed in the content area of the site homepage. You can use whatever HTML, Tailwind, or Hugo templating functions to define your layout.
|
||||||
|
|
||||||
|
To include recent articles on the custom layout, use the `recent-articles.html` partial.
|
||||||
|
|
||||||
## Recent articles
|
## Recent articles
|
||||||
|
|
||||||
All homepage layouts have the option of displaying recent articles below the main page content. To enable this, simply set the `homepage.showList` setting to `true` in the `params.toml` configuration file.
|
All homepage layouts have the option of displaying recent articles below the main page content. To enable this, simply set the `homepage.showRecent` setting to `true` in the `params.toml` configuration file.
|
||||||
|
|
||||||
![Profile layout with recent articles](home-profile-list.jpg)
|
![Profile layout with recent articles](home-profile-list.jpg)
|
||||||
|
|
||||||
|
|
|
@ -1,38 +1,27 @@
|
||||||
<script type="text/javascript">
|
|
||||||
function switchLayout() {
|
|
||||||
var pageDiv = document.getElementById("page");
|
|
||||||
var profileDiv = document.getElementById("profile");
|
|
||||||
var layoutSpan = document.getElementById("layout");
|
|
||||||
if (pageDiv.style.display === "none") {
|
|
||||||
pageDiv.style.display = "block";
|
|
||||||
profileDiv.style.display = "none";
|
|
||||||
layoutSpan.innerHTML = "page";
|
|
||||||
} else {
|
|
||||||
pageDiv.style.display = "none";
|
|
||||||
profileDiv.style.display = "block";
|
|
||||||
layoutSpan.innerHTML = "profile";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="flex px-4 py-3 mb-8 text-base rounded-md bg-primary-100 dark:bg-primary-900">
|
|
||||||
<span class="flex items-center pr-3 text-primary-400">
|
|
||||||
{{ partial "icon.html" "exclamation-triangle" }}
|
|
||||||
</span>
|
|
||||||
<span class="flex items-center justify-between flex-grow no-prose dark:text-gray-300">
|
|
||||||
<span>This is a demo of the `<code id="layout" class="">page</code>` layout.</span>
|
|
||||||
<button
|
|
||||||
class="font-bold px-4 py-2 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
|
||||||
onclick="switchLayout()"
|
|
||||||
>
|
|
||||||
Switch layout ↻
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="page">
|
<div id="page">
|
||||||
{{ partial "partials/home/page.html" . }}
|
{{ partial "partials/home/page.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<div id="profile" style="display: none">
|
<div id="profile" class="hidden h-full">
|
||||||
{{ partial "partials/home/profile.html" . }}
|
{{ partial "partials/home/profile.html" . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function switchLayout() {
|
||||||
|
const pageDiv = document.getElementById("page");
|
||||||
|
const profileDiv = document.getElementById("profile");
|
||||||
|
const layoutCode = document.querySelectorAll("code[id=layout]");
|
||||||
|
if (pageDiv.style.display === "none") {
|
||||||
|
pageDiv.style.display = "block";
|
||||||
|
profileDiv.style.display = "none";
|
||||||
|
layoutCode.forEach(function (el) {
|
||||||
|
el.innerText = "page";
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
pageDiv.style.display = "none";
|
||||||
|
profileDiv.style.display = "block";
|
||||||
|
layoutCode.forEach(function (el) {
|
||||||
|
el.innerText = "profile";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
article:
|
||||||
|
anchor_label: "Anchor"
|
||||||
|
draft: "Draft"
|
||||||
|
reading_time:
|
||||||
|
one: "{{ .Count }} min"
|
||||||
|
other: "{{ .Count }} mins"
|
||||||
|
reading_time_title: "Reading time"
|
||||||
|
|
||||||
|
author:
|
||||||
|
byline_title: "Author"
|
||||||
|
|
||||||
|
error:
|
||||||
|
404_title: "Page Not Found :confused:"
|
||||||
|
404_error: "Error 404"
|
||||||
|
404_description: "It seems that the page you've requested does not exist."
|
||||||
|
|
||||||
|
footer:
|
||||||
|
powered_by: "Powered by"
|
||||||
|
|
||||||
|
list:
|
||||||
|
externalurl_title: "Link to external site"
|
||||||
|
no_articles: "There's no articles to list here yet."
|
||||||
|
|
||||||
|
sharing:
|
||||||
|
email: "Send via email"
|
||||||
|
facebook: "Share on Facebook"
|
||||||
|
linkedin: "Share on LinkedIn"
|
||||||
|
reddit: "Submit to Reddit"
|
||||||
|
twitter: "Tweet on Twitter"
|
||||||
|
|
||||||
|
shortcode:
|
||||||
|
recent_articles: "Recent"
|
||||||
|
icon_none: "Icon not found."
|
|
@ -1,7 +1,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<h1 class="mb-3 text-4xl font-extrabold">Page Not Found 🤷♂️</h1>
|
<h1 class="mb-3 text-4xl font-extrabold">{{ i18n "error.404_title" | emojify }}</h1>
|
||||||
<p class="mt-8 mb-12 text-gray-400 dark:text-gray-500">Error 404</p>
|
<p class="mt-8 mb-12 text-gray-400 dark:text-gray-500">{{ i18n "error.404_error" | emojify }}</p>
|
||||||
<div class="prose dark:prose-light">
|
<div class="prose dark:prose-light">
|
||||||
<p>It seems that the page you've requested does not exist.</p>
|
<p>{{ i18n "error.404_description" | emojify }}</p>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<a class="heading-anchor" href="#{{ .Anchor | safeURL }}" aria-label="Anchor">#</a>{{ end }}</h{{ .Level }}>
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}<a class="heading-anchor" href="#{{ .Anchor | safeURL }}" aria-label="{{ i18n "article.anchor_label" }}">#</a>{{ end }}</h{{ .Level }}>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "section-heading.html" . }}
|
{{ partial "section-header.html" . }}
|
||||||
{{ if gt .Pages 0 }}
|
{{ if gt .Pages 0 }}
|
||||||
<section>
|
<section>
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<section class="mt-10 prose dark:prose-light">
|
<section class="mt-10 prose dark:prose-light">
|
||||||
<p class="py-8 border-t">
|
<p class="py-8 border-t">
|
||||||
<em>There's no articles to list here yet.</em>
|
<em>{{ i18n "list.no_articles" | emojify }}</em>
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<article class="max-w-prose">
|
<article class="max-w-prose">
|
||||||
<header>
|
<header>
|
||||||
|
{{ if .Site.Params.article.showBreadcrumbs | default false }}
|
||||||
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
{{ end }}
|
||||||
<h1 class="mt-0 text-4xl font-extrabold">{{ .Title | emojify }}</h1>
|
<h1 class="mt-0 text-4xl font-extrabold">{{ .Title | emojify }}</h1>
|
||||||
<div class="mt-8 mb-12 text-base text-gray-400 dark:text-gray-500">
|
<div class="mt-8 mb-12 text-base text-gray-400 dark:text-gray-500">
|
||||||
{{ partial "article-meta.html" . }}
|
{{ partial "article-meta.html" . }}
|
||||||
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
||||||
<span
|
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
|
||||||
class="ml-2 px-1 py-[2px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
|
|
||||||
>
|
|
||||||
Draft
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "section-heading.html" . }}
|
{{ partial "section-header.html" . }}
|
||||||
<section class="flex flex-wrap -mx-2 overflow-hidden">
|
<section class="flex flex-wrap -mx-2 overflow-hidden">
|
||||||
{{ range .Data.Terms }}
|
{{ range .Data.Terms }}
|
||||||
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
|
<article class="w-full px-2 my-3 overflow-hidden sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5">
|
||||||
<h2>
|
<h2>
|
||||||
<a class="text-xl font-medium hover:underline" href="{{ .Page.Permalink }}"
|
<a
|
||||||
|
class="text-xl font-medium hover:underline underline-primary-500"
|
||||||
|
href="{{ .Page.Permalink }}"
|
||||||
>{{ .Page.Title }}</a
|
>{{ .Page.Title }}</a
|
||||||
>
|
>
|
||||||
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
|
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
|
||||||
<span class="text-base text-gray-400">
|
<span class="text-base text-gray-400">
|
||||||
<span class="px-1">·</span>
|
<span class="px-1 text-primary-500">·</span>
|
||||||
{{ .Count }}
|
{{ .Count }}
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "section-heading.html" . }}
|
{{ partial "section-header.html" . }}
|
||||||
<section>
|
<section>
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
|
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
|
||||||
|
|
|
@ -5,12 +5,4 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "partials/home/page.html" . }}
|
{{ partial "partials/home/page.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if .Site.Params.homepage.showList | default false }}
|
|
||||||
<section>
|
|
||||||
<h2 class="text-2xl font-extrabold">Recent</h2>
|
|
||||||
{{ range first 5 (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.homepage.listSections)).Pages }}
|
|
||||||
{{ partial "article-link.html" . }}
|
|
||||||
{{ end }}
|
|
||||||
</section>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
<span
|
<span
|
||||||
class="text-sm cursor-default"
|
class="text-sm cursor-default"
|
||||||
style="vertical-align: super;"
|
style="vertical-align: super;"
|
||||||
title="Link to external site"
|
title="{{ i18n "list.externalurl_title" }}"
|
||||||
>↗</span
|
>↗</span
|
||||||
>
|
>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a class="hover:underline" href="{{ .Permalink }}">{{ .Title }}</a>
|
<a class="hover:underline underline-primary-500" href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
||||||
{{ partial "badge.html" "Draft" }}
|
{{ partial "badge.html" "Draft" }}
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
(.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true))
|
(.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true))
|
||||||
(ne .ReadingTime 0)
|
(ne .ReadingTime 0)
|
||||||
}}
|
}}
|
||||||
<span class="px-1">·</span>
|
<span class="px-1 text-primary-500">·</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
|
{{ if and (.Params.showReadingTime | default (.Site.Params.article.showReadingTime | default true)) (ne .ReadingTime 0) }}
|
||||||
<span title="Reading time">
|
<span title="{{ i18n "article.reading_time_title" }}">
|
||||||
{{ .ReadingTime }}
|
{{ i18n "article.reading_time" .ReadingTime | emojify }}
|
||||||
min{{ if gt .ReadingTime 1 }}s{{ end }}
|
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
|
{{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }}
|
||||||
{{ if or .NextInSection .PrevInSection }}
|
{{ if or .NextInSection .PrevInSection }}
|
||||||
<div class="pt-8">
|
<div class="pt-8 article-pagination">
|
||||||
<hr class="border-gray-300 border-dotted dark:border-gray-600" />
|
<hr class="border-gray-300 border-dotted dark:border-gray-600" />
|
||||||
<div class="flex justify-between pt-3">
|
<div class="flex justify-between pt-3">
|
||||||
<span>
|
<span>
|
||||||
{{ if .NextInSection }}
|
{{ if .NextInSection }}
|
||||||
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
||||||
<span class="mr-3">←</span>
|
<span class="mr-3 article-pagination-direction">←</span>
|
||||||
<span class="flex flex-col">
|
<span class="flex flex-col">
|
||||||
<span class="button__text">{{ .NextInSection.Title }}</span>
|
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
|
||||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||||
<time
|
<time
|
||||||
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
|
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
{{ if .PrevInSection }}
|
{{ if .PrevInSection }}
|
||||||
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
|
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
|
||||||
<span class="flex flex-col">
|
<span class="flex flex-col">
|
||||||
<span>{{ .PrevInSection.Title }}</span>
|
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
|
||||||
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
{{ if .Params.showDate | default (.Site.Params.article.showDate | default true) }}
|
||||||
<time
|
<time
|
||||||
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
|
class="-mt-1 text-xs text-gray-400 dark:text-gray-500"
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</time>
|
</time>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
<span class="ml-3">→</span>
|
<span class="ml-3 article-pagination-direction">→</span>
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div>
|
<div>
|
||||||
{{ with .Site.Author.name }}
|
{{ with .Site.Author.name }}
|
||||||
|
<div class="text-[0.6rem] leading-3 text-gray-400 dark:text-gray-500 uppercase">
|
||||||
|
{{ i18n "author.byline_title" | emojify }}
|
||||||
|
</div>
|
||||||
<div class="font-semibold leading-6 text-gray-800 dark:text-gray-300">
|
<div class="font-semibold leading-6 text-gray-800 dark:text-gray-300">
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<span
|
<span
|
||||||
class="ml-1 px-1 py-[2px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
|
class="ml-1 px-1 py-[1px] text-xs font-normal border rounded-md text-primary-700 dark:text-primary-400 border-primary-400 dark:border-primary-600 inline-block align-middle mb-1"
|
||||||
>
|
>
|
||||||
{{ . }}
|
{{ . }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<ol class="text-sm text-gray-400 dark:text-gray-500">
|
||||||
|
{{ template "crumb" (dict "p1" . "p2" .) }}
|
||||||
|
</ol>
|
||||||
|
{{ define "crumb" }}
|
||||||
|
{{ if .p1.Parent }}
|
||||||
|
{{ template "crumb" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||||
|
{{ else if not .p1.IsHome }}
|
||||||
|
{{ template "crumb" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||||
|
{{ end }}
|
||||||
|
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
|
||||||
|
<a class="hover:underline underline-gray-300 dark:underline-gray-600" href="{{ .p1.Permalink }}"
|
||||||
|
>{{ .p1.Title }}</a
|
||||||
|
><span class="px-1 text-primary-500">/</span>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
|
@ -12,10 +12,20 @@
|
||||||
{{/* Theme attribution */}}
|
{{/* Theme attribution */}}
|
||||||
{{ if .Site.Params.attribution | default true }}
|
{{ if .Site.Params.attribution | default true }}
|
||||||
<p class="text-xs text-gray-300 dark:text-gray-600">
|
<p class="text-xs text-gray-300 dark:text-gray-600">
|
||||||
Powered by
|
{{ i18n "footer.powered_by" }}
|
||||||
<a class="hover:underline" href="https://gohugo.io/" target="_blank">Hugo</a>
|
<a
|
||||||
|
class="hover:underline underline-primary-300 hover:text-primary-400"
|
||||||
|
href="https://gohugo.io/"
|
||||||
|
target="_blank"
|
||||||
|
>Hugo</a
|
||||||
|
>
|
||||||
&
|
&
|
||||||
<a class="hover:underline" href="https://git.io/hugo-congo" target="_blank">Congo</a>
|
<a
|
||||||
|
class="hover:underline underline-primary-300 hover:text-primary-400"
|
||||||
|
href="https://git.io/hugo-congo"
|
||||||
|
target="_blank"
|
||||||
|
>Congo</a
|
||||||
|
>
|
||||||
</p>
|
</p>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
{{ if templates.Exists "partials/favicons.html" }}
|
{{ if templates.Exists "partials/favicons.html" }}
|
||||||
{{ partialCached "favicons.html" .Site }}
|
{{ partialCached "favicons.html" .Site }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon.png" | absURL }}" />
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/favicon-32x32.png" | absURL }}" />
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/favicon-16x16.png" | absURL }}" />
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}" />
|
||||||
<link rel="manifest" href="{{ "/site.webmanifest" | absURL }}" />
|
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Site Verification */}}
|
{{/* Site Verification */}}
|
||||||
{{ with .Site.Params.verification.google }}
|
{{ with .Site.Params.verification.google }}
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
{{ template "_internal/opengraph.html" . }}
|
{{ template "_internal/opengraph.html" . }}
|
||||||
{{ template "_internal/twitter_cards.html" . }}
|
{{ template "_internal/twitter_cards.html" . }}
|
||||||
{{/* Schema */}}
|
{{/* Schema */}}
|
||||||
{{ template "_internal/schema.html" . }}
|
{{ partial "schema.html" . }}
|
||||||
{{/* Generator */}}
|
{{/* Generator */}}
|
||||||
{{ if .Site.Params.attribution | default true }}
|
{{ if .Site.Params.attribution | default true }}
|
||||||
{{ hugo.Generator }}
|
{{ hugo.Generator }}
|
||||||
|
|
|
@ -1,12 +1,22 @@
|
||||||
<header class="flex justify-between py-6 font-semibold sm:py-10">
|
<header class="flex justify-between py-6 font-semibold sm:py-10">
|
||||||
<div>
|
<div>
|
||||||
<a class="hover:underline" rel="me" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
<a
|
||||||
|
class="hover:underline underline-primary-500 underline-thickness-bold underline-offset-small"
|
||||||
|
rel="me"
|
||||||
|
href="{{ .Site.BaseURL }}"
|
||||||
|
>{{ .Site.Title }}</a
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="flex flex-col list-none sm:flex-row">
|
<ul class="flex flex-col list-none sm:flex-row">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<li class="text-right sm:mr-7 sm:last:mr-0">
|
<li class="text-right sm:mr-7 sm:last:mr-0">
|
||||||
<a class="hover:underline" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
|
<a
|
||||||
|
class="hover:underline underline-primary-500 underline-thickness-bold underline-offset-small"
|
||||||
|
href="{{ .URL | absURL }}"
|
||||||
|
title="{{ .Title }}"
|
||||||
|
>{{ .Name }}</a
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -6,3 +6,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<section>{{ .Content | emojify }}</section>
|
<section>{{ .Content | emojify }}</section>
|
||||||
</article>
|
</article>
|
||||||
|
<section>
|
||||||
|
{{ partial "recent-articles.html" . }}
|
||||||
|
</section>
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
<article
|
<article
|
||||||
class="flex flex-col items-center justify-center text-center
|
class="flex flex-col items-center justify-center text-center {{ if not .Site.Params.homepage.showRecent }}
|
||||||
{{ if not .Site.Params.homepage.showList -}}
|
|
||||||
h-full
|
h-full
|
||||||
{{- else -}}
|
{{ end }}"
|
||||||
mb-8
|
|
||||||
{{- end }}"
|
|
||||||
>
|
>
|
||||||
<header class="flex flex-col items-center mb-3">
|
<header class="flex flex-col mb-3">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | absURL }}" />
|
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -19,3 +16,6 @@
|
||||||
</header>
|
</header>
|
||||||
<section class="prose dark:prose-light">{{ .Content | emojify }}</section>
|
<section class="prose dark:prose-light">{{ .Content | emojify }}</section>
|
||||||
</article>
|
</article>
|
||||||
|
<section class="text-center">
|
||||||
|
{{ partial "recent-articles.html" . }}
|
||||||
|
</section>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{{ if .Site.Params.homepage.showRecent | default false }}
|
||||||
|
<h2 class="mt-8 text-2xl font-extrabold">{{ i18n "shortcode.recent_articles" | emojify }}</h2>
|
||||||
|
{{ range first 5 (.Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections)).Pages }}
|
||||||
|
{{ partial "article-link.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,40 @@
|
||||||
|
{{ if .IsHome -}}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "WebSite",
|
||||||
|
"name": "{{ .Site.Title | safeJS }}",
|
||||||
|
"url": "{{ .Site.BaseURL | safeURL }}",
|
||||||
|
"description": "{{ .Site.Params.description | safeJS }}"
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ else if .IsPage }}
|
||||||
|
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||||
|
<script type="application/ld+json">
|
||||||
|
{
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "BlogPosting",
|
||||||
|
"articleSection": "{{ (site.GetPage .Section).Title }}",
|
||||||
|
"name": "{{ .Title | safeJS }}",
|
||||||
|
"headline": "{{ .Title | safeJS }}",
|
||||||
|
"description": "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}",
|
||||||
|
{{ with .Site.LanguageCode }}"inLanguage": {{ . }},{{ end }}
|
||||||
|
"author" : {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Site.Author.name | safeJS }}"
|
||||||
|
},
|
||||||
|
"creator" : {
|
||||||
|
"@type": "Person",
|
||||||
|
"name": "{{ .Site.Author.name | safeJS }}"
|
||||||
|
},
|
||||||
|
"copyrightHolder": "{{ .Site.Author.name | safeJS }}",
|
||||||
|
{{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }}
|
||||||
|
{{ with .PublishDate }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }}
|
||||||
|
{{ with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }}
|
||||||
|
{{ with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }}
|
||||||
|
"url" : "{{ .Permalink }}",
|
||||||
|
"wordCount": "{{ .WordCount }}",
|
||||||
|
"keywords": [{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}]
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<header>
|
||||||
|
{{ if .Site.Params.list.showBreadcrumbs | default false }}
|
||||||
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
<section class="prose dark:prose-light">
|
||||||
|
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
|
||||||
|
<section>{{ .Content }}</section>
|
||||||
|
</section>
|
||||||
|
</header>
|
|
@ -1,4 +0,0 @@
|
||||||
<section class="prose dark:prose-light">
|
|
||||||
<h1 class="mb-3 text-4xl font-extrabold">{{ .Title }}</h1>
|
|
||||||
<section>{{ .Content }}</section>
|
|
||||||
</section>
|
|
|
@ -6,7 +6,7 @@
|
||||||
<a
|
<a
|
||||||
class="bg-gray-300 text-gray-700 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-primary-400 dark:hover:text-gray-800 m-1 hover:bg-primary-500 hover:text-white rounded min-w-[2.4rem] inline-block text-center p-1"
|
class="bg-gray-300 text-gray-700 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-primary-400 dark:hover:text-gray-800 m-1 hover:bg-primary-500 hover:text-white rounded min-w-[2.4rem] inline-block text-center p-1"
|
||||||
href="{{ printf .url $.Permalink $.Title }}"
|
href="{{ printf .url $.Permalink $.Title }}"
|
||||||
title="{{ .title }}"
|
title="{{ i18n .title }}"
|
||||||
>{{ partial "icon.html" .icon }}</a
|
>{{ partial "icon.html" .icon }}</a
|
||||||
>
|
>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<a
|
<button
|
||||||
class="px-4 py-2 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
class="px-4 py-1 !text-white !no-underline rounded-md bg-primary-600 hover:!bg-primary-500 dark:bg-primary-800 dark:hover:!bg-primary-700"
|
||||||
{{ with .Get "href" }}href="{{ . }}"{{ end }}
|
{{ with .Get "href" }}href="{{ . }}"{{ end }}
|
||||||
{{ with .Get "target" }}target="{{ . }}"{{ end }}
|
{{ with .Get "target" }}target="{{ . }}"{{ end }}
|
||||||
role="button"
|
role="button"
|
||||||
>{{ .Inner }}
|
>
|
||||||
</a>
|
{{ .Inner }}
|
||||||
|
</button>
|
||||||
|
|
|
@ -1,27 +1,23 @@
|
||||||
{{ if .Get "src" }}
|
{{ if .Get "src" }}
|
||||||
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
{{ $image := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||||
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
<figure{{ with .Get "class" }} class="{{ . }}"{{ end -}}>
|
||||||
{{- if .Get "link" -}}
|
{{- if .Get "link" -}}
|
||||||
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<img src="{{ $image.RelPermalink }}"
|
<img src="{{ $image.Permalink }}"
|
||||||
{{- if or (.Get "alt") (.Get "caption") }}
|
{{- if or (.Get "alt") (.Get "caption") }}
|
||||||
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||||
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||||
/><!-- Closing img tag -->
|
/>
|
||||||
{{- if .Get "link" }}</a>{{ end -}}
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
<figcaption>
|
<figcaption>
|
||||||
{{ with (.Get "title") -}}
|
{{ with (.Get "title") -}}<h4>{{ . }}</h4>{{- end -}}
|
||||||
<h4>{{ . }}</h4>
|
|
||||||
{{- end -}}
|
|
||||||
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||||
{{- .Get "caption" | markdownify -}}
|
{{- .Get "caption" | markdownify -}}
|
||||||
{{- with .Get "attrlink" }}
|
{{- with .Get "attrlink" }}<a href="{{ . }}">{{- end -}}
|
||||||
<a href="{{ . }}">
|
|
||||||
{{- end -}}
|
|
||||||
{{- .Get "attr" | markdownify -}}
|
{{- .Get "attr" | markdownify -}}
|
||||||
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -31,7 +27,3 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
{{ if $icon }}
|
{{ if $icon }}
|
||||||
{{ $icon.Content | safeHTML }}
|
{{ $icon.Content | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<em>Icon not found.</em>
|
<em>{{ i18n "shortcode.icon_none" }}</em>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "congo",
|
"name": "hugo-congo-theme",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "congo",
|
"name": "hugo-congo-theme",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.4.1",
|
"@tailwindcss/typography": "^0.4.1",
|
||||||
"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",
|
||||||
"tailwindcss": "^2.2.7"
|
"tailwindcss": "^2.2.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1379,6 +1380,12 @@
|
||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tailwind-underline-utils": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tailwind-underline-utils/-/tailwind-underline-utils-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-8FSynb8KOBFj7Y1wurCzx0MBAQtdOuRWlCk5wXFImI5ZfJ2yiRLvNbybiJ6pjWz5Htr+lStnowcTXl/00s8xRw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "2.2.7",
|
"version": "2.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-2.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-2.2.7.tgz",
|
||||||
|
@ -2587,6 +2594,12 @@
|
||||||
"has-flag": "^3.0.0"
|
"has-flag": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tailwind-underline-utils": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tailwind-underline-utils/-/tailwind-underline-utils-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-8FSynb8KOBFj7Y1wurCzx0MBAQtdOuRWlCk5wXFImI5ZfJ2yiRLvNbybiJ6pjWz5Htr+lStnowcTXl/00s8xRw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"tailwindcss": {
|
"tailwindcss": {
|
||||||
"version": "2.2.7",
|
"version": "2.2.7",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-2.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-2.2.7.tgz",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "congo",
|
"name": "hugo-congo-theme",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "Congo theme for Hugo",
|
"description": "Congo theme for Hugo",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
"@tailwindcss/typography": "^0.4.1",
|
"@tailwindcss/typography": "^0.4.1",
|
||||||
"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",
|
||||||
"tailwindcss": "^2.2.7"
|
"tailwindcss": "^2.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#!bin/bash
|
||||||
|
|
||||||
|
# get current branch
|
||||||
|
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
||||||
|
|
||||||
|
# push any local changes
|
||||||
|
git push
|
||||||
|
|
||||||
|
# checkout stable branch (this will catch uncommitted changes)
|
||||||
|
git checkout stable || exit 1
|
||||||
|
|
||||||
|
# branch validation
|
||||||
|
if [ $branch = "dev" ]; then
|
||||||
|
echo "Enter the release version (eg. v1.0.0):"
|
||||||
|
read version
|
||||||
|
|
||||||
|
echo "Started releasing $version for Congo..."
|
||||||
|
|
||||||
|
# pull latest from stable
|
||||||
|
git pull
|
||||||
|
|
||||||
|
# merge in changes from dev branch
|
||||||
|
git merge --no-ff dev -m "🔖 Release $version"
|
||||||
|
|
||||||
|
# create tag
|
||||||
|
git tag $version
|
||||||
|
|
||||||
|
# push commit and tag to remote
|
||||||
|
git push
|
||||||
|
git push --tags
|
||||||
|
|
||||||
|
echo "$version successfully released!"
|
||||||
|
echo "Returning to dev branch..."
|
||||||
|
|
||||||
|
git checkout dev
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Releases can only be published from the dev branch!"
|
||||||
|
fi
|
File diff suppressed because one or more lines are too long
|
@ -19,6 +19,12 @@ module.exports = {
|
||||||
primary: colors.violet,
|
primary: colors.violet,
|
||||||
secondary: colors.fuchsia,
|
secondary: colors.fuchsia,
|
||||||
},
|
},
|
||||||
|
underlineOffset: {
|
||||||
|
small: "2px",
|
||||||
|
},
|
||||||
|
underlineThickness: {
|
||||||
|
bold: "2px",
|
||||||
|
},
|
||||||
extend: {
|
extend: {
|
||||||
typography: (theme) => ({
|
typography: (theme) => ({
|
||||||
DEFAULT: {
|
DEFAULT: {
|
||||||
|
@ -27,13 +33,18 @@ module.exports = {
|
||||||
a: {
|
a: {
|
||||||
color: theme("colors.primary.700"),
|
color: theme("colors.primary.700"),
|
||||||
textDecoration: "underline",
|
textDecoration: "underline",
|
||||||
|
textDecorationColor: theme("colors.primary.300"),
|
||||||
fontWeight: "500",
|
fontWeight: "500",
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
backgroundColor: theme("colors.primary.600"),
|
backgroundColor: theme("colors.primary.600"),
|
||||||
|
borderRadius: "0.09rem",
|
||||||
color: theme("colors.white"),
|
color: theme("colors.white"),
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
blockquote: {
|
||||||
|
borderLeftColor: theme("colors.primary.200"),
|
||||||
|
},
|
||||||
h2: {
|
h2: {
|
||||||
position: "relative",
|
position: "relative",
|
||||||
},
|
},
|
||||||
|
@ -73,6 +84,7 @@ module.exports = {
|
||||||
color: theme("colors.gray.400"),
|
color: theme("colors.gray.400"),
|
||||||
a: {
|
a: {
|
||||||
color: theme("colors.primary.400"),
|
color: theme("colors.primary.400"),
|
||||||
|
textDecorationColor: theme("colors.gray.500"),
|
||||||
},
|
},
|
||||||
strong: {
|
strong: {
|
||||||
color: theme("colors.white"),
|
color: theme("colors.white"),
|
||||||
|
@ -88,7 +100,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
blockquote: {
|
blockquote: {
|
||||||
color: theme("colors.gray.200"),
|
color: theme("colors.gray.200"),
|
||||||
borderLeftColor: theme("colors.gray.600"),
|
borderLeftColor: theme("colors.primary.900"),
|
||||||
},
|
},
|
||||||
h1: {
|
h1: {
|
||||||
color: theme("colors.white"),
|
color: theme("colors.white"),
|
||||||
|
@ -143,5 +155,5 @@ module.exports = {
|
||||||
typography: ["dark"],
|
typography: ["dark"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [require("@tailwindcss/typography")],
|
plugins: [require("@tailwindcss/typography"), require("tailwind-underline-utils")],
|
||||||
};
|
};
|
||||||
|
|
14
theme.toml
14
theme.toml
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
name = "Congo"
|
name = "Congo"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
licenselink = "https://github.com/jpanther/hugo-congo/blob/master/LICENSE"
|
licenselink = "https://github.com/jpanther/Congo/blob/master/LICENSE"
|
||||||
description = "A simple, clean Hugo theme based on Tailwind CSS"
|
description = "A simple, lightweight theme for Hugo built with Tailwind CSS."
|
||||||
homepage = "http://github.com/jpanther/hugo-congo/"
|
|
||||||
tags = ["blog", "minimal", "dark mode", "dark", "light", "tailwind"]
|
|
||||||
features = ["syntax higlighting", "dark mode", "emoji"]
|
|
||||||
min_version = "0.86.1"
|
min_version = "0.86.1"
|
||||||
|
|
||||||
|
homepage = "https://github.com/jpanther/Congo/"
|
||||||
|
demosite = "https://jpanther.github.io/Congo/"
|
||||||
|
|
||||||
|
tags = ["blog", "minimal", "responsive", "dark mode", "dark", "light", "tailwind", "personal"]
|
||||||
|
features = ["syntax higlighting", "dark mode", "emoji"]
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "James Panther"
|
name = "James Panther"
|
||||||
homepage = "https://jamespanther.com/"
|
homepage = "https://jamespanther.com/"
|
||||||
|
|
Loading…
Reference in New Issue