jekyll-collection-pages 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.devcontainer/devcontainer.json +27 -0
  3. data/.devcontainer/post-create.sh +17 -0
  4. data/.github/build.sh +4 -0
  5. data/.github/bump.sh +28 -0
  6. data/.github/dependabot.yml +12 -0
  7. data/.github/pr-labeler.yml +7 -0
  8. data/.github/release-drafter.yml +40 -0
  9. data/.github/release.sh +69 -0
  10. data/.github/test.sh +4 -0
  11. data/.github/workflows/ci.yml +92 -0
  12. data/.github/workflows/pr_labeler.yml +16 -0
  13. data/.github/workflows/release.yml +23 -0
  14. data/.github/workflows/release_draft.yml +61 -0
  15. data/.github/workflows/site.yml +91 -0
  16. data/.gitignore +21 -0
  17. data/.rubocop.yml +43 -0
  18. data/.rubocop_todo.yml +33 -0
  19. data/.ruby-version +1 -0
  20. data/.vscode/settings.json +5 -0
  21. data/.vscode/tasks.json +58 -0
  22. data/CODE_OF_CONDUCT.md +128 -0
  23. data/CONTRIBUTING.md +41 -0
  24. data/Gemfile +39 -0
  25. data/LICENSE +21 -0
  26. data/README.md +152 -0
  27. data/Rakefile +8 -0
  28. data/VERSION +1 -0
  29. data/demo/CODE_OF_CONDUCT.md +1 -0
  30. data/demo/_articles/jekyll-collection-pages-comparison.md +90 -0
  31. data/demo/_articles/jekyll-collection-pages-indices.md +173 -0
  32. data/demo/_articles/jekyll-for-documentation.md +399 -0
  33. data/demo/_articles/linking-obsidian-and-jekyll.md +89 -0
  34. data/demo/_config.yml +83 -0
  35. data/demo/_docs/configuration-guide.md +113 -0
  36. data/demo/_docs/examples.md +159 -0
  37. data/demo/_docs/generated-data.md +76 -0
  38. data/demo/_docs/layout-recipes.md +122 -0
  39. data/demo/_docs/quick-start.md +1 -0
  40. data/demo/_docs/troubleshooting.md +68 -0
  41. data/demo/_layouts/collection_layout.html +27 -0
  42. data/demo/_layouts/tags.html +31 -0
  43. data/demo/articles.md +18 -0
  44. data/demo/assets/img/articles.png +0 -0
  45. data/demo/assets/img/docs.png +0 -0
  46. data/demo/assets/img/jekyll-collection-pages-preview.png +0 -0
  47. data/demo/assets/img/jekyll-collection-pages.png +0 -0
  48. data/demo/assets/img/post-img-1.png +0 -0
  49. data/demo/assets/img/post-img-2.png +0 -0
  50. data/demo/assets/img/post-img-3.png +0 -0
  51. data/demo/assets/img/post-img-4.png +0 -0
  52. data/demo/contributing.md +1 -0
  53. data/demo/directory.md +36 -0
  54. data/demo/docs.md +24 -0
  55. data/demo/gallery.md +14 -0
  56. data/demo/index.md +63 -0
  57. data/demo/tags.md +15 -0
  58. data/jekyll-collection-pages.gemspec +28 -0
  59. data/lib/jekyll/collection_pages.rb +383 -0
  60. data/lib/jekyll-collection-pages.rb +4 -0
  61. metadata +126 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 97a284bb86cc0d06f068f04d67815db35d54294af4449a7070b29d4d5ddca255
