Skip to content

Commit 21ce354

Browse files
committed
feat: initial commit of markdown-it-anchor-sections
A markdown-it plugin for wrapping headers + content in a section tag with unique identifier. Compatible with IntersectionObservers.
1 parent 859ae6f commit 21ce354

26 files changed

Lines changed: 7062 additions & 24 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: castastrophe
2+
buy_me_a_coffee: castastrophe

.github/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- skip-changelog
5+
categories:
6+
- title: "✨ Features"
7+
labels:
8+
- "type: feature"
9+
- "type: enhancement"
10+
- title: "🐛 Bug Fixes"
11+
labels:
12+
- "type: bug"
13+
- "type: fix"
14+
- title: "⚡ Performance Improvements"
15+
labels:
16+
- "type: performance"
17+
- title: "⏪ Reverts"
18+
labels:
19+
- "type: revert"
20+
- title: "📚 Documentation"
21+
labels:
22+
- "type: docs"
23+
- "type: documentation"
24+
- title: "♻️ Refactoring"
25+
labels:
26+
- "type: refactor"
27+
- title: "🔧 Maintenance"
28+
labels:
29+
- "type: chore"
30+
- "type: build"
31+
- "type: ci"
32+
- "type: dependencies"
33+
- "dependencies"

.github/renovate.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"baseBranchPatterns": ["main"],
4+
"extends": [
5+
"config:recommended",
6+
":widenPeerDependencies",
7+
"group:githubArtifactActions"
8+
],
9+
"labels": [],
10+
"packageRules": [
11+
{
12+
"matchDatasources": ["npm"],
13+
"minimumReleaseAge": "1 month"
14+
}
15+
],
16+
"rebaseWhen": "behind-base-branch",
17+
"reviewers": ["castastrophe"],
18+
"lockFileMaintenance": {
19+
"enabled": true,
20+
"extends": ["schedule:monthly"]
21+
}
22+
}

.github/workflows/code-review.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Code review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, ready_for_review, reopened]
6+
7+
jobs:
8+
code-review:
9+
# only run if the pull request is from the repository owner and the PR is not a draft
10+
if: github.event.pull_request.user.login == github.repository_owner && github.event.pull_request.draft == false
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
pull-requests: write
16+
issues: read
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 1
24+
25+
- name: Run code review
26+
id: claude-review
27+
uses: anthropics/claude-code-action@v1
28+
with:
29+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
30+
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
31+
plugins: 'code-review@claude-code-plugins'
32+
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
issues: write
11+
pull-requests: write
12+
id-token: write
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
release:
20+
name: Release
21+
runs-on: ubuntu-latest
22+
env:
23+
CI: true
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
steps:
27+
- name: Check out code
28+
uses: actions/checkout@v6
29+
with:
30+
fetch-depth: 0
31+
persist-credentials: false
32+
33+
- name: Enable Corepack
34+
run: corepack enable
35+
36+
- name: Use Node LTS version
37+
uses: actions/setup-node@v6
38+
with:
39+
node-version-file: .nvmrc
40+
cache: yarn
41+
registry-url: https://registry.npmjs.org
42+
43+
- name: Install dependencies
44+
run: yarn install --immutable
45+
46+
- name: Semantic release
47+
uses: cycjimmy/semantic-release-action@v6.0.0
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
51+
GIT_AUTHOR_NAME: Cassondra Roberts
52+
GIT_AUTHOR_EMAIL: castastrophe@users.noreply.github.com
53+
GIT_COMMITTER_NAME: Cassondra Roberts
54+
GIT_COMMITTER_EMAIL: castastrophe@users.noreply.github.com

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Tests validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build-validation:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v6
17+
18+
- name: Enable Corepack
19+
run: corepack enable
20+
21+
- name: Use Node LTS version
22+
uses: actions/setup-node@v6
23+
with:
24+
cache: yarn
25+
node-version: 24
26+
27+
- name: Install dependencies
28+
run: yarn install --immutable
29+
30+
- name: Run tests
31+
run: yarn coverage
32+
33+
- name: Coverage summary
34+
uses: irongut/CodeCoverageSummary@v1.3.0
35+
if: github.event_name == 'pull_request'
36+
with:
37+
filename: coverage/cobertura-coverage.xml
38+
badge: true
39+
fail_below_min: true
40+
format: markdown
41+
hide_branch_rate: false
42+
indicators: true
43+
output: both
44+
45+
- name: Add Coverage PR Comment
46+
uses: marocchino/sticky-pull-request-comment@v3.0.2
47+
if: github.event_name == 'pull_request'
48+
with:
49+
recreate: true
50+
path: code-coverage-results.md

.gitignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Coverage directory
15+
coverage
16+
17+
# Dependency directories
18+
node_modules/
19+
20+
# npm cache
21+
.npm
22+
23+
# Plugin caches
24+
.cache
25+
.eslintcache
26+
.stylelintcache
27+
.netlify
28+
29+
# Output of 'npm pack'
30+
*.tgz
31+
32+
# Yarn Integrity file
33+
.yarn-integrity
34+
35+
# dotenv environment variables file
36+
.env
37+
38+
# Blob seed script (contains private content data — never commit)
39+
utilities/data/seed.js
40+
41+
# publish directory
42+
public
43+
44+
.DS_Store
45+
46+
# yarn
47+
.pnp.*
48+
.yarn/*
49+
!.yarn/patches
50+
!.yarn/plugins
51+
!.yarn/releases
52+
!.yarn/sdks
53+
!.yarn/versions
54+
55+
# Local Netlify folder
56+
.netlify
57+
58+
# Claude
59+
.claude/worktrees/*

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

0 commit comments

Comments
 (0)