diff --git a/.github/workflows/build-theme.yml b/.github/workflows/build-theme.yml new file mode 100644 index 00000000..905709a5 --- /dev/null +++ b/.github/workflows/build-theme.yml @@ -0,0 +1,54 @@ +name: Build Theme + +on: [pull_request_target] + +jobs: + build: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: "${{ github.head_ref }}" + - name: Install dependencies and Build Theme + uses: actions/setup-node@v3 + - run: npm install + - run: npm run assets + - name: Commit and push Chart.js changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: "${{ github.head_ref }}" + push_options: "--dry-run" + file_pattern: "assets/lib/chart/*" + commit_message: "๐ฆ Update packaged ChartJS" + - name: Commit Fuse changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: "${{ github.head_ref }}" + push_options: "--dry-run" + file_pattern: "assets/lib/fuse/*" + commit_message: "๐ฆ Update packaged FuseJS" + - name: Commit KaTeX changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: "${{ github.head_ref }}" + push_options: "--dry-run" + file_pattern: "assets/lib/katex/*" + commit_message: "๐ฆ Update packaged KaTeX" + - name: Commit Mermaid changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: "${{ github.head_ref }}" + push_options: "--dry-run" + file_pattern: "assets/lib/mermaid/*" + commit_message: "๐ฆ Update packaged Mermaid" + - run: npm run build + - name: Commit CSS changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: "${{ github.head_ref }}" + push_options: "--dry-run" + file_pattern: "assets/css/compiled/main.css" + commit_message: "๐ Rebuild CSS" + - run: git push diff --git a/.github/workflows/label-closed.yml b/.github/workflows/label-closed.yml deleted file mode 100644 index 2606680c..00000000 --- a/.github/workflows/label-closed.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Labeller on close - -on: - issues: - types: - - closed - pull_request: - types: - - closed - -jobs: - run: - name: "Label" - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - issues: write - - steps: - - name: Update Labels - uses: RebeccaStevens/issue-closed-labeler-action@latest - with: - token: "${{ secrets.GITHUB_TOKEN }}" - rules: '[{"condition": "wip", "remove": "wip"}]' diff --git a/.github/workflows/unlabel.yml b/.github/workflows/unlabel.yml new file mode 100644 index 00000000..94a64e57 --- /dev/null +++ b/.github/workflows/unlabel.yml @@ -0,0 +1,16 @@ +name: Unlabeller + +on: + issues: + types: [closed] + pull_request: + types: [closed] + +jobs: + unlabel: + runs-on: ubuntu-latest + steps: + - name: Remove labels + uses: andymckay/labeler@master + with: + remove-labels: "wip" diff --git a/CHANGELOG.md b/CHANGELOG.md index 175123ee..95d4b727 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [2.4.1] - 2022-11-14 + +### Changed + +- Upgrade to Tailwind v3.2.4 ([#368](https://github.com/jpanther/congo/pull/368)) + +### Fixed + +- List page doesn't render nested list pages ([#365](https://github.com/jpanther/congo/issues/365)) +- Pagination is duplicated on term pages ([#366](https://github.com/jpanther/congo/issues/366)) +- Link to last pagination page sometimes displays twice +- Recent articles would sometimes display less than five articles + ## [2.4.0] - 2022-11-10 ### Added @@ -540,7 +553,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.4.0...HEAD +[unreleased]: https://github.com/jpanther/congo/compare/v2.4.1...HEAD +[2.4.1]: https://github.com/jpanther/congo/compare/v2.4.0...v2.4.1 [2.4.0]: https://github.com/jpanther/congo/compare/v2.3.1...v2.4.0 [2.3.1]: https://github.com/jpanther/congo/compare/v2.3.0...v2.3.1 [2.3.0]: https://github.com/jpanther/congo/compare/v2.2.3...v2.3.0 diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index c44eac55..d9b31e8c 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1,6 +1,6 @@ -/*! Congo v2.4.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.4.1 | MIT License | https://github.com/jpanther/congo */ -/*! tailwindcss v3.2.2 | MIT License | https://tailwindcss.com */ +/*! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com */ /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) diff --git a/assets/css/main.css b/assets/css/main.css index 82f8f128..ffb5a8da 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,4 +1,4 @@ -/*! Congo v2.4.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v2.4.1 | MIT License | https://github.com/jpanther/congo */ @tailwind base; @tailwind components; diff --git a/exampleSite/content/users.md b/exampleSite/content/users.md index 891a590f..1a016af9 100644 --- a/exampleSite/content/users.md +++ b/exampleSite/content/users.md @@ -47,5 +47,6 @@ Real websites that are built with Congo. | [major.io](https://major.io) | Personal site and Blog | | [bayas.dev](https://bayas.dev) | Personal site and Blog | | [้กพๅฎ็ๅๅฎข](https://www.guyu.me/) | Personal Blog (in Chinese) | +| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog | **Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md). diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 1148dca3..71b29930 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -37,7 +37,7 @@ {{ end }} {{ end }} {{ else }} - {{ range .Paginator.Pages }} + {{ range (.Paginate .Pages).Pages }} {{ partial "article-link.html" . }} {{ end }} {{ end }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 98fb07b1..666c84ce 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -26,7 +26,7 @@ {{ end }} {{ end }} {{ else }} - {{ range .Paginator.Pages }} + {{ range (.Paginate .Pages).Pages }} {{ partial "article-link.html" . }} {{ end }} {{ end }} @@ -40,5 +40,4 @@ {{ end }} - {{ partial "pagination.html" . }} {{ end }} diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 4228b332..3d8e88ec 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -59,7 +59,7 @@ {{- end }} {{- with .Last }} - {{- if lt $currentPageNumber (sub .TotalPages $width) }} + {{- if and (lt $currentPageNumber (sub .TotalPages $width)) (lt $end .TotalPages) }} {{- if lt $currentPageNumber (sub .TotalPages (add $width 1)) }}