4
+ data.tar.gz: 35b687df7a07642a508ed417e26d1b32ba4c9627366370a9de711e786ba99b07
5
+ SHA512:
6
+ metadata.gz: 8481bd3ea5c40e2dec1f7a5b007a6735e9162e874f4a5ee3407454163036f6427e6d1f2f6137ede947c4b8cb8438b3365b64358baa05c90f36a5b0df60d953de
7
+ data.tar.gz: a23a1f8ec7644c2151fdd36a159c2fe5b5adac1d673ccab2e79cf2b47968e96d7cc8a0ab0e82e6ea026556c00e2c82394fc8e8d4beeb1a827ca974f11f5f028f
@@ -0,0 +1,27 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/ruby
3
+ {
4
+ "name": "Ruby",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
7
+ "features": {
8
+ "ghcr.io/devcontainers/features/ruby:1": {
9
+ "version": "3.3.4"
10
+ }
11
+ },
12
+ // Features to add to the dev container. More info: https://containers.dev/features.
13
+ // "features": {},
14
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
15
+ "forwardPorts": [
16
+ // Jekyll server
17
+ 4000,
18
+ // Live reload server
19
+ 35729
20
+ ],
21
+ // Use 'postCreateCommand' to run commands after the container is created.
22
+ "postCreateCommand": ".devcontainer/post-create.sh"
23
+ // Configure tool-specific properties.
24
+ // "customizations": {},
25
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
26
+ // "remoteUser": "root"
27
+ }
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Install the version of Bundler.
4
+ if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then
5
+ cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v
6
+ fi
7
+
8
+ # If there's a Gemfile, then run `bundle install`
9
+ # It's assumed that the Gemfile will install Jekyll too
10
+ if [ -f Gemfile ]; then
11
+ bundle install
12
+ fi
13
+
14
+ # Get the current ruby version and set .ruby-version
15
+ ruby_version=$(ruby -v | awk '{print $2}')
16
+ printf %s "$ruby_version" > .ruby-version
17
+ echo "Ruby version $ruby_version set in .ruby-version file"
data/.github/build.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+ bundle exec jekyll build -s demo
data/.github/bump.sh ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ VERSION_FILE="VERSION"
5
+
6
+ if [[ $# -lt 1 || $# -gt 2 ]]; then
7
+ echo "Usage: $0 <version> [--dry-run]"
8
+ exit 1
9
+ fi
10
+
11
+ new_version="$1"
12
+
13
+ if ! [[ "$new_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
14
+ echo "Invalid version format: $new_version"
15
+ echo "Expected format: x.y.z (e.g., 1.2.3)"
16
+ exit 1
17
+ fi
18
+
19
+ if [[ ! -f "$VERSION_FILE" ]]; then
20
+ echo "Version file not found: $VERSION_FILE"
21
+ exit 1
22
+ fi
23
+
24
+ echo "Bumping version to $new_version in $VERSION_FILE"
25
+ sed -i.bak -E 's/[0-9]+\.[0-9]+\.[0-9]+/'"$new_version"'/' "$VERSION_FILE"
26
+ rm -f "$VERSION_FILE.bak"
27
+
28
+ echo "Updated to version $new_version"
@@ -0,0 +1,12 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for more information:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+ # https://containers.dev/guide/dependabot
6
+
7
+ version: 2
8
+ updates:
9
+ - package-ecosystem: "devcontainers"
10
+ directory: "/"
11
+ schedule:
12
+ interval: weekly
@@ -0,0 +1,7 @@
1
+ breaking: ['major/*', 'breaking/*']
2
+ bug: ['fix/*', 'bugfix/*', 'bug/*']
3
+ dependencies: ['deps/*', 'dependendies/*']
4
+ docs: ['docs/*', 'doc/*']
5
+ feature: ['feature/*', 'feat/*', 'new/*']
6
+ maintenance: ['chore/*', 'maint/*', 'noop/*', 'no-op/*', 'dev/*', 'devops/*']
7
+ skip-changelog: ['skip/*']
@@ -0,0 +1,40 @@
1
+ name-template: "Release $RESOLVED_VERSION"
2
+ tag-template: "$RESOLVED_VERSION"
3
+ template: |
4
+ # What’s Changed
5
+
6
+ $CHANGES
7
+ categories:
8
+ - title: ':zap: Breaking'
9
+ label: 'breaking'
10
+ - title: ':rocket: New'
11
+ label: 'feature'
12
+ - title: ':bug: Bug Fixes'
13
+ label: 'bug'
14
+ - title: ':toolbox: Maintenance'
15
+ label: 'maintenance'
16
+ - title: ':memo: Documentation'
17
+ label: 'docs'
18
+ - title: 'Dependency Updates'
19
+ label: 'dependencies'
20
+ collapse-after: 3
21
+
22
+ version-resolver:
23
+ major:
24
+ labels:
25
+ - 'breaking'
26
+ - 'major'
27
+ minor:
28
+ labels:
29
+ - 'feature'
30
+ - 'minor'
31
+ patch:
32
+ labels:
33
+ - 'bug'
34
+ - 'maintenance'
35
+ - 'docs'
36
+ - 'dependencies'
37
+ - 'security'
38
+
39
+ exclude-labels:
40
+ - 'skip-changelog'
@@ -0,0 +1,69 @@
1
+ #!/bin/bash
2
+
3
+ # Function to load environment variables from .env file if it exists
4
+ load_env_file() {
5
+ env_file=".env"
6
+ if [ -f "$env_file" ]; then
7
+ echo "Loading environment variables from $env_file..."
8
+ export $(cat "$env_file" | xargs)
9
+ fi
10
+ }
11
+
12
+ # Function to build the gem and get the path of the generated gem file
13
+ build_gem() {
14
+ gemspec_file="$1"
15
+
16
+ # Check if gemspec file exists
17
+ if [ ! -f "$gemspec_file" ]; then
18
+ echo "Error: Gemspec file '$gemspec_file' not found."
19
+ exit 1
20
+ fi
21
+
22
+ # Build the gem
23
+ gem_file=$(gem build "$gemspec_file" | awk '/File:/ {print $2}')
24
+
25
+ echo "$gem_file"
26
+ }
27
+
28
+ # Function to set up RubyGems credentials
29
+ setup_rubygems_credentials() {
30
+ if [ -z "$RUBYGEMS_USERNAME" ] || [ -z "$RUBYGEMS_API_KEY" ]; then
31
+ echo "Error: RUBYGEMS_USERNAME and RUBYGEMS_API_KEY environment variables must be set."
32
+ exit 1
33
+ fi
34
+
35
+ mkdir -p ~/.gem
36
+ echo -e "---\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
37
+ chmod 0600 ~/.gem/credentials
38
+ }
39
+
40
+ # Function to upload the gem to RubyGems
41
+ upload_gem() {
42
+ gem_file="$1"
43
+
44
+ # Check if gem file exists
45
+ if [ ! -f "$gem_file" ]; then
46
+ echo "Error: Gem file '$gem_file' not found."
47
+ exit 1
48
+ fi
49
+
50
+ # Push the gem to RubyGems
51
+ gem push "$gem_file" --host https://rubygems.org
52
+ }
53
+
54
+ # Usage example
55
+ if [ "$#" -ne 1 ]; then
56
+ echo "Usage: $0 <path_to_gemspec_file>"
57
+ else
58
+ load_env_file
59
+ gemspec_file="$1"
60
+ generated_gem_file=$(build_gem "$gemspec_file")
61
+ echo "Generated gem file: $generated_gem_file"
62
+
63
+ # Set up RubyGems credentials
64
+ setup_rubygems_credentials
65
+
66
+ # Upload the gem to RubyGems
67
+ upload_gem "$generated_gem_file"
68
+ echo "Pushed gem file: $generated_gem_file"
69
+ fi
data/.github/test.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ bundle exec rake spec
@@ -0,0 +1,92 @@
1
+ name: CI jekyll plugin
2
+
3
+ on:
4
+ push:
5
+ branches: ["main"]
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ name: RuboCop Lint
13
+
14
+ steps:
15
+ - name: Checkout code
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+
21
+ - name: Install dependencies
22
+ run: bundle install
23
+
24
+ - name: Run RuboCop
25
+ run: bundle exec rubocop
26
+ # test job
27
+ test:
28
+ runs-on: ubuntu-latest
29
+ strategy:
30
+ fail-fast: false
31
+ matrix:
32
+ # Test active versions of ruby and github pages combo
33
+ ruby: ['3.2', '3.3', '3.4']
34
+ jekyll: ['3.10.0', '4.3.4', '4.4.0', '4.4.1']
35
+ include:
36
+ - ruby: '3.3.4'
37
+ jekyll: '3.10.0'
38
+ name: Test Ruby ${{ matrix.ruby }} / Jekyll ${{ matrix.jekyll }}
39
+ env:
40
+ JEKYLL_VERSION: ${{ matrix.jekyll }}
41
+
42
+ steps:
43
+ - name: Checkout code
44
+ uses: actions/checkout@v4
45
+
46
+ - name: Set up Ruby
47
+ uses: ruby/setup-ruby@v1
48
+ with:
49
+ ruby-version: ${{ matrix.ruby }}
50
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
51
+
52
+ - name: Test spec
53
+ run: .github/test.sh
54
+
55
+ - name: Show installed gems
56
+ if: failure()
57
+ run: bundle list
58
+
59
+ integration:
60
+ runs-on: ubuntu-latest
61
+ strategy:
62
+ fail-fast: false
63
+ matrix:
64
+ # Test active versions of ruby and github pages combo
65
+ ruby: ['3.2', '3.3', '3.4']
66
+ jekyll: ['3.10.0', '4.3.4', '4.4.0', '4.4.1']
67
+ include:
68
+ - ruby: '3.3.4'
69
+ jekyll: '3.10.0'
70
+ name: Build Ruby ${{ matrix.ruby }} / Jekyll ${{ matrix.jekyll }}
71
+ env:
72
+ JEKYLL_VERSION: ${{ matrix.jekyll }}
73
+
74
+ steps:
75
+ - name: Checkout code
76
+ uses: actions/checkout@v4
77
+
78
+ - name: Set up Ruby
79
+ uses: ruby/setup-ruby@v1
80
+ with:
81
+ ruby-version: ${{ matrix.ruby }}
82
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
83
+
84
+ - name: Run build
85
+ run: .github/build.sh
86
+
87
+ ci_success:
88
+ runs-on: ubuntu-latest
89
+ needs: [lint, test, integration]
90
+ steps:
91
+ - name: Confirm all dependencies succeeded
92
+ run: echo "All matrix and lint tests passed successfully."
@@ -0,0 +1,16 @@
1
+ name: PR labeler
2
+ on:
3
+ pull_request:
4
+ types: [opened]
5
+
6
+ jobs:
7
+ pr-labeler:
8
+ permissions:
9
+ contents: read # for TimonVS/pr-labeler-action to read config file
10
+ pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: TimonVS/pr-labeler-action@v5
14
+ with:
15
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
16
+ configuration-path: .github/pr-labeler.yml # optional, .github/pr-labeler.yml is the default value
@@ -0,0 +1,23 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v4
14
+ - name: Setup Ruby
15
+ uses: ruby/setup-ruby@v1.190.0
16
+ with:
17
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
18
+ cache-version: 1 # Increment this number if you need to re-download cached gems
19
+ - name: Release
20
+ run: .github/release.sh jekyll-collection-pages.gemspec
21
+ env:
22
+ RUBYGEMS_USERNAME: ${{ secrets.RUBYGEMS_USERNAME }}
23
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
@@ -0,0 +1,61 @@
1
+ name: Draft release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # Updates the PR only if it already exists
7
+ workflow_dispatch: # Manually trigger to create a new PR
8
+
9
+ jobs:
10
+ draft-release:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write # Required for updating release notes
14
+ outputs:
15
+ tag_name: ${{ steps.release-draft.outputs.tag_name }}
16
+ version: ${{ steps.release-draft.outputs.resolved_version }}
17
+ changelog: ${{ steps.release-draft.outputs.body }}
18
+ steps:
19
+ - name: Checkout main branch
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Run Release Drafter
23
+ id: release-draft
24
+ uses: release-drafter/release-drafter@v6
25
+ with:
26
+ config-name: release-drafter.yml
27
+ env:
28
+ GITHUB_TOKEN: ${{ github.token }}
29
+
30
+ bump-version:
31
+ runs-on: ubuntu-latest
32
+ needs: draft-release
33
+ if: ${{ needs.draft-release.outputs.version }}
34
+ permissions:
35
+ contents: write
36
+ pull-requests: write
37
+ steps:
38
+ - name: Checkout main branch
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Bump version
42
+ run: |
43
+ version="${{ needs.draft-release.outputs.version }}"
44
+ echo "Preparing release for version $version"
45
+ .github/bump.sh "$version"
46
+
47
+ - name: Set up Ruby
48
+ uses: ruby/setup-ruby@v1
49
+
50
+ - name: Update version in gemfile
51
+ run: bundle install
52
+
53
+ - name: Create Draft Pull Request
54
+ uses: peter-evans/create-pull-request@v7
55
+ with:
56
+ commit-message: "Bump version to ${{ needs.draft-release.outputs.tag_name }}"
57
+ branch: release/draft
58
+ title: "Bump to version ${{ needs.draft-release.outputs.tag_name }}"
59
+ body: |
60
+ This PR bumps the version to `${{ needs.draft-release.outputs.tag_name }}`.
61
+ token: ${{ secrets.PR_TOKEN }}
@@ -0,0 +1,91 @@
1
+ # Workflow for building and deploying a Jekyll site to GitHub Pages
2
+ name: site
3
+
4
+ on:
5
+ push:
6
+ branches: ["main"]
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11
+ permissions:
12
+ contents: read
13
+ pages: write
14
+ id-token: write
15
+
16
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
18
+ concurrency:
19
+ group: "pages"
20
+ cancel-in-progress: false
21
+
22
+ jobs:
23
+ # Build job
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - name: Checkout
28
+ uses: actions/checkout@v4
29
+ - name: Setup Ruby
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
33
+ - name: Setup Pages
34
+ id: pages
35
+ uses: actions/configure-pages@v5
36
+ with:
37
+ enablement: true # Enable github pages if it's not
38
+ - name: Build
39
+ run: bundle exec jekyll build -s demo
40
+ env:
41
+ JEKYLL_ENV: production
42
+ JEKYLL_GITHUB_TOKEN: ${{ github.token }}
43
+ - name: HTMLProofer
44
+ uses: athackst/htmlproofer-action@v0.3.0
45
+ with:
46
+ ignore_urls: |
47
+ https://opensource.org/license/mit/
48
+ swap_urls: |
49
+ ^${{ steps.pages.outputs.base_path }}:
50
+ ^.*${{ steps.pages.outputs.host }}${{ steps.pages.outputs.base_path }}:
51
+ - name: Upload artifact
52
+ uses: actions/upload-pages-artifact@v3
53
+
54
+ # Deployment job
55
+ deploy:
56
+ if: github.ref == 'refs/heads/main' # Only deploy from the main branch
57
+ needs: build
58
+ permissions:
59
+ pages: write
60
+ id-token: write
61
+ actions: read
62
+ environment:
63
+ name: github-pages
64
+ url: ${{ steps.deployment.outputs.page_url }}
65
+ runs-on: ubuntu-latest
66
+ steps:
67
+ - name: Deploy to GitHub Pages
68
+ id: deployment
69
+ uses: actions/deploy-pages@v4
70
+
71
+ site_success:
72
+ if: always()
73
+ runs-on: ubuntu-latest
74
+ needs: [build]
75
+ steps:
76
+ - run: exit 1
77
+ # see https://stackoverflow.com/a/67532120/4907315
78
+ if: >-
79
+ ${{
80
+ contains(needs.*.result, 'failure')
81
+ || contains(needs.*.result, 'cancelled')
82
+ }}
83
+ - run: echo "All steps completed successfully"
84
+ - name: Check rate limit
85
+ run: |
86
+ gh api \
87
+ -H "Accept: application/vnd.github+json" \
88
+ -H "X-GitHub-Api-Version: 2022-11-28" \
89
+ /rate_limit
90
+ env:
91
+ GH_TOKEN: ${{ github.token }}
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+ .DS_Store
13
+ /.yardoc/
14
+ /_yardoc/
15
+ /doc/
16
+ /rdoc/
17
+
18
+ _site/
19
+ **/.jekyll-cache/
20
+ Gemfile.lock
21
+ .env
data/.rubocop.yml ADDED
@@ -0,0 +1,43 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ NewCops: enable
5
+
6
+ # Naming cops
7
+ # ----------------------------------------
8
+ Naming/FileName:
9
+ Exclude:
10
+ - lib/jekyll-collection-pages.rb # gem entry point must match require name
11
+ - lib/**/jekyll-collection-pages.rb
12
+
13
+ # Layout cops
14
+ # ----------------------------------------
15
+ Layout/LineLength:
16
+ Max: 150
17
+ AllowedPatterns:
18
+ - '\A# ' # allow long comment URLs/notes
19
+
20
+ # Metrics cops
21
+ # ----------------------------------------
22
+ Metrics/AbcSize:
23
+ Max: 23
24
+ Metrics/BlockLength:
25
+ Exclude:
26
+ - 'spec/**/*'
27
+ Metrics/ClassLength:
28
+ Max: 240
29
+ Metrics/CyclomaticComplexity:
30
+ Max: 11
31
+ Metrics/MethodLength:
32
+ Max: 20
33
+ Metrics/ModuleLength:
34
+ Max: 240
35
+ Metrics/ParameterLists:
36
+ Max: 4
37
+ Metrics/PerceivedComplexity:
38
+ Max: 13
39
+
40
+ # Style cops
41
+ # ----------------------------------------
42
+ Style/Documentation:
43
+ Enabled: false # tiny gems / plugins rarely need top-level class docs
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,33 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-11-10 23:46:57 UTC using RuboCop version 1.81.7.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
11
+ Metrics/AbcSize:
12
+ Exclude:
13
+ - 'lib/jekyll/collection_pages.rb'
14
+
15
+ # Offense count: 3
16
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
17
+ Metrics/MethodLength:
18
+ Exclude:
19
+ - 'lib/jekyll/collection_pages.rb'
20
+
21
+ # Offense count: 3
22
+ # Configuration parameters: Max, CountKeywordArgs, MaxOptionalParameters.
23
+ Metrics/ParameterLists:
24
+ Exclude:
25
+ - 'lib/jekyll/collection_pages.rb'
26
+
27
+ # Offense count: 1
28
+ # This cop supports unsafe autocorrection (--autocorrect-all).
29
+ # Configuration parameters: AllowedReceivers.
30
+ # AllowedReceivers: Thread.current
31
+ Style/HashEachMethods:
32
+ Exclude:
33
+ - 'spec/jekyll_collection_pages_spec.rb'
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.4
@@ -0,0 +1,5 @@
1
+ {
2
+ "rubyLsp.rubyVersionManager": {
3
+ "identifier": "none"
4
+ },
5
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ // See https://go.microsoft.com/fwlink/?LinkId=733558
3
+ // for the documentation about the tasks.json format
4
+ "version": "2.0.0",
5
+ "tasks": [
6
+ {
7
+ "label": "bundle install",
8
+ "type": "shell",
9
+ "command": "bundle install",
10
+ "problemMatcher": []
11
+ },
12
+ {
13
+ "label": "bundle update",
14
+ "type": "shell",
15
+ "command": "bundle update"
16
+ },
17
+ {
18
+ "label": "test",
19
+ "type": "shell",
20
+ "command": ".github/test.sh",
21
+ "group": {
22
+ "kind": "test",
23
+ "isDefault": true
24
+ }
25
+ },
26
+ {
27
+ "label": "lint",
28
+ "type": "shell",
29
+ "command": "bundle exec rubocop",
30
+ "group": "build",
31
+ "problemMatcher": []
32
+ },
33
+ {
34
+ "label": "format",
35
+ "type": "shell",
36
+ "command": "bundle exec rubocop -A",
37
+ "problemMatcher": []
38
+ },
39
+ {
40
+ "label": "demo: build",
41
+ "type": "shell",
42
+ "command": "bundle exec jekyll build -s demo --verbose",
43
+ "problemMatcher": []
44
+ },
45
+ {
46
+ "label": "demo: serve",
47
+ "type": "shell",
48
+ "command": "bundle exec jekyll serve -s demo --verbose --livereload",
49
+ "problemMatcher": []
50
+ },
51
+ {
52
+ "label": "gem: build",
53
+ "type": "shell",
54
+ "command": "gem build *.gemspec",
55
+ "problemMatcher": []
56
+ }
57
+ ]
58
+ }