Skip to content

Commit

Permalink
refactor: fonts as npm dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
flxzt committed Jun 16, 2024
1 parent 76e2bb0 commit 7bb2389
Show file tree
Hide file tree
Showing 548 changed files with 6,162 additions and 35 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/zola.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v3
- name: Prerequisites
run: |
sudo apt-get install -y npm
npm ci
npm run post-update
uses: actions/checkout@v4
- name: Build and deploy
uses: shalzz/zola-deploy-action@master
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
public/
static/processed_images
node_modules/
/node_modules/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,15 @@ Write a caption with:
{{ caption(text="This is the caption text") }}
```

## Update NPM dependencies

Run the following from the root theme directory:

```bash
npm install
npm run post-update
```

### License

<sup>
Expand Down
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"dependencies": {
"@fontsource/roboto": "5.0.13",
"@fontsource/merriweather": "^5.0.13",
"@fontsource/inconsolata": "^5.0.18",
"elevator.js": "^1.0.1"
},
"scripts": {
"post-update": "npm install --prefix ./static/ --only=production"
}
}
}
23 changes: 0 additions & 23 deletions sass/fonts.scss

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed static/fonts/Roboto/roboto-all-400-normal.woff
Binary file not shown.
4 changes: 4 additions & 0 deletions static/js/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Fonts
import "/static/@fontsource/merriweather";
import "/static/@fontsource/merriweather";

// Elevator
window.addEventListener('scroll', e => {
const threshold = 300;
Expand Down
27 changes: 27 additions & 0 deletions static/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/200.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/300.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/400.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/500.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/600.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/700.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/800.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions static/node_modules/@fontsource/inconsolata/900.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions static/node_modules/@fontsource/inconsolata/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bb2389

Please sign in to comment.