From 68e6bec9b5647a267f239944a7be4cf9337615a7 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Wed, 8 Jan 2025 18:29:54 -0800 Subject: [PATCH] Reduce website loading times and related code cleanup --- .github/workflows/website.yml | 2 + website/content/_index.md | 25 ++++--- website/content/about.md | 4 +- ...01-looking-back-on-2023-and-what's-next.md | 2 +- website/content/donate.md | 5 +- website/content/features.md | 2 +- website/content/learn/_index.md | 2 +- .../learn/_unpublished/workflows/imaginate.md | 2 +- website/content/learn/introduction/_index.md | 2 +- website/content/logo.md | 2 +- website/content/volunteer/_index.md | 4 +- website/content/volunteer/guide/_index.md | 2 +- .../guide/codebase-overview/_index.md | 2 +- .../submitting-a-contribution.md | 2 +- .../balance-text.scss} | 4 ++ website/sass/base.scss | 11 +-- website/static/js/carousel.js | 12 +++- website/templates/article.html | 2 +- website/templates/base.html | 72 ++++++++++++++----- website/templates/blog.html | 2 +- website/templates/book.html | 5 +- website/templates/macros/replacements.html | 2 +- 22 files changed, 112 insertions(+), 56 deletions(-) rename website/{static/css/balance-text.css => sass/balance-text.scss} (59%) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 1078cf9ea2..03eda92e4a 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -38,6 +38,8 @@ jobs: git rev-parse --abbrev-ref HEAD | grep master > /dev/null || export INDEX_HTML_HEAD_INCLUSION="" - name: 🌐 Build Graphite website with Zola + env: + MODE: prod run: | cd website zola --config config_prod.toml build diff --git a/website/content/_index.md b/website/content/_index.md index 359a4cef82..1ec67278b5 100644 --- a/website/content/_index.md +++ b/website/content/_index.md @@ -3,8 +3,9 @@ title = "Free online vector editor & procedural design tool" template = "section.html" [extra] -css_inline = ["index.css"] -js = ["carousel.js", "youtube-embed.js", "video-autoplay.js"] +css = ["/index.css", "/balance-text.css"] +js = ["/js/carousel.js", "/js/youtube-embed.js", "/js/video-autoplay.js"] +linked_js = ["https://static.graphite.rs/text-balancer/text-balancer.js"] meta_description = "Open source free software. A vector graphics creativity suite with a clean, intuitive interface. Opens instantly (no signup) and runs locally in a browser. Exports SVG, PNG, JPG." +++ @@ -80,13 +81,15 @@ meta_description = "Open source free software. A vector graphics creativity suit