Skip to content

Commit 6d87938

Browse files
authored
Update theme and dependencies (#326)
# Problem Updating the theme colors and layout Also updated npm dependencies # Solution Updated theme to be the same as `docs.frequency.xyz` although without the footer or header (although kept them empty in there so the css doesn't have to change) ## Steps to Verify: 1. `cargo install mdbook@0.4.51 && cargo install mdbook-mermaid@0.15.0` 2. `cd libraries/js` 3. `npm i && npm run build` 4. `cd dist && npm pack && cd ..` 5. `cd ../../tools/signed-request-generator` 6. `npm install ../../libraries/js/dist/projectlibertylabs-siwf-0.0.0.tgz` 7. `npm run build` 8. `cd ../..` 9. `rm -Rf docs/src/Generator && cp -a tools/signed-request-generator/build docs/src/Generator` 10. `cd docs` 11. `npm i` 12. `mdbook serve` 13. See new theme!
1 parent 978c4c6 commit 6d87938

53 files changed

Lines changed: 6212 additions & 6360 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/common/set-up-mdbook/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ runs:
88
using: "composite"
99
steps:
1010
- name: Setup mdBook 📚
11-
uses: jontze/action-mdbook@0765bef0c7c5792f93bf3ed3d487a0ca32c9da33
11+
uses: jontze/action-mdbook@6c0be56d14c4bf16861b00af61f50ff7400ce502
1212
with:
1313
token: ${{ inputs.token }}
14-
mdbook-version: "0.4.47" # Use a semver compatible string
14+
mdbook-version: "0.4.51" # Use a semver compatible string
1515
# Optional Plugins have to be enabled
1616
# use-linkcheck: true
1717
# linkcheck-version: "~0.7.7"

.github/workflows/deploy-pages-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
- name: Build with mdBook
6262
working-directory: docs
63-
run: mdbook build && ls book
63+
run: npm i && mdbook build && ls book
6464

6565
- name: Structure v2 (Docs + Assets)
6666
run: |

.github/workflows/verify-pr-v2-docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252

5353
- name: Build mdBook 📚
5454
working-directory: docs
55-
run: mdbook build && ls book
55+
run: npm i && mdbook build && ls book

.github/workflows/verify-pr-v2-tool-generator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
node-version: [22.x]
1616
runs-on: ubuntu-latest
1717
container:
18-
image: mcr.microsoft.com/playwright:v1.51.1-noble
18+
image: mcr.microsoft.com/playwright:v1.53.0-noble
1919

2020
steps:
2121
- name: Checkout

.github/workflows/verify-pr-v2-web-sdk.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
node-version: [20.x, 22.x]
1616
runs-on: ubuntu-latest
1717
container:
18-
image: mcr.microsoft.com/playwright:v1.51.1-noble
18+
image: mcr.microsoft.com/playwright:v1.53.0-noble
1919

2020
steps:
2121
- name: Checkout
@@ -44,3 +44,13 @@ jobs:
4444
- name: Build
4545
working-directory: libraries/sdk-web
4646
run: npm run build
47+
48+
- name: Upload Report
49+
uses: actions/upload-artifact@v4
50+
if: failure()
51+
with:
52+
name: Tests Report
53+
path: |
54+
libraries/sdk-web/__snapshots__
55+
libraries/sdk-web/test-results
56+
retention-days: 4

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Documentation is written in [CommonMark Markdown](https://rust-lang.github.io/md
6868
#### Prerequisites
6969

7070
- [mdBook](https://rust-lang.github.io/mdBook/)
71-
- Cargo: `cargo install mdbook@0.4.42`
71+
- Cargo: `cargo install mdbook@0.4.51`
7272
- Mac Brew `brew install mdbook`
7373
- Binaries: [Download Release](https://github.com/rust-lang/mdBook/releases)
7474
- [Node.js v20+](https://nodejs.org)
@@ -77,6 +77,7 @@ Documentation is written in [CommonMark Markdown](https://rust-lang.github.io/md
7777
- Build the signed-request-generator: follow the "Development" and "Build" steps in `[tools/signed-request-generator/README.md]`.
7878
- Copy the new Generator to the docs directory: `rm -Rf docs/src/Generator && cp -a tools/signed-request-generator/build docs/src/Generator`
7979
- `cd ../../docs`
80+
- Install packages `npm i`
8081
- Serve the HTML locally and watch for changes: `mdbook serve` or `mdbook serve -p <port, default 3000>`
8182
- For style edits see: [`docs/css/overrides.css`](./docs/css/overrides.css)
8283
- For changes to the custom preprocessor see: [`docs/preprocessors/README.md`](./docs/preprocessors/README.md)

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
book
2+
package-lock.json
3+
node_modules
4+
css/tailwind.css

docs/book.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,26 @@ command = "node preprocessors/svg-embed.mjs"
1414
[preprocessor.generator]
1515
command = "node preprocessors/generator.mjs"
1616

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

1822
[output.html]
19-
no-section-label = true
20-
git-repository-url = "https://github.com/ProjectLibertyLabs/siwf"
21-
edit-url-template = "https://github.com/ProjectLibertyLabs/siwf/blob/main/docs/{path}"
22-
preferred-dark-theme = "coal"
2323
additional-css = [
24+
"css/tailwind.css",
25+
"css/overrides.css",
26+
"css/side-nav.css",
27+
"css/button-links.css",
2428
"css/highlight.css",
2529
"css/highlight-dark.css",
26-
"css/tailwind-short.css",
27-
"css/button-links.css",
2830
"css/generator.css",
29-
"css/overrides.css",
3031
]
32+
no-section-label = true
33+
copy-fonts = false # Switched to custom fonts
34+
git-repository-url = "https://github.com/ProjectLibertyLabs/siwf"
35+
edit-url-template = "https://github.com/ProjectLibertyLabs/siwf/blob/main/docs/{path}"
36+
preferred-dark-theme = "coal"
3137

3238
[output.html.fold]
3339
enable = true

docs/css/button-links.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
.button-links a,
1616
.button-links > p a,
1717
.button-links a:link,
18-
.button-links > p a:link {
18+
.button-links > p a:link,
19+
.button-links a:visited,
20+
.button-links > p a:visited {
1921
text-decoration: none;
2022
box-sizing: content-box;
2123
font-weight: 700;
2224
color: var(--button-nav-fg);
2325
background-color: var(--button-nav-bg);
24-
border: 2px solid transparent;
2526
border-radius: 9999px;
2627
user-select: none;
2728
padding: 20px 10%;
2829
margin: 10px;
2930
display: flex;
3031
font-size: 20px;
3132
flex: 0.5;
32-
transition-property: border, color;
33-
transition-duration: 0.5s;
33+
transition: none;
3434
justify-content: center;
3535
align-items: center;
3636
text-align: center;
@@ -68,7 +68,6 @@
6868
.button-links a:visited:hover,
6969
.button-links > p a:visited:hover {
7070
text-decoration: none;
71-
border: 2px solid var(--button-nav-hover-border);
7271
color: var(--button-nav-hover-fg);
7372
background: var(--button-nav-hover-bg);
7473
}

docs/css/discord.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)