https://github.com/robitx/snippet-permalink-updater-action
Automates updating Markdown files with permalinks to code snippets
https://github.com/robitx/snippet-permalink-updater-action
Last synced: 3 months ago
JSON representation
Automates updating Markdown files with permalinks to code snippets
- Host: GitHub
- URL: https://github.com/robitx/snippet-permalink-updater-action
- Owner: Robitx
- License: mit
- Created: 2024-07-22T21:57:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T00:04:57.000Z (almost 2 years ago)
- Last Synced: 2026-01-30T10:45:53.418Z (5 months ago)
- Size: 21.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Snippet Permalink Updater Action
This GitHub Action automatically updates a Markdown file with a permalink to a specific code snippet.
It's useful for keeping documentation up-to-date with the latest version of your code.
## Features
- Finds a specific snippet in a source file using start and end markers
- Generates a permalink to the snippet, including the latest commit ID
- Updates a specified Markdown file with the new permalink
## Usage
To use this action in your workflow, add the following step:
```yaml
- name: Update Markdown with Snippet Permalink
uses: Robitx/snippet-permalink-updater-action@main
with:
snippet_file: 'path/to/your/source/file.ext'
start_marker: 'README_REFERENCE_MARKER_START'
end_marker: 'README_REFERENCE_MARKER_END'
markdown_file: 'README.md'
replace_marker: ''