aboutsummaryrefslogtreecommitdiffstats
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Update `from-source.zh-cn.md` & `from-source.en-us.md` - Cross Compile Using ↵editfund-founder2023-06-132-0/+116
| | | | | | | | | Zig (#25194) ## Compile & Cross Compile Gitea With CGO Dependencies Using Zig --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Improve some documents: release version, logging, NFS lock (#25202)wxiaoguang2023-06-122-42/+23
| | | | | | | | | | | Close #23654 Close #24684 @techknowlogick I still think we need to rename https://dl.gitea.com/gitea/1.20/ to https://dl.gitea.com/gitea/1.20-nightly/ `/gitea/1.20/` is quite confusing, it needs these words to explain why. If we call it `1.20-nightly`, the FAQ can be simplified a lot.
* Add codeowners feature (#24910)Vladimir Buyanov2023-06-081-0/+65
| | | | | | Hello. This PR adds a github like configuration for the CODEOWNERS file. Resolves: #10161
* Change branch name from master to main in some documents' links (#25126)HesterG2023-06-0812-16/+16
| | | As title. And needs to backport to 1.19
* Enable all webpack sourcemaps in dev build, disable all in prod build (#25089)silverwind2023-06-061-0/+2
| | | | | | | | | | | | | | | - Enable all source maps in dev build - Disable all source maps in prod build - Provide `ENABLE_SOURCEMAP` env var to override it. I think the strange error seen in https://github.com/go-gitea/gitea/issues/24784 is sourcemap related, so if we enable/disable them all, it might go away. But it's most definitely a Safari bug. With all sourcemaps disabled, binary size goes down by around 1-2 MB, with all enabled it goes up by around 12MB. If +12MB is acceptable, we could also always enable them by default as fully source maps do have some debugging benefits.
* change placeholders in actions docstechknowlogick2023-06-051-1/+1
|
* change placeholders in actions docstechknowlogick2023-06-051-1/+1
|
* Introduce how to configure cache when starting a Runner with Docker (#25077)sillyguodong2023-06-052-0/+67
| | | | | | | If a user starts a runner using a Docker image without making additional configurations, the [cache action](https://github.com/actions/cache) will not work properly. Therefore, add a section in the documentation that explains how to configure the cache correctly.
* improve permission documentation (#23942)Lunny Xiao2023-06-051-9/+24
|
* Redesign Scoped Access Tokens (#24767)Jack Hay2023-06-041-36/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Changes - Adds the following high level access scopes, each with `read` and `write` levels: - `activitypub` - `admin` (hidden if user is not a site admin) - `misc` - `notification` - `organization` - `package` - `issue` - `repository` - `user` - Adds new middleware function `tokenRequiresScopes()` in addition to `reqToken()` - `tokenRequiresScopes()` is used for each high-level api section - _if_ a scoped token is present, checks that the required scope is included based on the section and HTTP method - `reqToken()` is used for individual routes - checks that required authentication is present (but does not check scope levels as this will already have been handled by `tokenRequiresScopes()` - Adds migration to convert old scoped access tokens to the new set of scopes - Updates the user interface for scope selection ### User interface example <img width="903" alt="Screen Shot 2023-05-31 at 1 56 55 PM" src="https://github.com/go-gitea/gitea/assets/23248839/654766ec-2143-4f59-9037-3b51600e32f3"> <img width="917" alt="Screen Shot 2023-05-31 at 1 56 43 PM" src="https://github.com/go-gitea/gitea/assets/23248839/1ad64081-012c-4a73-b393-66b30352654c"> ## tokenRequiresScopes Design Decision - `tokenRequiresScopes()` was added to more reliably cover api routes. For an incoming request, this function uses the given scope category (say `AccessTokenScopeCategoryOrganization`) and the HTTP method (say `DELETE`) and verifies that any scoped tokens in use include `delete:organization`. - `reqToken()` is used to enforce auth for individual routes that require it. If a scoped token is not present for a request, `tokenRequiresScopes()` will not return an error ## TODO - [x] Alphabetize scope categories - [x] Change 'public repos only' to a radio button (private vs public). Also expand this to organizations - [X] Disable token creation if no scopes selected. Alternatively, show warning - [x] `reqToken()` is missing from many `POST/DELETE` routes in the api. `tokenRequiresScopes()` only checks that a given token has the correct scope, `reqToken()` must be used to check that a token (or some other auth) is present. - _This should be addressed in this PR_ - [x] The migration should be reviewed very carefully in order to minimize access changes to existing user tokens. - _This should be addressed in this PR_ - [x] Link to api to swagger documentation, clarify what read/write/delete levels correspond to - [x] Review cases where more than one scope is needed as this directly deviates from the api definition. - _This should be addressed in this PR_ - For example: ```go m.Group("/users/{username}/orgs", func() { m.Get("", reqToken(), org.ListUserOrgs) m.Get("/{org}/permissions", reqToken(), org.GetUserOrgsPermissions) }, tokenRequiresScopes(auth_model.AccessTokenScopeCategoryUser, auth_model.AccessTokenScopeCategoryOrganization), context_service.UserAssignmentAPI()) ``` ## Future improvements - [ ] Add required scopes to swagger documentation - [ ] Redesign `reqToken()` to be opt-out rather than opt-in - [ ] Subdivide scopes like `repository` - [ ] Once a token is created, if it has no scopes, we should display text instead of an empty bullet point - [ ] If the 'public repos only' option is selected, should read categories be selected by default Closes #24501 Closes #24799 Co-authored-by: Jonathan Tran <jon@allspice.io> Co-authored-by: Kyle D <kdumontnu@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Allow for PKCE flow without client secret + add docs (#25033)Denys Konovalov2023-06-031-7/+71
| | | | | | | | | | | | | | | | | | | | | | | The PKCE flow according to [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636) allows for secure authorization without the requirement to provide a client secret for the OAuth app. It is implemented in Gitea since #5378 (v1.8.0), however without being able to omit client secret. Since #21316 Gitea supports setting client type at OAuth app registration. As public clients are already forced to use PKCE since #21316, in this PR the client secret check is being skipped if a public client is detected. As Gitea seems to implement PKCE authorization correctly according to the spec, this would allow for PKCE flow without providing a client secret. Also add some docs for it, please check language as I'm not a native English speaker. Closes #17107 Closes #25047
* Fix link to customizing-gitea (#25056)kodermho2023-06-032-2/+2
| | | | The link to customizing-gitea in the label documentation is broken. This PR should adjust the relative path to fix the link
* Add chinese documentations for `cran package registry` (#25012)sillyguodong2023-05-311-0/+93
| | | As title.
* Remove the service worker (#25010)silverwind2023-05-311-1/+0
| | | | | | | | | | | | | It's been disabled by default since 1.17 (https://github.com/go-gitea/gitea/pull/18914), and it never really delivered any benefit except being another cache layer that has its own unsolved invalidation issues. HTTP cache works, we don't need two cache layers at the browser for assets. ## :warning: BREAKING You can remove the config `[ui].USE_SERVICE_WORKER` from your `app.ini` now.
* Fix markdown link to awesome gitea (#25009)John Olheiser2023-05-301-1/+1
| | | | Fixes the markdown link and uses title case like the other translations.
* Followup to pinned Issues (#24945)JakobDev2023-05-301-1/+1
| | | | | | | | | This addressees some things from #24406 that came up after the PR was merged. Mostly from @delvh. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Remove unnecessary content on docs (#24976)Lunny Xiao2023-05-305-18/+6
|
* Unify doc links to use paths relative to doc folder (#24979)HesterG2023-05-2910-23/+21
| | | | | | | | | Changes: 1. Use uniform links types relative to doc folder (start with `doc/`) 2. According to [docusaurus links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is used, the `href` is resolved as URL location, but not file location. So need to use `[text]({{< relref "path" >}})` instead.
* Update from-binary.en-us.md (#24975)epk2023-05-291-1/+1
| | | Fixed link to the creating a systemd service in Ubuntu document.
* Remove meta tags `theme-color` and `default-theme` (#24960)silverwind2023-05-281-1/+0
| | | | | | | | | | | | | | | | As discussed in https://github.com/go-gitea/gitea/pull/24953#issuecomment-1565630156. ## :warning: BREAKING :warning: 1. The `ui.THEME_COLOR_META_TAG` setting has been removed. If you still need to set the `theme-color` meta tag, add it via `$GITEA_CUSTOM/templates/custom/header.tmpl` instead. 2. The non-standard `default-theme` meta-tag added in https://github.com/go-gitea/gitea/pull/13809 has been removed. Third party code that needs to obtain the currently loaded theme should use the `theme-<name>` class on the `<html>` node instead, which reflect the currently active theme.
* simple docs fixes: 'pull request' page (en-us & zh-tw) link path to ↵Jon Keim2023-05-282-2/+2
| | | | | 'issue-pull-request-templates' (#24961) Co-authored-by: silverwind <me@silverwind.io>
* Remove reference to caddy v1 in docs (#24962)techknowlogick2023-05-281-16/+0
| | | caddy v1 is loong eol. v2 should be used.
* Use `[git.config]` for reflog cleaning up (#24958)wxiaoguang2023-05-281-5/+2
| | | | | | | | | | | | | | | | | | | Follow https://github.com/go-gitea/gitea/pull/24860#discussion_r1200589651 Use `[git.config]` for reflog cleaning up, the new options are more flexible. * https://git-scm.com/docs/git-config#Documentation/git-config.txt-corelogAllRefUpdates * https://git-scm.com/docs/git-config#Documentation/git-config.txt-gcreflogExpire ## :warning: BREAKING The section `[git.reflog]` is now obsolete and its keys have been moved to the following replacements: - `[git.reflog].ENABLED` → `[git.config].core.logAllRefUpdates` - `[git.reflog].EXPIRATION` → `[git.config].gc.reflogExpire`
* docs: remove an extraneous whitespace (#24949)谈笑风生间2023-05-261-1/+1
|
* Fix documentation ref (#24934)Lunny Xiao2023-05-266-47/+47
| | | Fix documentation ref
* Add Chinese docs for help, contribution and development (#24925)HesterG2023-05-258-2/+890
|
* Merge two translation contributing documents (#23939)Lunny Xiao2023-05-257-29/+17
| | | | | | | This PR also adjusts the weights. --------- Co-authored-by: delvh <dev.lh@web.de>
* Add the ability to pin Issues (#24406)JakobDev2023-05-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to pin important Issues and Pull Requests. You can also move pinned Issues around to change their Position. Resolves #2175. ## Screenshots ![grafik](https://user-images.githubusercontent.com/15185051/235123207-0aa39869-bb48-45c3-abe2-ba1e836046ec.png) ![grafik](https://user-images.githubusercontent.com/15185051/235123297-152a16ea-a857-451d-9a42-61f2cd54dd75.png) ![grafik](https://user-images.githubusercontent.com/15185051/235640782-cbfe25ec-6254-479a-a3de-133e585d7a2d.png) The Design was mostly copied from the Projects Board. ## Implementation This uses a new `pin_order` Column in the `issue` table. If the value is set to 0, the Issue is not pinned. If it's set to a bigger value, the value is the Position. 1 means it's the first pinned Issue, 2 means it's the second one etc. This is dived into Issues and Pull requests for each Repo. ## TODO - [x] You can currently pin as many Issues as you want. Maybe we should add a Limit, which is configurable. GitHub uses 3, but I prefer 6, as this is better for bigger Projects, but I'm open for suggestions. - [x] Pin and Unpin events need to be added to the Issue history. - [x] Tests - [x] Migration **The feature itself is currently fully working, so tester who may find weird edge cases are very welcome!** --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Allow skipping forks and mirrors from being indexed (#23187)techknowlogick2023-05-251-0/+1
| | | | | | This PR adds two new options to disable repo/code search indexing of both forks and mirrors. Related: #22842
* Add Chinese documentations for Actions (#24902)HesterG2023-05-2512-6/+877
|
* `zh-cn` translation for usage docs (#24897)Zettat1232023-05-2514-6/+988
|
* Add chinese documentations for installation (#24904)sillyguodong2023-05-256-8/+704
|
* Improve RunMode / dev mode (#24886)wxiaoguang2023-05-251-1/+1
| | | | | | | | | | 1. non-dev mode is treated as prod mode, to protect users from accidentally running in dev mode if there is a typo in this value. 2. in dev mode, do not need to really exit if there are template errors, because the template errors could be fixed by developer soon and the templates get reloaded, help: * https://github.com/go-gitea/gitea/issues/24845#issuecomment-1557615382 3. Fine tune the mail template loading message.
* Add chinese documentations for `Packages` (#24914)sillyguodong2023-05-2526-9/+2395
|
* Update Asciidoc markup example with safe defaults (#24920)Mike Rochefort2023-05-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The cheat sheet uses the `asciidoc` markup language to demonstrate how to set up third party markup renderers. The current example has the following issues: - It promotes a legacy tool that does not handle modern AsciiDoc specifications - It does not account for embedded preview renders - It has no safety restrictions By switching to `asciidoctor`, uses are suggested to utilize de facto/standard tooling for AsciiDoc. The `--embedded` parameter will strip out HTML tags that contain the document (such as `<html></html>`) which aren't necessary for the render, and actually end up as text in the document if left in. The `--safe-mode` parameter (of which there are several profiles) imposes [certain policies](https://docs.asciidoctor.org/asciidoctor/latest/safe-modes/) on the files it ingests and what the resulting output looks like. GitHub itself uses the `secure` profile (the highest), which can be a good starting point for those who are uncertain of what to do. By default, if no mode is specified when `asciidoctor` runs it defaults to `unsafe`, i.e. no safety guidelines at all.
* Fix <empty> in administration/config-cheat-sheet.en-us.md (#24905)HesterG2023-05-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | Before <img width="206" alt="Screen Shot 2023-05-24 at 15 54 02" src="https://github.com/go-gitea/gitea/assets/17645053/3493180e-e7a8-466d-b418-641c39d7788c"> <img width="272" alt="Screen Shot 2023-05-24 at 15 50 05" src="https://github.com/go-gitea/gitea/assets/17645053/b1c80313-5b2c-41d8-aad3-4099c912c173"> <img width="264" alt="Screen Shot 2023-05-24 at 15 50 16" src="https://github.com/go-gitea/gitea/assets/17645053/9a4b4223-ce67-40b3-a44e-03219694a37d"> After <img width="295" alt="Screen Shot 2023-05-24 at 15 52 53" src="https://github.com/go-gitea/gitea/assets/17645053/fbc8ef6e-2b9b-44f5-ba4f-6002cf2f19fe"> <img width="334" alt="Screen Shot 2023-05-24 at 15 53 03" src="https://github.com/go-gitea/gitea/assets/17645053/6ebe45bf-b986-4afc-9b5c-d0c0134650c2"> <img width="282" alt="Screen Shot 2023-05-24 at 15 53 13" src="https://github.com/go-gitea/gitea/assets/17645053/90ccc1ae-69f5-4730-8191-5e86ed0f6d49">
* Rename docs packages title from xxx Packages Repository -> xxx Package ↵Lunny Xiao2023-05-2419-38/+38
| | | | | Registry (#24895) As title.
* Make environment-to-ini support loading key value from file (#24832)wxiaoguang2023-05-242-6/+24
| | | | | | | | | | | | | | | Replace #19857 Close #19856 Close #10311 Close #10123 Major changes: 1. Move a lot of code from `environment-to-ini.go` to `config_env.go` to make them testable. 2. Add `__FILE` support 3. Update documents 4. Add tests
* `zh-cn` translation for administration docs (#24881)Zettat1232023-05-2411-0/+1820
| | | | | | | | | | | | | - [x] adding-legal-pages - [x] cmd-embedded - [x] command-line - [x] email-setup - [x] external-renderers - [x] git-lfs-support - [x] logging-config - [x] mail-templates - [x] repo-indexer - [x] search-engines-indexation - [x] signing
* Support changing git config through `app.ini`, use ↵wxiaoguang2023-05-232-6/+29
| | | | | | | | | | | | | | | | | | | | | `diff.algorithm=histogram` by default (#24860) Close #13454 , Close #23255, Close #14697 (and maybe more related issues) Many users have the requirement to customize the git config. This PR introduces an easy way: put the options in Gitea's app.ini `[git.config]`, then the config options will be applied to git config. And it can support more flexible default config values, eg: now `diff.algorithm=histogram` by default. According to: https://stackoverflow.com/a/32367597/4754037 , `histogram diff` is efficient and doesn't like to cause server-side problems. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove unnecessary usage prefix from doc titles (#24869)Lunny Xiao2023-05-237-14/+14
| | | As title.
* Use Go 1.20 for next release (#24859)wxiaoguang2023-05-221-2/+2
|
* Fix document and improve comment (#24844)wxiaoguang2023-05-221-1/+1
| | | | | | | | | | * Fix broken doc link: https://github.com/go-gitea/gitea/actions/runs/5041309438/jobs/9040887385 * Improve comments about how font weight works: https://github.com/go-gitea/gitea/pull/24827#pullrequestreview-1435584800 --------- Co-authored-by: silverwind <me@silverwind.io>
* Add CRAN package registry (#22331)KN4CK3R2023-05-223-0/+95
| | | | | This PR adds a [CRAN](https://cran.r-project.org/) package registry. ![grafik](https://user-images.githubusercontent.com/1666336/210450039-d6fa6f77-20cd-4741-89a8-1624def267f7.png)
* Merge message template support for rebase without merge commit (#22669)Brecht Van Lommel2023-05-221-0/+7
| | | | | | | | | | | | Use `default_merge_message/REBASE_TEMPLATE.md` for amending the message of the last commit in the list of commits that was merged. Previously this template was mentioned in the documentation but not actually used. In this template additional variables `CommitTitle` and `CommitBody` are available, for the title and body of the commit. Ideally the message of every commit would be updated using the template, but doing an interactive rebase or merging commits one by one is complicated, so that is left as a future improvement.
* Support wildcard in email domain allow/block list (#24831)wxiaoguang2023-05-221-3/+2
| | | | | | | | | | | | Replace #20257 (which is stale and incomplete) Close #20255 Major changes: * Deprecate the "WHITELIST", use "ALLOWLIST" * Add wildcard support for EMAIL_DOMAIN_ALLOWLIST/EMAIL_DOMAIN_BLOCKLIST * Update example config file and document * Improve tests
* Rewrite logger system (#24726)wxiaoguang2023-05-213-551/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## ⚠️ Breaking The `log.<mode>.<logger>` style config has been dropped. If you used it, please check the new config manual & app.example.ini to make your instance output logs as expected. Although many legacy options still work, it's encouraged to upgrade to the new options. The SMTP logger is deleted because SMTP is not suitable to collect logs. If you have manually configured Gitea log options, please confirm the logger system works as expected after upgrading. ## Description Close #12082 and maybe more log-related issues, resolve some related FIXMEs in old code (which seems unfixable before) Just like rewriting queue #24505 : make code maintainable, clear legacy bugs, and add the ability to support more writers (eg: JSON, structured log) There is a new document (with examples): `logging-config.en-us.md` This PR is safer than the queue rewriting, because it's just for logging, it won't break other logic. ## The old problems The logging system is quite old and difficult to maintain: * Unclear concepts: Logger, NamedLogger, MultiChannelledLogger, SubLogger, EventLogger, WriterLogger etc * Some code is diffuclt to konw whether it is right: `log.DelNamedLogger("console")` vs `log.DelNamedLogger(log.DEFAULT)` vs `log.DelLogger("console")` * The old system heavily depends on ini config system, it's difficult to create new logger for different purpose, and it's very fragile. * The "color" trick is difficult to use and read, many colors are unnecessary, and in the future structured log could help * It's difficult to add other log formats, eg: JSON format * The log outputer doesn't have full control of its goroutine, it's difficult to make outputer have advanced behaviors * The logs could be lost in some cases: eg: no Fatal error when using CLI. * Config options are passed by JSON, which is quite fragile. * INI package makes the KEY in `[log]` section visible in `[log.sub1]` and `[log.sub1.subA]`, this behavior is quite fragile and would cause more unclear problems, and there is no strong requirement to support `log.<mode>.<logger>` syntax. ## The new design See `logger.go` for documents. ## Screenshot <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/4462d713-ba39-41f5-bb08-de912e67e1ff) ![image](https://github.com/go-gitea/gitea/assets/2114189/b188035e-f691-428b-8b2d-ff7b2199b2f9) ![image](https://github.com/go-gitea/gitea/assets/2114189/132e9745-1c3b-4e00-9e0d-15eaea495dee) </details> ## TODO * [x] add some new tests * [x] fix some tests * [x] test some sub-commands (manually ....) --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Allow all URL schemes in Markdown links by default (#24805)Yarden Shoham2023-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Closes #21146 - Closes #16721 ## :warning: BREAKING :warning: This changes the default behavior to now create links for any URL scheme when the user uses the markdown form for links (`[label](URL)`), this doesn't affect the rendering of inline links. To opt-out set the `markdown.CUSTOM_URL_SCHEMES` setting to a list of allowed schemes, all other schemes (except `http` and `https`) won't be allowed. # Before ![image](https://github.com/go-gitea/gitea/assets/20454870/35fa18ce-7dda-4995-b5b3-3f360f38296d) # After ![image](https://github.com/go-gitea/gitea/assets/20454870/0922216b-0b35-4b77-9919-21a5c21dd5d0) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Updates to doc (#24757)Alejandro Leal2023-05-174-5/+5
| | | | | | | | | | | ## Misspelling fixes to: - docs/content/doc/administration/config-cheat-sheet.en-us.md - docs/content/doc/installation/from-source.en-us.md - docs/content/doc/usage/packages/cargo.en-us.md - docs/content/doc/usage/packages/storage.en-us.md --------- Co-authored-by: delvh <dev.lh@web.de>
* Remove meta charset from HTML5 documents (#24744)silverwind2023-05-161-1/+0
| | | | | | | When `<!DOCTYPE html>` is present, the default (and only valid) charset it `utf-8` so it does not need to be specified. Also we do serve with HTML with `Content-Type: text/html; charset=utf-8`, so it is duplicate info anyways.