This repository has been archived by the owner on Jul 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added markdown, CSS and HTML linting. This included Docsify-specific markdown checking for links that won't work in Github. Additional changes required: * Github Actions deployment * Removed HTML from Markdown for simplicity * Added sub-headings to all headings #123 Closes: #103
- Loading branch information
Showing
59 changed files
with
3,962 additions
and
1,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: publish | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Deploy 🚀 | ||
uses: JamesIves/github-pages-deploy-action@v4.3.3 | ||
with: | ||
branch: gh-pages | ||
folder: dist | ||
|
||
- name: Clear Cache 🧹 | ||
uses: jakejarvis/cloudflare-purge-action@master | ||
env: | ||
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} | ||
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: test-and-lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [17.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"plugins": [], | ||
"maxerr": false, | ||
"raw-ignore-regex": false, | ||
"attr-bans": [ | ||
"align", | ||
"background", | ||
"bgcolor", | ||
"border", | ||
"frameborder", | ||
"longdesc", | ||
"marginwidth", | ||
"marginheight", | ||
"scrolling", | ||
"style", | ||
"width" | ||
], | ||
"indent-delta": false, | ||
"indent-style": "nonmixed", | ||
"indent-width": 2, | ||
"indent-width-cont": false, | ||
"spec-char-escape": true, | ||
"text-ignore-regex": false, | ||
"tag-bans": [ | ||
"style", | ||
"b", | ||
"i" | ||
], | ||
"tag-close": true, | ||
"tag-name-lowercase": true, | ||
"tag-name-match": true, | ||
"tag-self-close": false, | ||
"doctype-first": false, | ||
"doctype-html5": false, | ||
"attr-name-style": "dash", | ||
"attr-name-ignore-regex": false, | ||
"attr-no-dup": true, | ||
"attr-no-unsafe-char": true, | ||
"attr-order": false, | ||
"attr-quote-style": false, | ||
"attr-req-value": true, | ||
"attr-new-line": false, | ||
"attr-validate": true, | ||
"id-no-dup": true, | ||
"id-class-no-ad": true, | ||
"id-class-style": "dash", | ||
"class-no-dup": true, | ||
"class-style": false, | ||
"id-class-ignore-regex": false, | ||
"img-req-alt": true, | ||
"img-req-src": true, | ||
"html-valid-content-model": true, | ||
"head-valid-content-model": true, | ||
"href-style": false, | ||
"label-req-for": true, | ||
"line-end-style": false, | ||
"line-no-trailing-whitespace": false, | ||
"line-max-len": false, | ||
"line-max-len-ignore-regex": false, | ||
"head-req-title": true, | ||
"title-no-dup": true, | ||
"title-max-len": 60, | ||
"html-req-lang": false, | ||
"lang-style": "case", | ||
"fig-req-figcaption": false, | ||
"focusable-tabindex-style": false, | ||
"input-radio-req-name": true, | ||
"input-req-label": false, | ||
"table-req-caption": false, | ||
"table-req-header": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module.exports = { | ||
"names": [ "docsify-links-fragments-only" ], | ||
"description": "Internal Docsify should use URL fragments (and not '?id=')", | ||
"tags": [ "custom", "docsify" ], | ||
"function": (params, onError) => { | ||
params | ||
.tokens | ||
.filter((token) => token.type === "inline") | ||
.forEach((inline) => { | ||
inline | ||
.children | ||
.filter((child) => child.type === 'link_open') | ||
.forEach((link) => { | ||
for (const attr of link.attrs) { | ||
if (isDocsifyLink(attr) && isRelativeLink(attr) && attr[1].includes('?id=')) { | ||
onError({ | ||
"lineNumber": inline.lineNumber, | ||
"context": attr[1] | ||
}); | ||
} | ||
} | ||
}) | ||
}); | ||
} | ||
}; | ||
|
||
const isDocsifyLink = (link) => { | ||
const href = link[1] | ||
return link[0] === "href" | ||
&& href | ||
&& !href.startsWith('http') | ||
} | ||
|
||
|
||
const isRelativeLink = (link) => { | ||
const href = link[1] | ||
return link[0] === "href" | ||
&& href | ||
&& (href.startsWith('.') || href.startsWith('#')) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module.exports = { | ||
"names": [ "docsify-relative-link" ], | ||
"description": "Internal Docsify links should be relative", | ||
"tags": [ "custom", "docsify" ], | ||
"function": (params, onError) => { | ||
params | ||
.tokens | ||
.filter((token) => token.type === "inline") | ||
.forEach((inline) => { | ||
inline | ||
.children | ||
.filter((child) => child.type === 'link_open') | ||
.forEach((link) => { | ||
for (const attr of link.attrs) { | ||
if (isDocsifyLink(attr) && !isRelativeLink(attr)) { | ||
onError({ | ||
"lineNumber": inline.lineNumber, | ||
"context": attr[1] | ||
}); | ||
} | ||
} | ||
}) | ||
}); | ||
} | ||
}; | ||
|
||
const isDocsifyLink = (link) => { | ||
const href = link[1] | ||
return link[0] === "href" | ||
&& href | ||
&& !href.startsWith('http') | ||
} | ||
|
||
|
||
const isRelativeLink = (link) => { | ||
const href = link[1] | ||
return link[0] === "href" | ||
&& href | ||
&& (href.startsWith('.') || href.startsWith('#')) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"default": true, | ||
"no-inline-html": false, | ||
"commands-show-output": false, | ||
"ul-indent": false, | ||
"line-length": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "stylelint-config-standard" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,44 @@ | ||
# Contents | ||
|
||
+ Characters | ||
+ [Attributes](pages/characters/attributes.md) | ||
+ [Skills](pages/characters/skills.md) | ||
+ [Allegiances](pages/characters/allegiances.md) | ||
+ [Backgrounds](pages/backgrounds/index.md) | ||
+ [Guild Artisan](pages/backgrounds/guild-artisan.md) | ||
+ [Knave](pages/backgrounds/knave.md) | ||
+ [Noble](pages/backgrounds/noble.md) | ||
+ [Magic Specialities](pages/backgrounds/magic.md) | ||
+ [Classes](pages/classes/index.md) | ||
+ [The Mighty](pages/classes/mighty.md) | ||
+ [The Cunning](pages/classes/cunning.md) | ||
+ [The Wise](pages/classes/wise.md) | ||
+ [Attributes](./pages/characters/attributes.md) | ||
+ [Skills](./pages/characters/skills.md) | ||
+ [Allegiances](./pages/characters/allegiances.md) | ||
+ [Backgrounds](./pages/backgrounds/index.md) | ||
+ [Guild Artisan](./pages/backgrounds/guild-artisan.md) | ||
+ [Knave](./pages/backgrounds/knave.md) | ||
+ [Noble](./pages/backgrounds/noble.md) | ||
+ [Magic Specialities](./pages/backgrounds/magic.md) | ||
+ [Classes](./pages/classes/index.md) | ||
+ [The Mighty](./pages/classes/mighty.md) | ||
+ [The Cunning](./pages/classes/cunning.md) | ||
+ [The Wise](./pages/classes/wise.md) | ||
+ Basic Rules | ||
+ [Rolling](pages/rules/rolling.md) | ||
+ [Checks](pages/rules/rolling/checks.md) | ||
+ [Group Checks](pages/rules/rolling/group.md) | ||
+ [Contests](pages/rules/rolling/contests.md) | ||
+ [Saves](pages/rules/rolling/saves.md) | ||
+ [Advantage/Disadvantage](pages/rules/advantage.md) | ||
+ [Proficiency](pages/rules/proficiency.md) | ||
+ [Usage Die](pages/rules/usage.md) | ||
+ [Distance](pages/rules/distance.md) | ||
+ [Rests](pages/rules/rests.md) | ||
+ [Conditions](pages/rules/conditions.md) | ||
+ [Combat](pages/combat/index.md) | ||
+ [Actions](pages/combat/actions.md) | ||
+ [Attacks](pages/combat/attacks.md) | ||
+ [Moves](pages/combat/moves.md) | ||
+ [Bonus Actions](pages/combat/bonus-actions.md) | ||
+ [Reactions](pages/combat/reactions.md) | ||
+ [Stamina](pages/combat/stamina.md) | ||
* Equipment | ||
* [Wealth](pages/equipment/wealth.md) | ||
* [Armour](pages/equipment/armour.md) | ||
* [Packs](pages/equipment/packs.md) | ||
* [Retainers](pages/equipment/retainers.md) | ||
+ [Rolling](./pages/rules/rolling.md) | ||
+ [Checks](./pages/rules/rolling/checks.md) | ||
+ [Group Checks](./pages/rules/rolling/group.md) | ||
+ [Contests](./pages/rules/rolling/contests.md) | ||
+ [Saves](./pages/rules/rolling/saves.md) | ||
+ [Advantage/Disadvantage](./pages/rules/advantage.md) | ||
+ [Proficiency](./pages/rules/proficiency.md) | ||
+ [Usage Die](./pages/rules/usage.md) | ||
+ [Distance](./pages/rules/distance.md) | ||
+ [Rests](./pages/rules/rests.md) | ||
+ [Conditions](./pages/rules/conditions.md) | ||
+ [Combat](./pages/combat/index.md) | ||
+ [Actions](./pages/combat/actions.md) | ||
+ [Attacks](./pages/combat/attacks.md) | ||
+ [Moves](./pages/combat/moves.md) | ||
+ [Bonus Actions](./pages/combat/bonus-actions.md) | ||
+ [Reactions](./pages/combat/reactions.md) | ||
+ [Stamina](./pages/combat/stamina.md) | ||
+ Equipment | ||
+ [Wealth](./pages/equipment/wealth.md) | ||
+ [Armour](./pages/equipment/armour.md) | ||
+ [Packs](./pages/equipment/packs.md) | ||
+ [Retainers](./pages/equipment/retainers.md) | ||
+ Colophon | ||
+ [Design Notes](design-notes.md) | ||
+ [Contributing](contributing.md) | ||
+ [License](license.md) | ||
+ [Credits](credits.md) | ||
+ [Design Notes](./design-notes.md) | ||
+ [Contributing](./contributing.md) | ||
+ [License](./license.md) | ||
+ [Credits](./credits.md) |
Oops, something went wrong.