{"id":18603011,"url":"https://github.com/devlooped/actions-includes","last_synced_at":"2025-06-29T17:34:06.927Z","repository":{"id":53444121,"uuid":"521414648","full_name":"devlooped/actions-includes","owner":"devlooped","description":"Processes include HTML comments in files and inserts the included files","archived":false,"fork":false,"pushed_at":"2025-02-16T00:58:13.000Z","size":51,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T01:25:49.780Z","etag":null,"topics":["actions","github","github-actions","markdown"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/devlooped.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/FUNDING.yml","license":"license.txt","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},"funding":{"github":"devlooped"}},"created_at":"2022-08-04T21:01:13.000Z","updated_at":"2025-02-16T00:58:15.000Z","dependencies_parsed_at":"2025-02-16T01:24:41.405Z","dependency_job_id":null,"html_url":"https://github.com/devlooped/actions-includes","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2Factions-includes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2Factions-includes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2Factions-includes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlooped%2Factions-includes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlooped","download_url":"https://codeload.github.com/devlooped/actions-includes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239077327,"owners_count":19577665,"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":["actions","github","github-actions","markdown"],"created_at":"2024-11-07T02:13:12.874Z","updated_at":"2025-02-18T01:43:22.627Z","avatar_url":"https://github.com/devlooped.png","language":"PowerShell","funding_links":["https://github.com/sponsors/devlooped","https://github.com/sponsors"],"categories":[],"sub_categories":[],"readme":"# +Mᐁ includes\n\nA GitHub action that resolves includes (by default in markdown files) and \nembeds the included files.\n\n## Including Content\n\nIn your content files:\n\n```html\n\u003c!-- include [RELATIVE_PATH or PUBLIC_URL][#ANCHOR] --\u003e\n```\n\nThe optional `#anchor` allows including fragments of files. Anchors are \ndefined as:\n\n```html\n\u003c!-- #ANCHOR --\u003e\n```\n\nwith an optional \"closing\" anchor defined exactly the same as the starting one.\nIf there is no closing anchor, the included content is from anchor declaration\nto the end of the file. For example:\n\n```html\n\u003c!-- #badges --\u003e\n[...] //some shields.io badges you use everywhere\n\u003c!-- #badges --\u003e\n```\n\nWhich can be included with:\n\n```html\n\u003c!-- include common.md#badges --\u003e\n```\n\nYou can exclude a file from processing by having as the first (or last) line:\n\n```html\n\u003c!-- exclude --\u003e\n```\n\n## Action Usage\n\n```\n- name: +Mᐁ includes\n  uses: devlooped/actions-include@v1\n  with:\n    # files to include for processing, i.e. '*.md'\n    # Default: *.md\n    include: ''\n\n    # files to exclude from processing, i.e. 'header.md'\n    # Default: ''\n    exclude: ''\n\n    # whether to recurse into subdirectories\n    # Default: true\n    recurse: true|false\n\n    # Whether to validate include links. If false, a warning will be \n    # generated instead of an error.\n    # Default: true\n    validate: true|false\n```\n\n## Example\n\nTo run the action and automatically create a PR with the resolved includes:\n\n```yml\non: \n  push:\n    branches:\n      - 'main'\n    paths:\n      - '**.md'    \n\njobs:\n  includes:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 🤘 checkout\n        uses: actions/checkout@v2\n\n      - name: +Mᐁ includes\n        uses: devlooped/actions-include@v1\n\n      - name: ✍ pull request\n        uses: peter-evans/create-pull-request@v3\n        with:\n          add-paths: '**.md'\n          base: main\n          branch: markdown-includes\n          delete-branch: true\n          labels: docs\n          commit-message: +Mᐁ includes\n          title: +Mᐁ includes\n          body: +Mᐁ includes\n```\n\nNote how you can trivially create PRs that update the changed \nfiles so the includes are always resolved automatically whenever \nyou change any of the monitored files. \n\n## How it works\n\nYou can include content from arbitrary external files with:\n\n```Markdown\n\u003c!-- include header.md --\u003e\n\n# This my actual content\n\n\u003c!-- include https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n# Sponsors \n\n\u003c!-- sponsors.md --\u003e\n[![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png \"Clarius Org\")](https://github.com/clarius)\n[![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png \"MFB Technologies, Inc.\")](https://github.com/MFB-Technologies-Inc)\n[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png \"Torutek\")](https://github.com/torutek-gh)\n[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png \"DRIVE.NET, Inc.\")](https://github.com/drivenet)\n[![Keith Pickford](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Keflon.png \"Keith Pickford\")](https://github.com/Keflon)\n[![Thomas Bolon](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tbolon.png \"Thomas Bolon\")](https://github.com/tbolon)\n[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png \"Kori Francis\")](https://github.com/kfrancis)\n[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png \"Toni Wenzel\")](https://github.com/twenzel)\n[![Uno Platform](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/unoplatform.png \"Uno Platform\")](https://github.com/unoplatform)\n[![Dan Siegel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dansiegel.png \"Dan Siegel\")](https://github.com/dansiegel)\n[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png \"Reuben Swartz\")](https://github.com/rbnswartz)\n[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png \"Jacob Foshee\")](https://github.com/jfoshee)\n[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png \"\")](https://github.com/Mrxx99)\n[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png \"Eric Johnson\")](https://github.com/eajhnsn1)\n[![Ix Technologies B.V.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/IxTechnologies.png \"Ix Technologies B.V.\")](https://github.com/IxTechnologies)\n[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png \"David JENNI\")](https://github.com/davidjenni)\n[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png \"Jonathan \")](https://github.com/Jonathan-Hickey)\n[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png \"Charley Wu\")](https://github.com/akunzai)\n[![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png \"Jakob Tikjøb Andersen\")](https://github.com/jakobt)\n[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png \"Tino Hager\")](https://github.com/tinohager)\n[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png \"Ken Bonny\")](https://github.com/KenBonny)\n[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png \"Simon Cropp\")](https://github.com/SimonCropp)\n[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png \"agileworks-eu\")](https://github.com/agileworks-eu)\n[![sorahex](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sorahex.png \"sorahex\")](https://github.com/sorahex)\n[![Zheyu Shen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/arsdragonfly.png \"Zheyu Shen\")](https://github.com/arsdragonfly)\n[![Vezel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/vezel-dev.png \"Vezel\")](https://github.com/vezel-dev)\n[![ChilliCream](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ChilliCream.png \"ChilliCream\")](https://github.com/ChilliCream)\n[![4OTC](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/4OTC.png \"4OTC\")](https://github.com/4OTC)\n[![Vincent Limo](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/v-limo.png \"Vincent Limo\")](https://github.com/v-limo)\n[![Jordan S. Jones](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jordansjones.png \"Jordan S. Jones\")](https://github.com/jordansjones)\n[![domischell](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/DominicSchell.png \"domischell\")](https://github.com/DominicSchell)\n[![Joseph Kingry](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jkingry.png \"Joseph Kingry\")](https://github.com/jkingry)\n\n\n\u003c!-- sponsors.md --\u003e\n\n[![Sponsor this project](https://raw.githubusercontent.com/devlooped/sponsors/main/sponsor.png \"Sponsor this project\")](https://github.com/sponsors/devlooped)\n\u0026nbsp;\n\n[Learn more about GitHub Sponsors](https://github.com/sponsors)\n\n\u003c!-- https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n```\n\nThe action is idempotent, so it is safe for it to run on pushes of the \nsame files it changed via the includes (since no further changes will \nbe detected).\n\n\u003e NOTE: the included path must be relative to the including file. \n\n## Limitations\n\n* Nested includes are not supported for now (the `include` keyword inside the HTML \n  comment \"directive\" will be stripped on inclusion).\n* File processing order matches what the following equivalent command on the \n  working directory returns via PowerShell:\n  \n  ```\n  pwsh\u003e gci -include [include] -exclude [exclude] [-recurse]\n  ```\n\n  This knowledge can be used to workaround the nested includes limitation by \n  running the action multiple times with different sets of files.\n\n\u003c!-- include https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlooped%2Factions-includes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlooped%2Factions-includes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlooped%2Factions-includes/lists"}