Commit Graph
46 Commits
Author SHA1 Message Date
silverwind 42b3a53b54 Enable all webpack sourcemaps in dev build, disable all in prod build (#25089)
- 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.
2023-06-06 12:57:08 +08:00
HesterG 4db40c80e1 Unify doc links to use paths relative to doc folder (#24979)
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.
2023-05-29 13:27:16 +00:00
Alejandro Lealanddelvh 224b1dfbf0 Updates to doc (#24757)
## 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 <[email protected]>
2023-05-17 05:45:26 +00:00
John Olheiser f072758afb Refactor docs (#23752)
This was intended to be a small followup for
https://github.com/go-gitea/gitea/pull/23712, but...here we are.

1. Our docs currently use `slug` as the entire URL, which makes
refactoring tricky (see https://github.com/go-gitea/gitea/pull/23712).
Instead, this PR attempts to make future refactoring easier by using
slugs as an extension of the section. (Hugo terminology)
- What the above boils down to is this PR attempts to use directory
organization as URL management. e.g. `usage/comparison.en-us.md` ->
`en-us/usage/comparison/`, `usage/packages/overview.en-us.md` ->
`en-us/usage/packages/overview/`
- Technically we could even remove `slug`, as Hugo defaults to using
filename, however at least with this PR it means `slug` only needs to be
the name for the **current file** rather than an entire URL
2. This PR adds appropriate aliases (redirects) for pages, so anything
on the internet that links to our docs should hopefully not break.
3. A minor nit I've had for a while, renaming `seek-help` to `support`.
It's a minor thing, but `seek-help` has a strange connotation to it.
4. The commits are split such that you can review the first which is the
"actual" change, and the second is added redirects so that the first
doesn't break links elsewhere.

---------

Signed-off-by: jolheiser <[email protected]>
2023-04-28 11:33:41 +08:00
Lunny Xiao 931770f7f4 Update docs markdown file weight to make it clear (#23909)
For Docusaurus, it needs a meta data named `sidebar_position`, so we
copy all `weight` under `menu/sidebar` as top meta key.
2023-04-04 21:47:31 +08:00
Lunny XiaoandJohn Olheiser bee3c9dfa9 Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (#23629)
- **Installation**: includes how to install Gitea and related other
tools, also includes upgrade Gitea
- **Administration**: includes how to configure Gitea, customize Gitea
and manage Gitea instance out of Gitea admin UI
- **Usage**: includes how to use Gitea's functionalities. A sub
documentation is about packages, in future we could also include CI/CD
and others.
- **Development**: includes how to integrate with Gitea's API, how to
develop new features within Gitea
- **Contributing**: includes how to contribute code to Gitea
repositories.

After this is merged, I think we can have a sub-documentation of `Usage`
part named `Actions` to describe how to use Gitea actions

---------

Co-authored-by: John Olheiser <[email protected]>
2023-03-23 23:18:24 +08:00
Lunny XiaoandKN4CK3R b0dfc70268 Move pidfile creation from setting to web cmd package (#23285)
Creating pid file should not belong to setting package and only web
command needs that. So this PR moves pidfile creation from setting
package to web command package to keep setting package more readable.

I marked this as `break` because the PIDFile path moved. For those who
have used the pid build argument, it has to be changed.

---------

Co-authored-by: KN4CK3R <[email protected]>
2023-03-16 15:22:54 +08:00
99f54b2056 Add Bash and Zsh completion scripts (#22646)
This PR adds contrib scripts for bash and zsh completion.

Simply call:

```bash
source contrib/autocompletion/bash_autocomplete
```

or for Zsh:

```bash
source contrib/autocompletion/zsh_autocomplete
```

Signed-off-by: Andrew Thornton <[email protected]>

---------

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2023-02-21 12:32:24 -05:00
Yakov5776 e56db56aa8 Fix markdown typo of an extra backtick in docs (#22123)
Fixes a visual bug in docs which is caused by a typo of an extra backtick.
2022-12-13 18:20:36 -06:00
wxiaoguang cdcdf29bb4 Fix "build from source" document to clarify the bindata tag is required. (#21853) 2022-11-18 14:34:39 +08:00
zeripath 32d58714e1 Attempt clarify AppWorkPath etc. (#21656)
Attempt clarify the AppWorkPath in the documentation by using different
notation and adding a section to the start of the cheat sheet.

Fix #21523

Signed-off-by: Andrew Thornton <[email protected]>

Signed-off-by: Andrew Thornton <[email protected]>
2022-11-09 20:22:31 -05:00
Xinyu Zhou 4756534dba Refactor docs (#21627)
This patch:
- Rename some files( `.md` to `.en-us.md`), fix missed translation copy
- Update link which shoud be refer to `../hacking-on-gitea/` instead of
`../make/` (outdated)
- Update `_redirects`:
  -  redirect `/{zh-cn|fr-fr}/make/` to `../hacking-on-gitea/`
  - redirect `/zh-cn/third-party-tools/` to `/zh-cn/integrations/`
- Delete duplicated/outdated files.
- Update menu `weight` of developers.zh-cn.md

Signed-off-by: Xinyu Zhou <[email protected]>
2022-10-31 23:16:19 +00:00
silverwind fe1726a9e5 Add markdownlint (#20512)
Add `markdownlint` linter and fix issues. Config is based on the one
from electron's repo with a few rules relaxed.
2022-07-28 09:22:47 +08:00
qwerty287 a0d1923637 Fix various typos of software names (#18083)
* `git` -> `Git`
* `Github` and `github` -> `GitHub`
* `crowdin` -> `Crowdin`
* `git-lfs` -> `Git LFS`
* `githooks`, `git hooks`, `git-hooks` -> `Git Hooks`
* `discord` -> `Discord`
* `2fa` -> `2FA`
* `gitlab` and `Gitlab` -> `GitLab`
* `web hook` -> `webhook`
* `linux` -> `Linux`
* `sqlite` -> `SQLite`
* `MYSQL` and `mysql` -> `MySQL`
* rename refs to `master` branch -> `main`
* Fix English grammar
2021-12-24 11:56:57 +08:00
techknowlogick a35b2b2959 update branch in CI and docs (#15631) 2021-05-04 12:16:23 -04:00
zeripathandLunny Xiao d22294b979 Add information on how to build statically (#14594)
Fix #14576

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
2021-02-08 10:06:21 +08:00
8371762553 Use native git variants by default with go-git variants as build tag (#13673)
* Move last commit cache back into modules/git

Signed-off-by: Andrew Thornton <[email protected]>

* Remove go-git from the interface for last commit cache

Signed-off-by: Andrew Thornton <[email protected]>

* move cacheref to last_commit_cache

Signed-off-by: Andrew Thornton <[email protected]>

* Remove go-git from routers/private/hook

Signed-off-by: Andrew Thornton <[email protected]>

* Move FindLFSFiles to pipeline

Signed-off-by: Andrew Thornton <[email protected]>

* Make no-go-git variants

Signed-off-by: Andrew Thornton <[email protected]>

* Submodule RefID

Signed-off-by: Andrew Thornton <[email protected]>

* fix issue with GetCommitsInfo

Signed-off-by: Andrew Thornton <[email protected]>

* fix GetLastCommitForPaths

Signed-off-by: Andrew Thornton <[email protected]>

* Improve efficiency

Signed-off-by: Andrew Thornton <[email protected]>

* More efficiency

Signed-off-by: Andrew Thornton <[email protected]>

* even faster

Signed-off-by: Andrew Thornton <[email protected]>

* Reduce duplication

* As per @lunny

Signed-off-by: Andrew Thornton <[email protected]>

* attempt to fix drone

Signed-off-by: Andrew Thornton <[email protected]>

* fix test-tags

Signed-off-by: Andrew Thornton <[email protected]>

* default to use no-go-git variants and add gogit build tag

Signed-off-by: Andrew Thornton <[email protected]>

* placate lint

Signed-off-by: Andrew Thornton <[email protected]>

* as per @6543

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-12-17 22:00:47 +08:00
9ccfa03d94 Reformat docs (#13897)
Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lauris BH <[email protected]>
2020-12-09 07:47:06 +01:00
6543andtechknowlogick 33231b3a42 Added Table of Contents to long documentation pages (#13890)
* Redo #13836 with new shortcode
(https://gitea.com/gitea/theme/pulls/90)

* add Api Usage

Co-authored-by: techknowlogick <[email protected]>
2020-12-07 23:52:26 -05:00
a3b10dd83e Format files (#13698)
* align "make help"

* format

* untouch build/generate-svg.js

* untouch .eslintrc

* combine editorconfig's

* rm editorconfig

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-11-28 01:12:22 -05:00
John Olheiser bc3c254112 Refactor docs (#13275)
* First pass

Signed-off-by: jolheiser <[email protected]>

* More changes

Signed-off-by: jolheiser <[email protected]>

* Redirects

Signed-off-by: jolheiser <[email protected]>
2020-10-23 11:59:45 -04:00
a5378bbce0 change PIDFile default from /var/run/gitea.pid to /run/gitea.pid (#12500)
* docs: update heading

This section covers more paths than the 3 listed in the heading.

* setting: change PIDFile default from /var/run/gitea.pid to /run/gitea.pid

On most modern distributions, /var/run is deprecated and only kept for
backwards compat according to
https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s13.html, and is a
symlink to `/run/` on modern distributions.

Old Distros that still don't have `/run` can update the gitea default as
described in from-source.en-us.md to point to the old location.

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2020-08-18 14:21:24 +03:00
zeripathandFlorian Klink f1c9434901 Make the default PID file compile-time settable (#12485)
#12391 offered to change the default PID file from /var/run/gitea.pid however in discussion it was decided that this could break users of older systems. An alternative was offered that we could make the PID file compile/link time settable.

This PR does this, and changes the name of the setting from CustomPID to simply PIDFile. It also updates the from-source docs to show how to change the compiler settings to do this.

Closes #12391

Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Florian Klink <[email protected]>
2020-08-15 21:15:27 +01:00
6543andAndrew Thornton 6e4e4b69d0 Make default StaticRootPath compile time settable (#12371)
Make it possible to compile the default location of StaticRootPath independent from AppWorkPath

Co-authored-by: Andrew Thornton <[email protected]>
2020-08-08 15:02:22 +01:00
techknowlogickandJohn Olheiser 14031018c3 recommend bindata for building (#11938)
Co-authored-by: John Olheiser <[email protected]>
2020-06-18 11:25:58 -04:00
3f4dabb5f6 [Docs] Cross Build Gitea from Source (#10999)
* Add cross-build docs

Note that C cross compiler is required for building Gitea with `TAGS`.

* Apply suggestion from @mrsdizzie

Co-Authored-By: mrsdizzie <[email protected]>

* Apply suggestion from @guillep2k

Co-Authored-By: guillep2k <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: mrsdizzie <[email protected]>
Co-authored-by: guillep2k <[email protected]>
Co-authored-by: John Olheiser <[email protected]>
2020-04-11 00:13:31 -03:00
John Olheiserandsilverwind 42639a8e32 Add node version variable to docs (#10620)
Also adjusted other version mentions so go version is always mentioned
as major.minor and node only as major.

Co-authored-by: silverwind <[email protected]>
2020-03-05 16:36:22 -06:00
guillep2k acd1034d5e Versions (#10597)
Signed-off-by: jolheiser <[email protected]>
2020-03-04 21:37:19 -03:00
Karsten LehmannandJohn Olheiser ad3b1363c0 Fixed formatting (#10485)
Co-authored-by: John Olheiser <[email protected]>
2020-02-26 13:28:39 -05:00
silverwind 3f23c2d8dd Add frontend/backend make targets, fix source release (#10325)
* Add frontend/backend make targets, fix source release

- Add 'make backend' and 'make frontend' make targets which are used to
  build go and js/css/svg files respectively.

- The 'backend' target can be invoked without requiring Node.js to be
  present on the system if pre-built frontend assets are present like
  in the release source tarballs.

- Fix source releases missing 'dist' folders inside 'node_modules' which
  were erronously excluded from tar.

- Store VERSION in file VERSION for the release tarballs and prefer that
  file over git-derived version.

* fix release task

* fix typo

* fix another typo
2020-02-22 17:15:11 +08:00
136b401252 Update documentation for the go module era (#9751)
* Update documentation for the go module era

use go env instead of $GOPATH

Update instructions to just use git clone

Slight update to readme

Signed-off-by: Andrew Thornton <[email protected]>

* fixup

* Apply suggestions from code review

Co-Authored-By: Antoine GIRARD <[email protected]>
Co-Authored-By: Bagas Sanjaya <[email protected]>

* Apply suggestions from code review

* Fix GOPATH settings

Co-authored-by: Antoine GIRARD <[email protected]>
Co-authored-by: Bagas Sanjaya <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-01-28 21:30:02 -05:00
silverwind 14f69a9fa8 Remove explicit 'generate' calls, fix release task (#9288)
* Remove more explicit 'generate' calls

`generate` is now implicit during `build` since #9114, it is no longer
necessary or desired to specify it explicitely.

* add js,css,generate dependencies to release task

* remove generate warning as per @lunny
2019-12-08 18:56:59 +02:00
Lunny Xiao 51df1558d2 Fix latest docker image haven't include static files. (#9252)
* add warnging on docs

* fix docs
2019-12-05 12:18:28 -05:00
silverwind ac91ffc0d1 Add Node.js build dep, remove built js/css files (#9114)
- Added Node.js as build dependency and removes build files from git.
- Added version checks for both Go and Node.js.
- Overhauled the js/css make target to only run when needed.
- Merged the `generate` make target into `build` as per suggestion.

Fixes: https://github.com/go-gitea/gitea/issues/6782
Fixes: https://github.com/go-gitea/gitea/issues/9216
2019-12-05 11:41:38 +08:00
zeripath 5a8901018f Fix building from source docs to ref AppWorkPath (#8567)
The current source docs reference AppWorkDir instead of AppWorkPath
2019-10-18 00:51:31 +01:00
John Olheiser f5c4a98f2c Add config option and shortcode for Gitea version (#7940)
Signed-off-by: jolheiser <[email protected]>
2019-08-23 09:55:06 +08:00
Lunny Xiao 51dc2b2ddb Use vendors when go generate (#7340)
* use vendors when go generate

* update docs about golang minimal requirement from 1.9 to 1.11

* fix build
2019-07-06 23:00:41 -04:00
zeripath fc33eabea7 Make CustomPath, CustomConf and AppWorkPath configurable at build (#6631) 2019-04-29 14:08:21 -04:00
zeripath 58d3cc3341 Fix link to Hacking on Gitea on From-Source doc page (#6471)
* fix rel-ref

* fixup
2019-03-30 12:15:16 -04:00
Aidan Fitzgerald 9853171de5 Copyedit docs (#6275) 2019-03-09 16:15:45 -05:00
zeripath 91270d4058 Update and expand information about building Gitea (#6019)
* Update and expand building information

Signed-off-by: Andrew Thornton <[email protected]>

* remove extraneous extra line

Signed-off-by: Andrew Thornton <[email protected]>

* Fix spelling mistake

Signed-off-by: Andrew Thornton <[email protected]>

* Note about documentation for the website

Signed-off-by: Andrew Thornton <[email protected]>

* More changes

Signed-off-by: Andrew Thornton <[email protected]>

* Clarified the automatic build dependency

* Update the from-source to match the hacking information

* Extend quotes

* Update required go and discord link

Signed-off-by: Andrew Thornton <[email protected]>

* Update hacking-on-gitea.en-us.md

Add in information about postcss
2019-02-12 16:22:01 +00:00
techknowlogick 3fbd6c05a8 Remove tidb reference from docs (#5823)
* Remove tidb reference from docs

* Update from-source.fr-fr.md

* Update from-source.zh-cn.md

* Update from-source.zh-tw.md
2019-01-24 09:12:42 +02:00
Mura Li 7c59b3c6a8 Update the docs for sqlite_unlock_notify (#5145) 2018-10-23 12:33:51 -04:00
Kim "BKC" Carlbäcker b213b50dda Update source installation requirements (#3124)
* Update source installation requirements

We require Golang 1.8 since we use `net/url.PathEscape` which was not introduced until then

* Use Golang 1.8 for build and test

If we state Golang 1.8 we should test using that version as well

* Use golang 1.8 only for single build to see if everything compiles

* Change back edge also for commented out sqlite test
2018-01-16 22:18:11 +01:00
Michael Lustfield 3f7768d4e8 General documentation cleanup (#3317)
* Clean up spelling, grammar, perspective, whitespace, language, markup, etc.
2018-01-08 23:48:42 +01:00
techknowlogick 4b90703858 Import docs into main repository (#2874)
* import docs into main repository

Signed-off-by: Matti Ranta <[email protected]>
2017-11-26 23:44:32 +02:00