{"id":15021021,"url":"https://github.com/benbalter/jekyll-relative-links","last_synced_at":"2025-05-16T04:03:35.198Z","repository":{"id":39633521,"uuid":"73994063","full_name":"benbalter/jekyll-relative-links","owner":"benbalter","description":"A Jekyll plugin to convert relative links to markdown files to their rendered equivalents","archived":false,"fork":false,"pushed_at":"2024-06-11T14:26:13.000Z","size":208,"stargazers_count":143,"open_issues_count":14,"forks_count":37,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-11T01:21:05.169Z","etag":null,"topics":["github-pages","jekyll","jekyll-plugin","redirects"],"latest_commit_sha":null,"homepage":"","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/benbalter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"benbalter"}},"created_at":"2016-11-17T05:38:00.000Z","updated_at":"2025-03-05T06:10:33.000Z","dependencies_parsed_at":"2024-11-28T21:18:10.464Z","dependency_job_id":null,"html_url":"https://github.com/benbalter/jekyll-relative-links","commit_stats":{"total_commits":170,"total_committers":19,"mean_commits":8.947368421052632,"dds":"0.32352941176470584","last_synced_commit":"9f05f8524cd974fc151d0d960ae3ad2e4935d3c6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fjekyll-relative-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fjekyll-relative-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fjekyll-relative-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbalter%2Fjekyll-relative-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbalter","download_url":"https://codeload.github.com/benbalter/jekyll-relative-links/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464891,"owners_count":22075570,"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":["github-pages","jekyll","jekyll-plugin","redirects"],"created_at":"2024-09-24T19:56:01.723Z","updated_at":"2025-05-16T04:03:35.026Z","avatar_url":"https://github.com/benbalter.png","language":"Ruby","funding_links":["https://patreon.com/benbalter"],"categories":["Ruby"],"sub_categories":[],"readme":"# Jekyll Relative Links\n\n[![CI](https://github.com/benbalter/jekyll-relative-links/actions/workflows/ci.yml/badge.svg)](https://github.com/benbalter/jekyll-relative-links/actions/workflows/ci.yml)\n\nA Jekyll plugin to convert relative links to Markdown files to their rendered equivalents.\n\n## What it does\n\nLet's say you have a link like this in a Markdown file:\n\n```\n[foo](bar.md)\n```\n\nWhile that would render as a valid link on GitHub.com, it would not be a valid link on Pages. Instead, this plugin converts that link to:\n\n```\n[foo](bar.html)\n```\n\nIt even work with pages with custom permalinks. If you have `bar.md` with the following:\n\n```\n---\npermalink: /bar/\n---\n\n# bar\n```\n\nThen `[foo](bar.md)` will render as `[foo](/bar/)`.\n\nThe default Jekyll's configuration `permalink: pretty` in the `_config.yaml`\nfile removes the `.html` extensions from the generated links.\n\n## Why\n\nBecause Markdown files rendered by GitHub Pages should behave similar to Markdown files rendered on GitHub.com\n\n## Usage\n\n1. Add the following to your site's Gemfile:\n\n  ```ruby\n  gem 'jekyll-relative-links'\n  ```\n\n2. Add the following to your site's config file:\n\n  ```yml\n  plugins:\n    - jekyll-relative-links\n  ```\n  Note: If you are using a Jekyll version less than 3.5.0, use the `gems` key instead of `plugins`.\n\n## Configuration\n\nYou can configure this plugin in `_config.yml` under the `relative_links` key. This is optional and defaults to:\n\n```yml\nrelative_links:\n  enabled:     true\n  collections: false\n```\n\n### Excluding files\n\nTo exclude specific directories and/or files:\n\n```yml\nrelative_links:\n  exclude:\n    - directory\n    - file.md\n```\n\n### Processing Collections\n\nSetting the `collections` option to `true` enables relative links from collection items (including posts).\n\nAssuming this structure\n\n~~~\n├── _my_collection\n│   ├── some_doc.md\n│   └── some_subdir\n│       └── another_doc.md\n├── _config.yml\n└── index.md\n~~~\n\nthe following will work:\n\nFile | Link\n-|-\n`index.md` | `[Some Doc](_my_collection/some_doc.md)`\n`index.md` | `[Another Doc](_my_collection/some_subdir/another_doc.md)`\n`_my_collection/some_doc.md` | `[Index](../index.md)`\n`_my_collection/some_doc.md` | `[Another Doc](some_subdir/another_doc.md)`\n`_my_collection/some_subdir/another_doc.md` | `[Index](../../index.md)`\n`_my_collection/some_subdir/another_doc.md` | `[Some Doc](../some_doc.md)`\n\n\n### Disabling\n\nEven if the plugin is enabled (e.g., via the `:jekyll_plugins` group in your Gemfile) you can disable it by setting the `enabled` key to `false`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbalter%2Fjekyll-relative-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbalter%2Fjekyll-relative-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbalter%2Fjekyll-relative-links/lists"}