-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to mdbook and fix links (#65)
* Convert to mdBook * Add ToB favicon * Clean up old `docs/` directory * The book is now built and deployed via GitHub Actions * Update contribution instructions with mdBook * Revive links with Wayback Machine * Update http -> https links * Add link and spell checker
- Loading branch information
Showing
106 changed files
with
290 additions
and
13,945 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,58 @@ | ||
--- | ||
name: Deploy GitHub Pages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
persist-credentials: false | ||
|
||
- name: Install mdbook | ||
run: | | ||
set -euxo pipefail | ||
mkdir mdbook-bin | ||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=mdbook-bin | ||
echo "dd131662665dd91880c8c23d867d36f6a8554286216c3a849b53a27d1a676917 mdbook-bin/mdbook" | sha256sum -c | ||
echo "$PWD/mdbook-bin" >> "$GITHUB_PATH" | ||
- name: Build artifacts | ||
run: | | ||
export MDBOOK_OUTPUT__HTML__GIT_REPOSITORY_URL="https://github.com/$REPO" | ||
export MDBOOK_OUTPUT__HTML__EDIT_URL_TEMPLATE="https://github.com/$REPO/edit/master/{path}" | ||
mdbook build | ||
env: | ||
REPO: "${{ github.repository }}" | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,39 @@ | ||
--- | ||
name: Check Markdown files correctness | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
# Extract links from Markdown texts and check if they are alive | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Restore lychee cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: .lycheecache | ||
key: cache-lychee-${{ github.sha }} | ||
restore-keys: cache-lychee- | ||
- uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # for v1.10.0 | ||
with: | ||
args: --base . -a 100..=103,200..=299,429 --verbose --no-progress --cache --max-cache-age 1d --scheme http --scheme https './**/*.md' | ||
fail: true | ||
|
||
# Spellcheck Markdown files using `retext` and `remark` | ||
# Uses: a custom dictionary file | ||
spellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: tbroadley/spellchecker-cli-action@v1 | ||
with: | ||
# No need to use a dictionary file with the disabled spell plugin | ||
# dictionaries: '.github/workflows/dictionary.txt' | ||
files: "'**/*.md'" | ||
quiet: true | ||
plugins: "indefinite-article repeated-words syntax-mentions syntax-urls" |
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,3 +1,4 @@ | ||
docs/ | ||
_book/ | ||
.DS_Store | ||
node_modules |
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,11 @@ | ||
https://vimeo.com/.* | ||
https://web.archive.org/.* | ||
https://.*.reddit.com/.* | ||
https://www.researchgate.net/.* | ||
|
||
# behind cloudflare | ||
https://www.cgisecurity.com/.* | ||
|
||
# network error from GH | ||
https://csapp.cs.cmu.edu/.* | ||
https://wiki.sei.cmu.edu/.* |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[book] | ||
title = "CTF Field Guide" | ||
description = "Getting and Using Other People's Computers" | ||
authors = ["Trail of Bits"] | ||
language = "en" | ||
multilingual = false | ||
src = "." | ||
|
||
[build] | ||
build-dir = "docs" | ||
|
||
[output.html] | ||
google-analytics = "UA-37017099-3" | ||
git-repository-url = "https://github.com/trailofbits/ctf" | ||
edit-url-template = "https://github.com/trailofbits/ctf/edit/master/{path}" | ||
site-url = "/ctf/" |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.