{"id":22468993,"url":"https://github.com/impresscms-dev/strip-markdown-extensions-from-links-action","last_synced_at":"2025-08-02T08:32:58.917Z","repository":{"id":50611304,"uuid":"519362835","full_name":"impresscms-dev/strip-markdown-extensions-from-links-action","owner":"impresscms-dev","description":"GitHub action to strip Markdown file extensions from links (useful for making links work with GitHub wiki)","archived":false,"fork":false,"pushed_at":"2025-08-01T08:39:58.000Z","size":1609,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-01T10:49:05.895Z","etag":null,"topics":["github-action","hacktoberfest","markdown"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/impresscms-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2022-07-29T22:20:28.000Z","updated_at":"2025-08-01T08:40:01.000Z","dependencies_parsed_at":"2024-04-03T03:29:11.295Z","dependency_job_id":"c90264d8-7f6d-46a5-956a-d0ae1621dc36","html_url":"https://github.com/impresscms-dev/strip-markdown-extensions-from-links-action","commit_stats":{"total_commits":105,"total_committers":5,"mean_commits":21.0,"dds":0.2857142857142857,"last_synced_commit":"09f0395ec713a1466d8a3e21030437fd529afe57"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/impresscms-dev/strip-markdown-extensions-from-links-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresscms-dev%2Fstrip-markdown-extensions-from-links-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresscms-dev%2Fstrip-markdown-extensions-from-links-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresscms-dev%2Fstrip-markdown-extensions-from-links-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresscms-dev%2Fstrip-markdown-extensions-from-links-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/impresscms-dev","download_url":"https://codeload.github.com/impresscms-dev/strip-markdown-extensions-from-links-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impresscms-dev%2Fstrip-markdown-extensions-from-links-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268214588,"owners_count":24214354,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-action","hacktoberfest","markdown"],"created_at":"2024-12-06T11:24:55.051Z","updated_at":"2025-08-02T08:32:58.907Z","avatar_url":"https://github.com/impresscms-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![License](https://img.shields.io/github/license/impresscms-dev/strip-markdown-extensions-from-links-action.svg)](LICENSE)\n[![GitHub release](https://img.shields.io/github/release/impresscms-dev/strip-markdown-extensions-from-links-action.svg)](https://github.com/impresscms-dev/strip-markdown-extensions-from-links-action/releases)\n\n# Strip MarkDown extensions from links action\n\nGitHub action to strip Markdown file extensions from links (useful for making links work with GitHub wiki and other platforms that don't support .md extensions in links).\n\n### Use Cases\n\n- **GitHub Wiki**: Prepare documentation for GitHub Wiki where .md extensions are not used in URLs\n- **Documentation Sites**: Many documentation generators prefer links without file extensions\n- **Static Site Generators**: When converting Markdown to HTML, clean URLs without extensions are often preferred\n- **Cross-Platform Compatibility**: Ensures links work consistently across different Markdown renderers\n\n## Usage\n\nTo use this action in your project, create a workflow in your project similar to this code (Note: some parts and arguments may need to be altered for your specific use case):\n```yaml\nname: Generate documentation\n\non:\n  push:\n\njobs:\n  create_docs:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkouting project code...\n        uses: actions/checkout@v4\n\n      - name: Install PHP\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: 8.4\n          extensions: curl, gd, pdo_mysql, json, mbstring, pcre, session\n          ini-values: post_max_size=256M\n          coverage: none\n          tools: composer:v2\n\n      - name: Install Composer dependencies (with dev)\n        run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader\n\n      - name: Generating documentation...\n        uses: impresscms-dev/generate-phpdocs-with-clean-phpdoc-md-action@v1\n        with:\n          class_root_namespace: ImpressCMS\\\n          included_classes: ImpressCMS\\**\n          output_path: ./docs/\n\n      - name: Stripping file extensions...\n        uses: impresscms-dev/strip-markdown-extensions-from-links-action@v2\n        with:\n          path: ./docs/\n          # Optional: Ignore specific links in specific files\n          ignore-filter: |\n            # Ignore all markdown links in README.md\n            *.md: README.md\n            # Ignore links to API.md in all documentation files\n            API.md: docs/**/*.md\n\n      - uses: actions/upload-artifact@v4\n        with:\n          name: my-artifact\n          path: ./docs/\n```\n\n## Arguments\n\nThis action supports the following arguments (used with the `with` keyword):\n\n| Argument    | Required | Default value        | Description                       |\n|-------------|----------|----------------------|-----------------------------------|\n| path | Yes      |                      | Folder containing Markdown files whose links need to be processed |\n| ignore-filter | No | | Pattern-based filter to ignore specific links in specific files. Uses YAML format where keys are link patterns and values are file patterns. Both sides accept glob syntax. |\n\n### Using the path parameter\n\nThe `path` parameter specifies the directory containing Markdown files that need to be processed. This action will recursively search for all Markdown files in the specified directory and its subdirectories.\n\n#### Basic Usage\n\n```yaml\npath: ./docs/\n```\n\n#### Examples\n\n##### Process files in the root directory\n\n```yaml\npath: ./\n```\n\n##### Process files in a specific documentation directory\n\n```yaml\npath: ./documentation/\n```\n\n##### Process files in multiple directories\n\nIf you need to process files in multiple directories, you can run the action multiple times with different paths:\n\n```yaml\n- name: Process main documentation\n  uses: impresscms-dev/strip-markdown-extensions-from-links-action@v1.1.4\n  with:\n    path: ./docs/\n\n- name: Process API documentation\n  uses: impresscms-dev/strip-markdown-extensions-from-links-action@v1.1.4\n  with:\n    path: ./api-docs/\n```\n\n#### Important Notes\n\n- The path is relative to the repository root\n- The action processes all Markdown files (`.md`) in the specified directory and its subdirectories\n- If a file is not a valid Markdown file, it will be skipped\n- The action modifies files in-place, so make sure to commit or back up your files if needed\n\n### Using the ignore-filter parameter\n\nThe `ignore-filter` parameter allows you to selectively ignore specific links in specific files. This is useful when you want to exclude certain files or links from being processed.\n\n#### Basic Format\n\nThe parameter uses YAML format where:\n- **Keys** are glob patterns matching the links you want to ignore\n- **Values** are glob patterns matching the files where these links should be ignored\n\n#### Examples\n\n##### Ignore all markdown links in README.md\n\n```yaml\nignore-filter: |\n  *.md: README.md\n```\n\n##### Ignore specific links in specific files\n\n```yaml\nignore-filter: |\n  # Ignore links to API.md in all files\n  API.md: \"*\"\n\n  # Ignore all markdown links in tutorial files\n  *.md: \"**/tutorials/*.md\"\n```\n\n##### Using arrays for multiple file patterns\n\n```yaml\nignore-filter: |\n  *.md:\n    - README.md\n    - CONTRIBUTING.md\n  docs/*.md: reference/**/*.md\n```\n\n#### Important Notes\n\n- Both link patterns and file patterns support glob syntax\n- The patterns `*:*` and `*.md:*.md` are not allowed as they would make the action ineffective\n- File paths are relative to the `path` parameter\n- If a link matches multiple patterns, it will be ignored if any of the patterns match\n\n## How to contribute?\n\nIf you want to add functionality or fix bugs, you can fork the repository, make your changes, and create a pull request. If you're not sure how this works, check out the [GitHub documentation on creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).\n\nIf you find any bugs or have questions, please use the [issues tab](https://github.com/impresscms-dev/strip-markdown-extensions-from-links-action/issues) to report them.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpresscms-dev%2Fstrip-markdown-extensions-from-links-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimpresscms-dev%2Fstrip-markdown-extensions-from-links-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpresscms-dev%2Fstrip-markdown-extensions-from-links-action/lists"}