diff --git a/.release-it.json b/.release-it.js similarity index 70% rename from .release-it.json rename to .release-it.js index 606b7d7..75fde93 100644 --- a/.release-it.json +++ b/.release-it.js @@ -1,6 +1,10 @@ -{ +const fs = require('fs'); + +const commitTemplate = fs.readFileSync('.release-it/commit.hbs').toString(); + +module.exports = { "hooks": { - "after:bump": "make VERSION=${version} dist" + "after:git:release": "make VERSION=${version} dist" }, "git": { "commitMessage": "chore: release v${version}" @@ -17,7 +21,10 @@ "@release-it/conventional-changelog": { "preset": "conventionalcommits", "infile": "CHANGELOG.md", - "header": "# Changelog" + "header": "# Changelog", + "writerOpts": { + "commitPartial": commitTemplate + } }, "@j-ulrich/release-it-regex-bumper": { "out": [ diff --git a/.release-it/commit.hbs b/.release-it/commit.hbs new file mode 100644 index 0000000..a928cc2 --- /dev/null +++ b/.release-it/commit.hbs @@ -0,0 +1,57 @@ +* {{header}} + +{{~!-- commit link --}} +{{~#if @root.linkReferences}} ([{{hash}}]( + {{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~else}} + {{~@root.repoUrl}} + {{~/if}}/ + {{~@root.commit}}/{{hash}})) +{{~else if hash}} {{hash}}{{~/if}} + +{{~!-- commit references --}} +{{~#if references~}} + , closes + {{~#each references}} {{#if @root.linkReferences~}} + [ + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}}#{{this.issue}}]( + {{~#if @root.repository}} + {{~#if @root.host}} + {{~@root.host}}/ + {{~/if}} + {{~#if this.repository}} + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}} + {{~else}} + {{~#if @root.owner}} + {{~@root.owner}}/ + {{~/if}} + {{~@root.repository}} + {{~/if}} + {{~else}} + {{~@root.repoUrl}} + {{~/if}}/ + {{~@root.issue}}/{{this.issue}}) + {{~else}} + {{~#if this.owner}} + {{~this.owner}}/ + {{~/if}} + {{~this.repository}}#{{this.issue}} + {{~/if}}{{/each}} +{{~/if}} +\n +{{#if body}} +{{body}} +{{/if}} diff --git a/README.md b/README.md index c854fbf..85dddc3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Contents: * [Adding a post index page](#adding-a-post-index-page) * [Theme settings](#theme-settings) * [Acknowledgements](#acknowledgements) +* [Updates](#updates) + * [Updating from v0.2.0](#updating-from-v020) * [License](#license) ## Getting Started @@ -27,13 +29,13 @@ Once the theme is installed, read following sections to know how to use and conf ### Adding a portfolio image -The portfolio (on homepage) is composed of posts with only a `title`, a `featured image` and ensure `Other options ➔ Post template ➔ Image for the portfolio` is set. +The portfolio (on homepage) is composed of posts with only a `title`, a `featured image`, has `Status ➔ Hide Post` set to true and ensure `Other options ➔ Post template ➔ Image for the portfolio` is set. This combination will show the picture with a lightbox effect. The `title` is used as the image caption. ### Adding a post index page -To generate a post index page where you can list all available posts, create a new post with a title like **Post index**, hide it and tag it `post-index`. +To generate a post index page where you can list all available posts, create a new post with a title like **Post index**, select `Status ➔ Hide Post`, tag it as `post-index` and ensure you use template `Other options ➔ Post template ➔ Show the index of all posts`. You will see a link appearing below the **Readings** section from homepage to access the post index page. @@ -48,6 +50,15 @@ From Publii, navigate to `Theme ➔ Custom settings` to customize the theme beha * [UIKit](https://getuikit.com/) -- UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. * [Release It!](https://github.com/release-it/release-it) -- Generic CLI tool to automate versioning and package publishing-related tasks. +## Updates + +As this is a pre-release (below v1.x), sometime the theme will need some adaptations when upgrading. Follow the guide ! + +### Updating from v0.2.0 + +* In **Theme** menu on the left, enter the **Custom settings** area and set `Sidebar ➔ Number of posts: 2`. Save settings. +* From this release, you must hide all portfolio posts by enabling `Status ➔ Hide Post` in order to show them on the homepage. + ## License See [LICENSE](./LICENSE). diff --git a/assets/scss/main.scss b/assets/scss/main.scss index db2441d..a9a6757 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -29,7 +29,7 @@ VARIABLE OVERRIDES $global-font-size: 18px !default; $global-background: #000000 !default; $global-color: #f626eed9 !default; -$global-emphasis-color: #f626eed9 !default; +$global-emphasis-color: #ff54f9d9 !default; $global-font-family: "Acme", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; $global-secondary-background: #691066d9 !default; $navbar-background: #000 !default; diff --git a/config.json b/config.json index 6392d5f..722ebb3 100755 --- a/config.json +++ b/config.json @@ -40,7 +40,7 @@ { "name": "postsPerPage", "label": "Posts per page", - "value": 12, + "value": -1, "type": "number" }, { @@ -106,7 +106,7 @@ "name": "amountSelectedtPosts", "label": "Number of posts", "group": "Sidebar", - "value": "3", + "value": "2", "type": "text" }, { diff --git a/index.hbs b/index.hbs index 0d1d926..7db7f04 100755 --- a/index.hbs +++ b/index.hbs @@ -14,17 +14,17 @@ >