0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2025-02-16 19:42:47 +01:00
gitea/modules
wxiaoguang faa28b5a44
Move public asset files to the proper directory (#25907)
Move `public/*` to `public/assets/*`

Some old PRs (like #15219) introduced inconsistent directory system.

For example: why the local directory "public" is accessed by
`http://site/assets`? How to serve the ".well-known" files properly in
the public directory?

For convention rules, the "public" directory is widely used for the
website's root directory. It shouldn't be an exception for Gitea.

So, this PR makes the things consistent:

* `http://site/assets/foo` means `{CustomPath}/public/assets/foo`.
* `{CustomPath}/public/.well-known` and `{CustomPath}/public/robots.txt`
can be used in the future.

This PR is also a prerequisite for a clear solution for:
* #21942
* #25892 
* discourse.gitea.io: [.well-known path serving custom files behind
proxy?](https://discourse.gitea.io/t/well-known-path-serving-custom-files-behind-proxy/5445/1)

This PR is breaking for users who have custom "public" files (CSS/JS).
After getting approvals, I will update the documents.

----

## ⚠️ BREAKING ⚠️

If you have files in your "custom/public/" folder, please move them to
"custom/public/assets/".

---------

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-07-18 18:06:43 +02:00
..
actions Fix ref for workflows triggered by pull_request_target (#25743) 2023-07-07 19:22:03 +00:00
activitypub Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
analyze
assetfs Skip unuseful error message in dev mode when watching local filesystem (#25919) 2023-07-17 09:47:55 +00:00
auth
avatar
base
cache Upgrade go dependencies (#25819) 2023-07-14 11:00:31 +08:00
charset
container
context Revert package access change from #23879 (#25707) 2023-07-09 13:00:07 +00:00
csv
doctor Upgrade go dependencies (#25819) 2023-07-14 11:00:31 +08:00
emoji
eventsource Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
generate
git Remove git.FileBlame (#25841) 2023-07-12 19:07:29 +02:00
gitgraph
graceful
hcaptcha
highlight Upgrade go dependencies (#25819) 2023-07-14 11:00:31 +08:00
hostmatcher
html
httpcache Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
httplib Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
indexer Add open/closed field support for issue index (#25708) 2023-07-07 17:10:13 +00:00
issue/template
json
label
lfs
log
markup Disallow dangerous url schemes (#25960) 2023-07-18 15:18:37 +00:00
mcaptcha
metrics
migration
mirror
nosql Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
notification
options
packages Add support for different Maven POM encoding (#25873) 2023-07-14 09:39:15 +00:00
paginator
pprof
private
process Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
proxy
proxyprotocol
public Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
queue Update tool dependencies, lock govulncheck and actionlint (#25655) 2023-07-09 11:58:06 +00:00
recaptcha
references
regexplru Upgrade go dependencies (#25819) 2023-07-14 11:00:31 +08:00
repository
secret
session
setting Avoid creating directories when loading config (#25944) 2023-07-18 07:32:36 -05:00
sitemap
ssh
storage
structs
svg Move public asset files to the proper directory (#25907) 2023-07-18 18:06:43 +02:00
sync
system
templates
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
upload
uri
user
util Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
validation
web Fix "Flash" message usage (#25895) 2023-07-15 11:52:03 +03:00
webhook