Contents
-- {% for nav_subitem in nav_item.children %} - {% if nav_subitem.url != page.file.url %} -- {% endif %} - {% endfor %} - {% endif %} -- {{nav_subitem.title}} - - {% endif %} - {% endfor %} -
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index ea02fe3..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build -on: - push: - branches: - - main -jobs: - build: - runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write - steps: - - name: Setup Python - uses: actions/setup-python@v2 - - name: Checkout branch - uses: actions/checkout@master - with: - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - name: Setup git - run: | - git config --global user.email "todd.e.parsons@googlemail.com" - git config --global user.name "Todd Parsons" - - name: Build - run: | - python utils/version.py - python utils/build.py - python utils/export.py - - name: Commit build - run: | - git add --all - git commit --all -m "sys: Build for release" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: release - force: true - pages: - runs-on: ubuntu-latest - steps: - - name: Setup Python - uses: actions/setup-python@v2 - - name: Checkout branch - uses: actions/checkout@master - with: - fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - - name: Dependencies - run: | - python -m pip install --upgrade pip - pip install mkdocs - pip install -e "./mkdocs" - - name: Build - run: | - python utils/build.py - cd docs - mkdocs build - cd .. - mv docs/docs/* docs - - name: Commit - run: | - git config --global user.email "todd.e.parsons@googlemail.com" - git config --global user.name "Todd Parsons" - git add --all - git commit --all -m "Build pages" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - force: true \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..9c70615 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,37 @@ +name: Publish docs + +on: push + +jobs: + build: + name: Build docs + runs-on: macos-11 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + python3 -m pip install mkdocs mkdocs-torillic + + - name: Build docs + run: | + mkdocs build + + - name: Commit + run: | + git add --all + git commit --all -m "sys: Build documentation" + + - name: Push + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages + force: true \ No newline at end of file diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml deleted file mode 100644 index 7d8d3ff..0000000 --- a/.github/workflows/pypi.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Publish package - -on: - workflow_dispatch: - push: - tags: - - '*' - -jobs: - build: - runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write - steps: - - uses: actions/checkout@master - - - name: Setup Python - uses: actions/setup-python@v3 - with: - python-version: '3.10' - - - name: Install packages - run: | - python -m pip install build twine - - - name: Check and update version - id: version - run: | - python utils/publish.py - - - name: Build - run: | - python -m build mkdocs - - - name: Upload to PyPi - if: startsWith(github.ref, 'refs/tags/') - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.gitignore b/.gitignore index cbd035c..8696685 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,6 @@ sphinx/example/stderr.txt mkdocs/example/site scratch.* -*.code-workspace \ No newline at end of file +*.code-workspace + +.export \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index dcb1071..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -. -../html-preview -../admin \ No newline at end of file diff --git a/docs/dist.stub b/docs/dist.stub deleted file mode 100644 index 0b1a10a..0000000 --- a/docs/dist.stub +++ /dev/null @@ -1,3 +0,0 @@ -This file will be replaced by the base Torillic folder when the theme is built (by running `utils/build.py`). - -If you've checked out the `main` branch from GitHub, you can either build Torillic or switch to the `release` branch which is already built. \ No newline at end of file diff --git a/docs/src/examples.md b/docs_src/examples.md similarity index 100% rename from docs/src/examples.md rename to docs_src/examples.md diff --git a/docs/src/index.md b/docs_src/index.md similarity index 100% rename from docs/src/index.md rename to docs_src/index.md diff --git a/docs/src/logo.png b/docs_src/logo.png similarity index 100% rename from docs/src/logo.png rename to docs_src/logo.png diff --git a/docs/src/previews/mkdocs.png b/docs_src/previews/mkdocs.png similarity index 100% rename from docs/src/previews/mkdocs.png rename to docs_src/previews/mkdocs.png diff --git a/docs/mkdocs.yaml b/mkdocs.yaml similarity index 81% rename from docs/mkdocs.yaml rename to mkdocs.yaml index f401289..d2a8e20 100644 --- a/docs/mkdocs.yaml +++ b/mkdocs.yaml @@ -3,12 +3,10 @@ theme: features: - navigation.pathnavigation site_name: Torillic -docs_dir: src +docs_dir: docs_src site_dir: docs nav: - Home: index.md - Example Statblocks: examples.md -exclude_docs: | - desktop.ini markdown_extensions: - nl2br \ No newline at end of file diff --git a/mkdocs/example/docs_src/bandits/Bandit Captain.md b/mkdocs/example/docs_src/bandits/Bandit Captain.md deleted file mode 100644 index 7155570..0000000 --- a/mkdocs/example/docs_src/bandits/Bandit Captain.md +++ /dev/null @@ -1,29 +0,0 @@ -# Bandit Captain -*Medium humanoid, any non-lawful alignment* - -![Bandit Captain](https://www.worldanvil.com/uploads/images/b1781d67dd105da3325535d5c263394a.png) - -> **Armor Class** 15 -> **Hit Points** 65 (10d8 + 20) -> **Speed** 30 ft. -> -> | STR | DEX | CON | INT | WIS | CHA | -> |------|------|------|------|------|------| -> | 15 | 16 | 14 | 14 | 11 | 14 | -> | (+2) | (+3) | (+2) | (+2) | (+0) | (+2) | -> -> **Senses** Passive Perception 10 -> **Languages** Any two -> **Challenge** 2 (450 XP) - -#### Actions - -***Multiattack.*** The captain makes three melee attacks: two with its scimitar and one with its dagger. Or the captain makes two ranged attacks with its daggers. - -***Scimitar.** Melee Weapon Attack:* +5 to hit, reach 5 ft., one target. *Hit:* 6 (1d6 + 3) slashing damage. - -***Dagger.** Melee or Ranged Weapon Attack:* +5 to hit, reach 5 ft. or range 20/60 ft., one target. *Hit:* 5 (1d4 + 3) piercing damage. - -#### Reactions - -***Parry.*** The captain adds 2 to its AC against one melee attack that would hit it. To do so, the captain must see the attacker and be wielding a melee weapon. diff --git a/mkdocs/example/docs_src/bandits/Bandit.md b/mkdocs/example/docs_src/bandits/Bandit.md deleted file mode 100644 index 42fb4e4..0000000 --- a/mkdocs/example/docs_src/bandits/Bandit.md +++ /dev/null @@ -1,23 +0,0 @@ -# Bandit -*Medium humanoid, any non-lawful alignment* - -![Bandit](https://2e.aonprd.com/Images/NPCs/Criminal_Bandit.png) - -> **Armor Class** 12 -> **Hit Points** 11 (2d8 + 2) -> **Speed** 30 ft. -> -> | STR | DEX | CON | INT | WIS | CHA | -> |------|------|------|------|------|------| -> | 11 | 12 | 12 | 10 | 10 | 10 | -> | (+0) | (+1) | (+1) | (+0) | (+0) | (+0) | -> -> **Senses** Passive Perception 10 -> **Languages** Any one (usually Common) -> **Challenge** 1/8 (25 XP) - -#### Actions - -***Scimitar.** Melee Weapon Attack:* +3 to hit, reach 5 ft., one target. *Hit:* 4 (1d6 + 1) slashing damage. - -***Light Crossbow.** Ranged Weapon Attack:* +3 to hit, range 80 ft./320 ft., one target. *Hit:* 5 (1d8 + 1) piercing damage. diff --git a/mkdocs/example/docs_src/bandits/index.md b/mkdocs/example/docs_src/bandits/index.md deleted file mode 100644 index 9ada827..0000000 --- a/mkdocs/example/docs_src/bandits/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# Bandit encounter -Session a bit boring? Let's fight some bandits! Classic TTRPG stuff! \ No newline at end of file diff --git a/mkdocs/example/docs_src/dragon/Adult Blue Dragon.md b/mkdocs/example/docs_src/dragon/Adult Blue Dragon.md deleted file mode 100644 index 8cbbb3d..0000000 --- a/mkdocs/example/docs_src/dragon/Adult Blue Dragon.md +++ /dev/null @@ -1,47 +0,0 @@ -# Adult Blue Dragon - -*Huge dragon, lawful evil* - -![Ancient Blue Dragon - Monsters - Archives of Nethys: Pathfinder ...](https://2e.aonprd.com/Images/Monsters/DragonBlue_AncientBlueDragon.png) - -> **Armor Class** 19 (Natural Armor) -> **Hit Points** 225 (18d12 + 108) -> **Speed** 40 ft., burrow 30 ft., fly 80 ft. -> -> | STR | DEX | CON | INT | WIS | CHA | -> |------|------|------|------|------|------| -> | 25 | 10 | 23 | 16 | 15 | 19 | -> | (+7) | (+0) | (+6) | (+3) | (+2) | (+4) | -> -> **Saving Throws** DEX +5, CON +11, WIS +7, CHA +9 -> **Skills** [Perception](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Perception) +12, [Stealth](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Stealth) +5 -> **Damage Immunities** Lightning -> **Senses** [Blindsight](https://www.dndbeyond.com/compendium/rules/basic-rules/monsters#Blindsight) 60 ft., [Darkvision](https://www.dndbeyond.com/compendium/rules/basic-rules/monsters#Darkvision) 120 ft., Passive Perception 22 -> **Languages** Common, Draconic -> **Challenge** 16 (15,000 XP) - -***Legendary Resistance (3/Day).*** If the dragon fails a saving throw, it can choose to succeed instead. - -#### Actions - -***Multiattack.*** The dragon can use its Frightful Presence. It then makes three attacks: one with its bite and two with its claws. - -***Bite.*** *Melee Weapon Attack:* +12 to hit, reach 10 ft., one target. *Hit:* 18 (2d10 + 7) piercing damage plus 5 (1d10) lightning damage. - -***Claw.*** *Melee Weapon Attack:* +12 to hit, reach 5 ft., one target. *Hit:* 14 (2d6 + 7) slashing damage. - -***Tail.*** *Melee Weapon Attack:* +12 to hit, reach 15 ft., one target. *Hit:* 16 (2d8 + 7) bludgeoning damage. - -***Frightful Presence.*** Each creature of the dragon's choice that is within 120 feet of the dragon and aware of it must succeed on a DC 17 Wisdom saving throw or become [frightened](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Frightened) for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If a creature's saving throw is successful or the effect ends for it, the creature is immune to the dragon's Frightful Presence for the next 24 hours. - -***Lightning Breath (Recharge 5–6).*** The dragon exhales lightning in a 90-foot line that is 5 feet wide. Each creature in that line must make a DC 19 Dexterity saving throw, taking 66 (12d10) lightning damage on a failed save, or half as much damage on a successful one. - -#### Legendary Actions - -The dragon can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The dragon regains spent legendary actions at the start of its turn. - -***Detect.*** The dragon makes a Wisdom ([Perception](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Perception)) check. - -***Tail Attack.*** The dragon makes a tail attack. - -***Wing Attack (Costs 2 Actions).*** The dragon beats its wings. Each creature within 10 feet of the dragon must succeed on a DC 20 Dexterity saving throw or take 14 (2d6 + 7) bludgeoning damage and be knocked [prone](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Prone). The dragon can then fly up to half its flying speed. \ No newline at end of file diff --git a/mkdocs/example/docs_src/dragon/Cultist.md b/mkdocs/example/docs_src/dragon/Cultist.md deleted file mode 100644 index a126075..0000000 --- a/mkdocs/example/docs_src/dragon/Cultist.md +++ /dev/null @@ -1,25 +0,0 @@ -# Cultist - -*Medium Humanoid (Any Race), Any Non-Good Alignment* - -![Cultist](https://www.dndbeyond.com/avatars/thumbnails/14/481/1000/1000/636364323106021375.png) - -> **Armor Class** 12 (leather armor) -> **Hit Points** 9 (2d8) -> **Speed** 30 ft. -> -> | STR | DEX | CON | INT | WIS | CHA | -> |------|------|------|------|------|------| -> | 11 | 12 | 10 | 10 | 11 | 10 | -> | (+0) | (+1) | (+0) | (+0) | (+0) | (+0) | -> -> **Skills** [Deception](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Deception) +2, [Religion](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Religion) +2 -> **Senses** Passive Perception 10 -> **Languages** Any one language (usually Common) -> **Challenge** 1/8 (25 XP) - -***Dark Devotion.*** The cultist has advantage on saving throws against being [charmed](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Charmed) or [frightened](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Frightened). - -#### Actions - -***Scimitar.** Melee Weapon Attack:* +3 to hit, reach 5 ft., one creature. *Hit:* 4 (1d6 + 1) slashing damage. \ No newline at end of file diff --git a/mkdocs/example/docs_src/dragon/Kobold.md b/mkdocs/example/docs_src/dragon/Kobold.md deleted file mode 100644 index 2c26e98..0000000 --- a/mkdocs/example/docs_src/dragon/Kobold.md +++ /dev/null @@ -1,28 +0,0 @@ -# Kobold - -*Small Humanoid (Kobold), Lawful Evil* - -![Kobold](https://www.dndbeyond.com/avatars/thumbnails/30832/207/1000/1000/638063832924455756.png) - -> **Armor Class** 12 -> **Hit Points** 5 (2d6 - 2) -> **Speed** 30 ft. -> -> | STR | DEX | CON | INT | WIS | CHA | -> |------|------|------|------|------|------| -> | 7 | 15 | 9 | 8 | 7 | 8 | -> | (-2) | (+2) | (-1) | (-1) | (-2) | (-1) | -> -> **Senses** [Darkvision](https://www.dndbeyond.com/compendium/rules/basic-rules/monsters#Darkvision) 60 ft., Passive Perception 8 -> **Languages** Common, Draconic -> **Challenge** 1/8 (25 XP) - -***Sunlight Sensitivity.*** While in sunlight, the kobold has disadvantage on attack rolls, as well as on Wisdom ([Perception](https://www.dndbeyond.com/compendium/rules/basic-rules/using-ability-scores#Perception)) checks that rely on sight. - -***Pack Tactics.*** The kobold has advantage on an attack roll against a creature if at least one of the kobold's allies is within 5 feet of the creature and the ally isn't [incapacitated](https://www.dndbeyond.com/compendium/rules/basic-rules/appendix-a-conditions#Incapacitated). - -#### Actions - -***Dagger.** Melee Weapon Attack:* +4 to hit, reach 5 ft., one target. *Hit:* 4 (1d4 + 2) piercing damage. - -***Sling.** Ranged Weapon Attack:* +4 to hit, range 30/120 ft., one target. *Hit:* 4 (1d4 + 2) bludgeoning damage. \ No newline at end of file diff --git a/mkdocs/example/docs_src/dragon/index.md b/mkdocs/example/docs_src/dragon/index.md deleted file mode 100644 index 605b98d..0000000 --- a/mkdocs/example/docs_src/dragon/index.md +++ /dev/null @@ -1,2 +0,0 @@ -# Dragon encounter -Fight through hoards of kobold with humanoid cultists scattered throughout to take on their master: An adult blue dragon. diff --git a/mkdocs/example/docs_src/index.md b/mkdocs/example/docs_src/index.md deleted file mode 100644 index 411052b..0000000 --- a/mkdocs/example/docs_src/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Torillic example wiki - -Welcome! Here I've put together a few basic resources to show how you can use mkdocs with torillic to make a professional looking wiki for your world / campaign. \ No newline at end of file diff --git a/mkdocs/example/mkdocs.yml b/mkdocs/example/mkdocs.yml deleted file mode 100644 index fad0e5a..0000000 --- a/mkdocs/example/mkdocs.yml +++ /dev/null @@ -1,28 +0,0 @@ -site_name: Torillic MkDocs Example Wiki -# this is how you tell mkdocs to use torillic! -theme: - name: torillic - custom_dir: ../mkdocs_torillic -# choose a folder to build from and one to build to -docs_dir: docs_src -site_dir: docs -# tell mkdocs what links to put in the nav bar -# for bigger wikis, I suggest using something like the `literate-nav` plugin to generate this dynamically -nav: - - Home: index.md - - Bandit encounter: - - Home: bandits/index.md - - Bandit: bandits/Bandit.md - - Bandit Captain: bandits/Bandit Captain.md - - Dragon encounter: - - Home: dragon/index.md - - Adult Blue Dragon: dragon/Adult Blue Dragon.md - - Cultist: dragon/Cultist.md - - Kobold: dragon/Kobold.md -# tell mkdocs what to ignore (like those annoying junk files Google Drive makes) -exclude_docs: | - desktop.ini -# tell mkdocs what markdown syntax to use -markdown_extensions: - # "new line to break" - means it keeps single line breaks in the built html - - nl2br \ No newline at end of file diff --git a/mkdocs/mkdocs_torillic/__init__.py b/mkdocs/mkdocs_torillic/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/mkdocs/mkdocs_torillic/css/torillic.css b/mkdocs/mkdocs_torillic/css/torillic.css deleted file mode 100644 index 95e652f..0000000 --- a/mkdocs/mkdocs_torillic/css/torillic.css +++ /dev/null @@ -1,14 +0,0 @@ -@import url("torillic/torillic.css"); - -body { - padding: 0; - margin: 0; -} - -.torillic-background { - padding: 4rem; -} - - - - diff --git a/mkdocs/mkdocs_torillic/css/torillic.stub b/mkdocs/mkdocs_torillic/css/torillic.stub deleted file mode 100644 index 0b1a10a..0000000 --- a/mkdocs/mkdocs_torillic/css/torillic.stub +++ /dev/null @@ -1,3 +0,0 @@ -This file will be replaced by the base Torillic folder when the theme is built (by running `utils/build.py`). - -If you've checked out the `main` branch from GitHub, you can either build Torillic or switch to the `release` branch which is already built. \ No newline at end of file diff --git a/mkdocs/mkdocs_torillic/main.html b/mkdocs/mkdocs_torillic/main.html deleted file mode 100644 index 2ce1f32..0000000 --- a/mkdocs/mkdocs_torillic/main.html +++ /dev/null @@ -1,49 +0,0 @@ - - - -
-- {% for nav_subitem in nav_item.children %} - {% if nav_subitem.url != page.file.url %} -- {% endif %} - {% endfor %} - {% endif %} -- {{nav_subitem.title}} - - {% endif %} - {% endfor %} -