{"id":15145085,"url":"https://github.com/athackst/jekyll-collection-pages","last_synced_at":"2025-08-16T09:04:51.097Z","repository":{"id":251324441,"uuid":"836587889","full_name":"athackst/jekyll-collection-pages","owner":"athackst","description":"Add collection index pages based on front matter wit hand without pagination","archived":false,"fork":false,"pushed_at":"2024-08-03T04:02:00.000Z","size":1202,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T01:18:19.629Z","etag":null,"topics":["jekyll","jekyll-plugin"],"latest_commit_sha":null,"homepage":"https://althack.dev/jekyll-collection-pages","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athackst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T06:57:04.000Z","updated_at":"2024-08-03T04:40:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"60156fa1-7e8c-4ef2-ab91-b9e4d072d50c","html_url":"https://github.com/athackst/jekyll-collection-pages","commit_stats":null,"previous_names":["athackst/jekyll-collection-pages"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athackst%2Fjekyll-collection-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athackst%2Fjekyll-collection-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athackst%2Fjekyll-collection-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athackst%2Fjekyll-collection-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athackst","download_url":"https://codeload.github.com/athackst/jekyll-collection-pages/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535609,"owners_count":20954589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jekyll","jekyll-plugin"],"created_at":"2024-09-26T11:08:26.072Z","updated_at":"2025-04-06T19:19:51.078Z","avatar_url":"https://github.com/athackst.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"Quick start\"\ncategory: \"Getting Started\"\norder: 1\n---\n\n## Usage\n\n### Installation\n\nAdd this line to your Jekyll site's `Gemfile`:\n\n```ruby\ngem 'jekyll-collection-pages'\n```\n\nAnd add this line to your Jekyll site's `_config.yml`:\n\n```yaml\nplugins:\n  - jekyll-collection-pages\n```\n\n### Basic Configuration\n\nIn your `_config.yml`, add the following configuration for each collection you want to generate pages for:\n\n```yaml\ncollection_pages:\n  - collection: docs\n    field: category\n    path: docs/category\n    layout: category_layout.html\n    paginate: 6\n  - collection: articles\n    field: tags\n    path: articles/tags\n    layout: tags_layout.html\n    paginate: 10\n```\n\n### Configuration Options\n\n- `collection`: The name of the collection to generate pages for.\n- `field`: The front matter field to use for categorization (e.g., 'category', 'tags').\n- `path`: The output path for the generated pages.\n- `layout`: The layout to use for the generated pages.\n- `paginate`: (Optional) The number of items per page. If omitted, all items will be on a single page.\n\n### Example Usage\n\n1. **Setting up collections**\n\n   In your `_config.yml`:\n\n   ```yaml\n   collections:\n     docs:\n       output: true\n   collection_pages:\n      collection: docs\n      field: category\n      path: docs/category\n      layout: category_layout.html\n      paginate: 6\n   ```\n\n2. **Creating collection items**\n\n   Create files in your collections with appropriate front matter:\n\n   `_docs/sample-doc.md`:\n   ```yaml\n   ---\n   title: \"Sample Document\"\n   category: \"User Guide\"\n   ---\n   This is a sample document.\n   ```\n\n   `_articles/sample-article.md`:\n   ```yaml\n   ---\n   title: \"Sample Article\"\n   tags: [\"Jekyll\", \"Plugins\"]\n   ---\n   This is a sample article.\n   ```\n\n3. **Creating layouts**\n\n   Create layout files for your generated pages:\n\n   `_layouts/category_layout.html`:\n   ```html\n   ---\n   layout: default\n   ---\n   \u003ch1\u003eCategory: {{ page.tag }}\u003c/h1\u003e\n   \u003cul\u003e\n   {% for post in page.posts %}\n     \u003cli\u003e\u003ca href=\"{{ post.url }}\"\u003e{{ post.title }}\u003c/a\u003e\u003c/li\u003e\n   {% endfor %}\n   \u003c/ul\u003e\n   ```\n\n4. **Accessing generated pages**\n\n   The plugin will generate pages at paths like:\n   - `/docs/category/user-guide.html`\n   - `/articles/tags/jekyll.html`\n   - `/articles/tags/plugins.html`\n\n### Pagination\n\nIf you've set the `paginate` option, you can access pagination information in your layouts:\n\n```html\n{% if paginator.total_pages \u003e 1 %}\n  {% if paginator.previous_page %}\n    \u003ca href=\"{{ paginator.previous_page_path }}\"\u003ePrevious\u003c/a\u003e\n  {% endif %}\n  \u003cspan\u003ePage {{ paginator.page }} of {{ paginator.total_pages }}\u003c/span\u003e\n  {% if paginator.next_page %}\n    \u003ca href=\"{{ paginator.next_page_path }}\"\u003eNext\u003c/a\u003e\n  {% endif %}\n{% endif %}\n```\n\n### Demo Site\n\nFor more complex examples and a full working demo, check out the [demo site](https://www.althack.dev/jekyll-collection-pages) included in this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathackst%2Fjekyll-collection-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathackst%2Fjekyll-collection-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathackst%2Fjekyll-collection-pages/lists"}