From 2f39b3a1c5278bc525d2d9a178abb91577c3aef5 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Thu, 1 Dec 2022 11:18:58 -0500 Subject: [PATCH] Bundle icons8 --- .github/workflows/publish.yml | 11 +++++++++++ .gitignore | 4 +++- .vscode/tasks.json | 8 ++++++++ Makefile | 10 ++++++++++ config.toml | 6 ++++++ package-lock.json | 24 ++++++++++++++++++++++++ package.json | 5 +++++ sass/styles/icons.scss | 3 +++ static/dist/.gitignore | 1 + templates/base.html | 4 +--- 10 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 Makefile create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 sass/styles/icons.scss create mode 100644 static/dist/.gitignore diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 50ff7d7..67468f4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,17 @@ jobs: - name: Checkout uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.x + + - name: Install dependencies + run: npm install + + - name: Compile assets + run: make - name: Build uses: TonySpegel/zola-build-action@v1 diff --git a/.gitignore b/.gitignore index 6bdf2f6..8395e0d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk -/public/ \ No newline at end of file +/public/ + +/node_modules/ \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9167a93..16aba40 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -23,6 +23,14 @@ "--open" ], "problemMatcher": [] + }, + { + "label": "Compile assets", + "type": "shell", + "command": "make", + "args": [ + ], + "problemMatcher": [] } ] } \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..577cf0a --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +static/dist/line-awesome: static/dist/line-awesome/fonts/la-solid-900.woff static/dist/line-awesome/fonts/la-brands-400.woff + +static/dist/line-awesome/fonts/la-solid-900.woff: node_modules/line-awesome/dist/line-awesome/fonts/la-solid-900.woff + @mkdir -p $(dir $@) + cp $< $@ + +static/dist/line-awesome/fonts/la-brands-400.woff: node_modules/line-awesome/dist/line-awesome/fonts/la-brands-400.woff + @mkdir -p $(dir $@) + cp $< $@ \ No newline at end of file diff --git a/config.toml b/config.toml index 3add938..03dd85f 100644 --- a/config.toml +++ b/config.toml @@ -13,6 +13,12 @@ highlight_code = true render_emoji = true external_links_target_blank = true +[link_checker] +skip_prefixes = [] +skip_anchor_prefixes = [] +internal_level = "error" +external_level = "error" + [extra] # Website domain_name = "ewpratten.com" diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..c179e48 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,24 @@ +{ + "name": "ewpratten.com", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "line-awesome": "^1.3.0" + } + }, + "node_modules/line-awesome": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/line-awesome/-/line-awesome-1.3.0.tgz", + "integrity": "sha512-Y0YHksL37ixDsHz+ihCwOtF5jwJgCDxQ3q+zOVgaSW8VugHGTsZZXMacPYZB1/JULBi6BAuTCTek+4ZY/UIwcw==" + } + }, + "dependencies": { + "line-awesome": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/line-awesome/-/line-awesome-1.3.0.tgz", + "integrity": "sha512-Y0YHksL37ixDsHz+ihCwOtF5jwJgCDxQ3q+zOVgaSW8VugHGTsZZXMacPYZB1/JULBi6BAuTCTek+4ZY/UIwcw==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ecf2f73 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "line-awesome": "^1.3.0" + } +} diff --git a/sass/styles/icons.scss b/sass/styles/icons.scss new file mode 100644 index 0000000..504eb26 --- /dev/null +++ b/sass/styles/icons.scss @@ -0,0 +1,3 @@ +$la-font-path: "/dist/line-awesome/fonts"; + +@import "../../node_modules/line-awesome/dist/line-awesome/scss/line-awesome.scss"; \ No newline at end of file diff --git a/static/dist/.gitignore b/static/dist/.gitignore new file mode 100644 index 0000000..09d1b5a --- /dev/null +++ b/static/dist/.gitignore @@ -0,0 +1 @@ +/line-awesome/ \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 9710054..15f0639 100644 --- a/templates/base.html +++ b/templates/base.html @@ -30,13 +30,10 @@ {# Preconnects for external resources #} - {# External styles #} - + {# Component styles #}