add /assets as root dir of public files #15219

Merged
a1012112796 merged 22 commits from assets_dir into master 2021-04-28 12:35:06 +00:00
a1012112796 commented 2021-03-31 02:56:02 +00:00 (Migrated from github.com)

This PR moves root directory of public files from / to /assets

⚠️ BREAKING ⚠️

All pages and resources rendered from custom/public will now be rendered at /assets instead of /. This means that if you have a impressum.html - you need to update links to this to /assets/impressum.html. Similarly for users of STL renderers and external markup renderers.

Administrators should check custom templates to ensure that these are correct.

If you have previously placed robots.txt within custom/public you must move it to custom instead.

This PR moves root directory of public files from `/` to `/assets` ## :warning: BREAKING :warning: All pages and resources rendered from `custom/public` will now be rendered at `/assets` instead of `/`. This means that if you have a `impressum.html` - you need to update links to this to `/assets/impressum.html`. Similarly for users of STL renderers and external markup renderers. Administrators should check custom templates to ensure that these are correct. If you have previously placed `robots.txt` within `custom/public` you must move it to `custom` instead.
zeripath approved these changes 2021-03-31 19:52:10 +00:00
silverwind (Migrated from github.com) approved these changes 2021-04-10 12:23:45 +00:00
silverwind (Migrated from github.com) left a comment

Hope we didn't miss any. Guess we will find out later if we did.

Hope we didn't miss any. Guess we will find out later if we did.
silverwind (Migrated from github.com) reviewed 2021-04-15 19:11:29 +00:00
silverwind (Migrated from github.com) commented 2021-04-15 19:11:29 +00:00
          publicPath: '../', // required to remove css/ path segment

Fix from https://github.com/go-gitea/gitea/pull/15501 works here as well.

```suggestion publicPath: '../', // required to remove css/ path segment ``` Fix from https://github.com/go-gitea/gitea/pull/15501 works here as well.
silverwind (Migrated from github.com) reviewed 2021-04-15 19:11:38 +00:00
silverwind (Migrated from github.com) commented 2021-04-15 19:11:38 +00:00
          publicPath: '../', // required to remove css/ path segment
```suggestion publicPath: '../', // required to remove css/ path segment ```
zeripath reviewed 2021-04-15 19:30:45 +00:00
Contributor

Does it need to be ../assets/?

Does it need to be ../assets/?
silverwind (Migrated from github.com) reviewed 2021-04-15 19:34:09 +00:00
silverwind (Migrated from github.com) commented 2021-04-15 19:34:08 +00:00

No, I tried that before and it gave me a assets/assets/something path, so this should be correct, we are modifying the path css/fonts/something to fonts/something.

No, I tried that before and it gave me a `assets/assets/something` path, so this should be correct, we are modifying the path `css/fonts/something` to `fonts/something`.
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
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: lunny/gitea#15219
No description provided.