Skip to content

Commit

Permalink
Build faster locally
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostKiwi committed Jan 5, 2025
1 parent de09438 commit 4f7f75f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
4 changes: 3 additions & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export default function (eleventyConfig) {
eleventyConfig.addWatchTarget("posts");

/* HTML minifier */
eleventyConfig.addPlugin(eleventyPluginFilesMinifier);
if (process.env.BUILDMODE === "production") {
eleventyConfig.addPlugin(eleventyPluginFilesMinifier);
}

/* RSS Plugin */
eleventyConfig.addPlugin(pluginRss);
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eleventy_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
- name: Pull dependencies
run: npm install

- name: Build with Vite
run: npx @11ty/eleventy
- name: Build with Eleventy
run: npm run build:prod

# Upload _site folder
- name: Upload artifact
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ <h2>{{ post.data.title }}</h2>
{% endif %}
{% endfor %}
<br>
<img style="filter: drop-shadow(0px 0px 50px rgba(0, 0, 0, .25));" src="/assets/kiwis/traced_kiwi.svg">
<img alt="Kiwi in the snow" style="filter: drop-shadow(0px 0px 50px rgba(0, 0, 0, .25));" src="/assets/kiwis/traced_kiwi.svg">
36 changes: 28 additions & 8 deletions package-lock.json

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

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build:prod": "cross-env BUILDMODE=production npx @11ty/eleventy"
},
"repository": {
"type": "git",
Expand All @@ -23,19 +23,20 @@
},
"homepage": "https://github.com/FrostKiwi/treasurechest#readme",
"dependencies": {
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-img": "^5.0.0",
"@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"@sherby/eleventy-plugin-files-minifier": "^1.1.1",
"ace-builds": "^1.37.1",
"cross-env": "^7.0.3",
"eleventy-plugin-toc": "^1.1.5",
"luxon": "^3.5.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-link-attributes": "^4.0.1",
"normalize.css": "^8.0.1",
"prism-themes": "^1.9.0",
"sakura.css": "^1.5.0",
"ace-builds": "^1.36.5",
"normalize.css": "^8.0.1",
"sass": "^1.82.0"
"sass": "^1.83.1"
}
}

0 comments on commit 4f7f75f

Please sign in to comment.