Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/common/set-up-mdbook/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ runs:
using: "composite"
steps:
- name: Setup mdBook 📚
uses: jontze/action-mdbook@0765bef0c7c5792f93bf3ed3d487a0ca32c9da33
uses: jontze/action-mdbook@6c0be56d14c4bf16861b00af61f50ff7400ce502
with:
token: ${{ inputs.token }}
mdbook-version: "0.4.47" # Use a semver compatible string
# Optional Plugins have to be enabled
use-linkcheck: true
linkcheck-version: "~0.7.7"
mdbook-version: "0.4.49" # Use a semver compatible string

- name: Show mdbook version
shell: bash
run: mdbook --version
- name: Show linkchecker version
shell: bash
run: mdbook-linkcheck --version
2 changes: 1 addition & 1 deletion .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version: 20

- name: Install Node Modules 💾
run: npm ci
run: npm i

- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
node-version: 20

- name: Install Node Modules 💾
run: npm ci
run: npm i

- name: Lint and Spellcheck 🧶
run: npm run lint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
.vscode
package-lock.json
node_modules/
book
.DS_Store
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ or [Frequency on GitHub](https://github.com/frequency-chain/frequency)

## Install

To build the generator locally, install [mdBook](https://github.com/rust-lang/mdBook.git)
and [link checker](https://github.com/Michael-F-Bryan/mdbook-linkcheck). The link checker will run during build process and throw warnings for any broken internal
or external links.
To build the generator locally, install [mdBook](https://github.com/rust-lang/mdBook.git).

```bash
cargo install mdbook@v0.4.47
cargo install mdbook-linkcheck
cargo install mdbook@0.4.49
npm install
```

### Local Link Checking

Use [`mdbook linkcheck`](https://github.com/Michael-F-Bryan/mdbook-linkcheck).
The link checker will run during build process and throw warnings for any broken internal or external links.
Not run in CI due to a high number of false negatives.

## Run

### (Option 1) Active Build and Serve via HTTP
Expand Down
15 changes: 1 addition & 14 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ command = "node preprocessors/title-image.mjs"

[preprocessor.tailwind]
renderers = ["html"]
command = 'node preprocessors/noop-npx.mjs "npx -y tailwindcss -i ./theme/css/tailwind.css -o ./css/tailwind.css"'
command = 'node preprocessors/noop-npx.mjs "npx -y @tailwindcss/cli -i ./theme/tailwind.css -o ./css/tailwind.css"'

[output.html]
no-section-label = true
Expand All @@ -36,18 +36,5 @@ additional-css = [
[output.html.redirect]
"/Core.html" = "/Whitepaper.html"

# https://github.com/Michael-F-Bryan/mdbook-linkcheck
# [output.linkcheck]
# exclude = [
# 'github\.com/paseo-network',
# 'github\.com/frequency-chain/docs',
# 'github\.com/frequency-chain/frequency/releases',
# 'github\.com/frequency-chain/frequency',
# 'twitter\.com',
# 'www\.frequency\.xyz',
# ]
# follow-web-links = true
# traverse-parent-directories = false

[output.html.fold]
enable = true
9 changes: 4 additions & 5 deletions css/button-links.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
.button-links a,
.button-links > p a,
.button-links a:link,
.button-links > p a:link {
.button-links > p a:link,
.button-links a:visited,
.button-links > p a:visited {
text-decoration: none;
box-sizing: content-box;
font-weight: 700;
color: var(--button-nav-fg);
background-color: var(--button-nav-bg);
border: 2px solid transparent;
border-radius: 9999px;
user-select: none;
padding: 20px 10%;
margin: 10px;
display: flex;
font-size: 20px;
flex: 0.5;
transition-property: border, color;
transition-duration: 0.5s;
transition: none;
justify-content: center;
align-items: center;
text-align: center;
Expand Down Expand Up @@ -68,7 +68,6 @@
.button-links a:visited:hover,
.button-links > p a:visited:hover {
text-decoration: none;
border: 2px solid var(--button-nav-hover-border);
color: var(--button-nav-hover-fg);
background: var(--button-nav-hover-bg);
}
2 changes: 1 addition & 1 deletion css/highlight-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ pre .hljs {
.embed-number {
font-size: 60px;
font-weight: bold;
color: #f77c47;
color: var(--color-secondary);
}
2 changes: 1 addition & 1 deletion css/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ pre .hljs {
.embed-number {
font-size: 60px;
font-weight: bold;
color: #f77c47;
color: var(--color-secondary);
}
33 changes: 27 additions & 6 deletions css/overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,31 @@ body {
background: var(--sidebar-bg);
}

/* No-JS Sidebar */
body#sidebar {
width: 100%;
}

.sidebar-iframe-outer {
position: relative;
width: auto;
width: 100%;
height: 100vh;
}

.sidebar-iframe-inner {
font-size: inherit;
}

.sidebar-iframe-inner .chapter li:not(.expanded) + li > ol {
display: flex;
flex-direction: column;
}

.sidebar-iframe-inner .chapter li > a.toggle {
transform: rotate(90deg);
}
/* END No-JS Sidebar */

#sidebar::-webkit-scrollbar {
background: var(--sidebar-bg);
}
Expand Down Expand Up @@ -190,6 +209,11 @@ body {
margin-inline-start: 0;
}

.sidebar-resize-handle .sidebar-resize-indicator::after,
.sidebar-resize-handle .sidebar-resize-indicator::before {
border-left: none !important;
}

@media only screen and (min-width: 620px) {
.sidebar-resize-handle .sidebar-resize-indicator {
display: inherit;
Expand Down Expand Up @@ -261,23 +285,20 @@ body {
border-radius: 9999px;
background-color: var(--button-nav-bg);
color: var(--button-nav-fg);
border: 2px solid transparent;
transition-property: border, color;
transition-duration: 0.5s;
transition: none;
margin-bottom: 24px;
width: auto;
}

#content .mobile-nav-chapters:hover {
color: var(--button-nav-hover-fg);
background: var(--button-nav-hover-bg);
text-decoration: none;
border: 2px solid var(--button-nav-hover-border);
}

#content .mobile-nav-chapters:active {
color: var(--button-nav-hover-fg);
background: var(--button-nav-hover-bg);
border: 2px solid var(--button-nav-hover-border);
}

/* General content related overrides */
Expand Down
16 changes: 8 additions & 8 deletions css/side-nav.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@

/* Dark theme */
.coal {
--icon-provider: url("../images/icons/lock-Dark.svg");
--icon-gateway: url("../images/icons/bridge-Dark.svg");
--icon-sso: url("../images/icons/key-Dark.svg");
--icon-core: url("../images/icons/house-Dark.svg");
--icon-provider: url("../images/icons/lock.svg");
--icon-gateway: url("../images/icons/bridge.svg");
--icon-sso: url("../images/icons/key.svg");
--icon-core: url("../images/icons/house.svg");
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
.light.no-js {
/* Override light theme variables if needed */
--icon-provider: url("../images/icons/lock-Dark.svg");
--icon-gateway: url("../images/icons/bridge-Dark.svg");
--icon-sso: url("../images/icons/key-Dark.svg");
--icon-core: url("../images/icons/house-Dark.svg");
--icon-provider: url("../images/icons/lock.svg");
--icon-gateway: url("../images/icons/bridge.svg");
--icon-sso: url("../images/icons/key.svg");
--icon-core: url("../images/icons/house.svg");
}
}

Expand Down
Loading