[PR #448] [MERGED] fix invalid assets path when use webroot #599

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

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/448
Author: @hulb
Created: 7/6/2022
Status: Merged
Merged: 7/8/2022
Merged by: @fmartingr

Base: masterHead: fix/path-invalid-webroot


📝 Commits (1)

  • 01d94cf fix invalid assets path when use webroot

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 internal/webserver/handler-ui.go (+3 -1)

📄 Description

fix https://github.com/go-shiori/shiori/issues/445

last time I used embed.Fs to replace the assets generation, it turns out that the sub path is difference. For exmaple, When using assets generation, the css assets would be at /css, and when using embed.Fs it must be css since the embed.Fs doesn't allow sub path start with /: https://github.com/golang/go/blob/master/src/io/fs/fs.go#L41


🔄 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/448 **Author:** [@hulb](https://github.com/hulb) **Created:** 7/6/2022 **Status:** ✅ Merged **Merged:** 7/8/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `fix/path-invalid-webroot` --- ### 📝 Commits (1) - [`01d94cf`](https://github.com/go-shiori/shiori/commit/01d94cf283cc54dff0755e6e13c6adecb7fb0898) fix invalid assets path when use webroot ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/webserver/handler-ui.go` (+3 -1) </details> ### 📄 Description fix https://github.com/go-shiori/shiori/issues/445 last time I used embed.Fs to replace the assets generation, it turns out that the sub path is difference. For exmaple, When using assets generation, the `css` assets would be at `/css`, and when using embed.Fs it must be `css` since the embed.Fs doesn't allow sub path start with `/`: https://github.com/golang/go/blob/master/src/io/fs/fs.go#L41 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:51 +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#599
No description provided.