[PR #735] [MERGED] feat: build css from less files locally #760

Closed
opened 2026-02-25 23:35:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/735
Author: @fmartingr
Created: 9/16/2023
Status: Merged
Merged: 9/16/2023
Merged by: @fmartingr

Base: masterHead: build-less


📝 Commits (10+)

📊 Changes

50 files changed (+138 additions, -24 deletions)

View changed files

.github/workflows/_styles-check.yml (+18 -0)
📝 .github/workflows/pull_request.yml (+3 -1)
📝 .gitignore (+3 -0)
📝 Makefile (+13 -0)
bun.lockb (+0 -0)
📝 docs/Contribute.md (+14 -0)
📝 internal/http/routes/frontend_test.go (+2 -2)
📝 internal/view/404.html (+1 -0)
📝 internal/view/assets/css/archive.css (+1 -1)
internal/view/assets/css/bookmark-item.css (+0 -1)
internal/view/assets/css/custom-dialog.css (+0 -1)
📝 internal/view/assets/css/libs/fontawesome.min.css (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-brands-400.eot (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-brands-400.svg (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-brands-400.ttf (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-brands-400.woff (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-brands-400.woff2 (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-regular-400.eot (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-regular-400.svg (+0 -0)
📝 internal/view/assets/css/libs/fonts/fa-regular-400.ttf (+0 -0)

...and 30 more files

📄 Description

  • Added make commands to build the CSS, which was lost in time.
  • Build is performed locally and CSS files are committed to the repository, so there's no build process required for distributors.
  • Right now, using bun since it was the easier path, but the build process is built into a script that can be modified to add alternatives, it defaults to having lessc installed locally and uses bun if it finds it.
  • Avoid embedding unnecessary files in the binary.
  • style.css is generated and minified for the webapp, and archive.css is generated to display the top bar in archives.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/735 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 9/16/2023 **Status:** ✅ Merged **Merged:** 9/16/2023 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `build-less` --- ### 📝 Commits (10+) - [`16108a1`](https://github.com/go-shiori/shiori/commit/16108a1e50871b0d0d48da365ed58f9bd2a7b7da) build less using lessc and bun - [`4404f26`](https://github.com/go-shiori/shiori/commit/4404f26c5998cee3c6a839654e69d5183d6c0bd5) build - [`6eea2e7`](https://github.com/go-shiori/shiori/commit/6eea2e7a0cc3747e688e4291eeeeb7c7840a9036) make styles-check - [`d88b302`](https://github.com/go-shiori/shiori/commit/d88b302323839f658fbae14c564558c4c86bc8c6) Added workflow to check updates - [`9ab13f3`](https://github.com/go-shiori/shiori/commit/9ab13f3717dc4854149865c6585c9f3f70290ecf) avoid embed less files - [`2e296da`](https://github.com/go-shiori/shiori/commit/2e296daf90672c68aa670120002d16e81ce80384) Merge branch 'master' into build-less - [`eff1b53`](https://github.com/go-shiori/shiori/commit/eff1b53660374348a9578828ecd88d7672bc155b) docs - [`f4ad0b7`](https://github.com/go-shiori/shiori/commit/f4ad0b7ec2670a73e781aec132289baa505253d7) updated tests to reflect changes - [`8fde9a8`](https://github.com/go-shiori/shiori/commit/8fde9a8251121838ed165159f28f57ba35afabff) typo - [`7531b77`](https://github.com/go-shiori/shiori/commit/7531b77a1cfab5dd8530e23c6b299cf0a7b6939f) fixed archive page css ### 📊 Changes **50 files changed** (+138 additions, -24 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/_styles-check.yml` (+18 -0) 📝 `.github/workflows/pull_request.yml` (+3 -1) 📝 `.gitignore` (+3 -0) 📝 `Makefile` (+13 -0) ➕ `bun.lockb` (+0 -0) 📝 `docs/Contribute.md` (+14 -0) 📝 `internal/http/routes/frontend_test.go` (+2 -2) 📝 `internal/view/404.html` (+1 -0) 📝 `internal/view/assets/css/archive.css` (+1 -1) ➖ `internal/view/assets/css/bookmark-item.css` (+0 -1) ➖ `internal/view/assets/css/custom-dialog.css` (+0 -1) 📝 `internal/view/assets/css/libs/fontawesome.min.css` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-brands-400.eot` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-brands-400.svg` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-brands-400.ttf` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-brands-400.woff` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-brands-400.woff2` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-regular-400.eot` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-regular-400.svg` (+0 -0) 📝 `internal/view/assets/css/libs/fonts/fa-regular-400.ttf` (+0 -0) _...and 30 more files_ </details> ### 📄 Description - Added `make` commands to build the CSS, which was lost in time. - Build is performed locally and **CSS files are committed to the repository**, so there's no build process required for distributors. - Right now, using `bun` since it was the easier path, but the build process is built into a script that can be modified to add alternatives, it defaults to having `lessc` installed locally and uses `bun` if it finds it. - Avoid embedding unnecessary files in the binary. - `style.css` is generated and minified for the webapp, and `archive.css` is generated to display the top bar in archives. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#760
No description provided.