Added README and release workflow for versioning
All checks were successful
Release / release (push) Successful in 1m20s
All checks were successful
Release / release (push) Successful in 1m20s
This commit is contained in:
56
.gitea/workflows/release.yml
Normal file
56
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*.*.*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Build changelog
|
||||||
|
id: changelog
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git fetch --tags --force
|
||||||
|
current_tag="${GITEA_REF_NAME}"
|
||||||
|
previous_tag="$(git tag --sort=-creatordate | grep -v "^${current_tag}$" | head -n 1)"
|
||||||
|
if [ -n "$previous_tag" ]; then
|
||||||
|
range="${previous_tag}..${current_tag}"
|
||||||
|
header="Changes since ${previous_tag}"
|
||||||
|
else
|
||||||
|
range="${current_tag}"
|
||||||
|
header="Initial release"
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "notes<<EOF"
|
||||||
|
echo "## ${header}"
|
||||||
|
git log "${range}" --pretty=format:"- %s (%h)" --no-merges
|
||||||
|
echo
|
||||||
|
echo "EOF"
|
||||||
|
} >> "$GITEA_OUTPUT"
|
||||||
|
|
||||||
|
- name: Package extension
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p dist
|
||||||
|
zip -r "dist/json-content-formatter-${GITEA_REF_NAME}.zip" \
|
||||||
|
. \
|
||||||
|
-x ".git/*" \
|
||||||
|
-x ".gitea/*" \
|
||||||
|
-x "dist/*"
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
body: ${{ steps.changelog.outputs.notes }}
|
||||||
|
files: dist/json-content-formatter-${{ gitea.ref_name }}.zip
|
||||||
35
README.md
Normal file
35
README.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# JSON Content Formatter
|
||||||
|
|
||||||
|
A Chrome extension that formats JSON in the current tab, highlights with
|
||||||
|
highlight.js, linkifies URLs, and offers collapsible views and line numbers.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Auto format (optional) for supported content types.
|
||||||
|
- Manual format via toolbar icon or context menu.
|
||||||
|
- Theme selection (light/dark + highlight.js theme).
|
||||||
|
- Line numbers toggle.
|
||||||
|
- Collapsible blocks for JSON, YAML, XML, and Markdown.
|
||||||
|
|
||||||
|
## Supported Languages
|
||||||
|
Defaults to JSON only. Enable additional languages in options:
|
||||||
|
- JSON
|
||||||
|
- Markdown
|
||||||
|
- Plaintext
|
||||||
|
- XML
|
||||||
|
- YAML
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
1. Load the extension via `chrome://extensions` (Developer mode > Load unpacked).
|
||||||
|
2. Open the extension options to configure:
|
||||||
|
- Auto format
|
||||||
|
- Theme mode and highlight theme
|
||||||
|
- Line numbers
|
||||||
|
- Enabled languages
|
||||||
|
3. Use:
|
||||||
|
- Toolbar icon click to format the current tab
|
||||||
|
- Right-click the icon > "Einstellungen" to open options
|
||||||
|
- Right-click the page > "JSON jetzt formatieren"
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Auto format requires host permissions to read page content.
|
||||||
|
- Manual formatting uses language auto-detection only for enabled languages.
|
||||||
Reference in New Issue
Block a user