diff --git a/.github/workflows/pull-compliance.yml b/.github/workflows/pull-compliance.yml index c8bef283a934..2b02b596fdfc 100644 --- a/.github/workflows/pull-compliance.yml +++ b/.github/workflows/pull-compliance.yml @@ -154,7 +154,7 @@ jobs: node-version: 20 - run: make deps-frontend - run: make lint-md - - run: make docs # test if build could succeed + - run: make docs actions: if: needs.files-changed.outputs.actions == 'true' || needs.files-changed.outputs.actions == 'true' diff --git a/Makefile b/Makefile index e24b35c3fce1..e75a2bcb944a 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,6 @@ help: @echo " - clean delete backend and integration files" @echo " - clean-all delete backend, frontend and integration files" @echo " - deps install dependencies" - @echo " - deps-docs install docs dependencies" @echo " - deps-frontend install frontend dependencies" @echo " - deps-backend install backend dependencies" @echo " - deps-tools install tool dependencies" @@ -373,11 +372,11 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig .PHONY: lint-js lint-js: node_modules - npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e + npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e .PHONY: lint-js-fix lint-js-fix: node_modules - npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js docs/assets/js tests/e2e --fix + npx eslint --color --max-warnings=0 --ext js,vue web_src/js build *.config.js tests/e2e --fix .PHONY: lint-css lint-css: node_modules @@ -879,20 +878,14 @@ release-sources: | $(DIST_DIRS) .PHONY: release-docs release-docs: | $(DIST_DIRS) docs - tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public . + tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs . .PHONY: docs -docs: deps-docs - cd docs; make trans-copy clean build-offline; - -.PHONY: deps-docs -deps-docs: - @hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mkdir -p ~/go/bin && mv /tmp/hugo ~/go/bin/hugo && chmod +x ~/go/bin/hugo; \ - fi +docs: + cd docs; bash scripts/trans-copy.sh; .PHONY: deps -deps: deps-frontend deps-backend deps-tools deps-docs deps-py +deps: deps-frontend deps-backend deps-tools deps-py .PHONY: deps-py deps-py: .venv diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 6a5a374845d3..000000000000 --- a/docs/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -THEME := themes/gitea -PUBLIC := public -ARCHIVE := https://dl.gitea.com/theme/main.tar.gz - -HUGO_PACKAGE := github.com/gohugoio/hugo@v0.111.3 - -.PHONY: all -all: build - -.PHONY: clean -clean: - rm -rf $(PUBLIC) $(THEME) - -.PHONY: trans-copy -trans-copy: - bash scripts/trans-copy.sh - -.PHONY: server -server: $(THEME) - go run $(HUGO_PACKAGE) server - -.PHONY: build -build: $(THEME) - go run $(HUGO_PACKAGE) --cleanDestinationDir - -.PHONY: build-offline -build-offline: $(THEME) - go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir - -.PHONY: update -update: $(THEME) - -$(THEME): $(THEME)/theme.toml -$(THEME)/theme.toml: - mkdir -p $$(dirname $@) - curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@) diff --git a/docs/README.md b/docs/README.md index 7a90cc240bdc..d9aa3b80b8f2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,36 +3,7 @@ [![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea) [![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com") -## Hosting - -These pages are hosted using [netlifycms](https://www.netlifycms.org/) and get -automatically updated on every push to the `master` branch. - -## Install - -These pages use the [Hugo](https://gohugo.io/) static site generator. -If you are planning to contribute you'll want to download and install Hugo on -your local machine. - -The installation of Hugo is out of the scope of this document, so please take -the [official install instructions](https://gohugo.io/installation/) to -get Hugo up and running. - -## Development - -To generate the website and serve it on [localhost:1313](http://localhost:1313) -just execute this command and stop it with `Ctrl+C`: - -``` -make server -``` - -When you are done with your changes just create a pull request, after merging -the pull request the website will be updated automatically. - -## Contributing - -Fork -> Patch -> Push -> Pull Request +These docs are ingested by our [docs repo](https://gitea.com/gitea/gitea-docusaurus). ## Authors diff --git a/docs/README_ZH.md b/docs/README_ZH.md index 407f4cf155ce..7d9003a8ab3a 100644 --- a/docs/README_ZH.md +++ b/docs/README_ZH.md @@ -4,27 +4,7 @@ [![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/Gitea) [![](https://images.microbadger.com/badges/image/gitea/docs.svg)](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com") -## 关于托管方式 - -本页面托管在我们 Docker 容器内的基础设施上, 它会在每次推送到 `master` 分支的时候自动更新,如果你想自己管理这个页面,你可以从我们的 Docker 镜像 [gitea/docs](https://hub.docker.com/r/gitea/docs/) 中获取它。 - -## 安装 Hugo - -本页面使用了 [Hugo](https://github.com/spf13/hugo) 静态页面生成工具,如果您有维护它的意愿,则需要在本地计算机上下载并安装 Hugo。Hugo 的安装教程不在本文档的讲述范围之内,详情请参见 [官方文档](https://gohugo.io/overview/installing/)。 - -## 如何部署 - -在 [localhost:1313](http://localhost:1313) 处构建和运行网站的命令如下,如果需要停止可以使用组合键 `Ctrl+C`: - -``` -make server -``` - -完成更改后,只需创建一个 Pull Request (PR),该 PR 一经合并网站将自动更新。 - -## 如何贡献您的代码 - -Fork -> Patch -> Push -> Pull Request +https://gitea.com/gitea/gitea-docusaurus ## 关于我们 diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js deleted file mode 100644 index 4b95b6384721..000000000000 --- a/docs/assets/js/search.js +++ /dev/null @@ -1,174 +0,0 @@ -/* global Fuse, Mark */ - -function ready(fn) { - if (document.readyState !== 'loading') { - fn(); - } else { - document.addEventListener('DOMContentLoaded', fn); - } -} - -ready(doSearch); - -const summaryInclude = 60; -const fuseOptions = { - shouldSort: true, - includeMatches: true, - matchAllTokens: true, - threshold: 0, // for parsing diacritics - tokenize: true, - location: 0, - distance: 100, - maxPatternLength: 32, - minMatchCharLength: 1, - keys: [{ - name: 'title', - weight: 0.8 - }, - { - name: 'contents', - weight: 0.5 - }, - { - name: 'tags', - weight: 0.3 - }, - { - name: 'categories', - weight: 0.3 - } - ] -}; - -function param(name) { - return decodeURIComponent((window.location.search.split(`${name}=`)[1] || '').split('&')[0]).replace(/\+/g, ' '); -} - -const searchQuery = param('s'); - -function doSearch() { - if (searchQuery) { - document.getElementById('search-query').value = searchQuery; - executeSearch(searchQuery); - } else { - const para = document.createElement('P'); - para.textContent = 'Please enter a word or phrase above'; - document.getElementById('search-results').append(para); - } -} - -function getJSON(url, fn) { - const request = new XMLHttpRequest(); - request.open('GET', url, true); - request.addEventListener('load', () => { - if (request.status >= 200 && request.status < 400) { - const data = JSON.parse(request.responseText); - fn(data); - } else { - console.error(`Target reached on ${url} with error ${request.status}`); - } - }); - request.addEventListener('error', () => { - console.error(`Connection error ${request.status}`); - }); - request.send(); -} - -function executeSearch(searchQuery) { - getJSON(`/${document.LANG}/index.json`, (data) => { - const pages = data; - const fuse = new Fuse(pages, fuseOptions); - const result = fuse.search(searchQuery); - document.getElementById('search-results').innerHTML = ''; - if (result.length > 0) { - populateResults(result); - } else { - const para = document.createElement('P'); - para.textContent = 'No matches found'; - document.getElementById('search-results').append(para); - } - }); -} - -function populateResults(result) { - for (const [key, value] of result.entries()) { - const content = value.item.contents; - let snippet = ''; - const snippetHighlights = []; - if (fuseOptions.tokenize) { - snippetHighlights.push(searchQuery); - for (const mvalue of value.matches) { - if (mvalue.key === 'tags' || mvalue.key === 'categories') { - snippetHighlights.push(mvalue.value); - } else if (mvalue.key === 'contents') { - const ind = content.toLowerCase().indexOf(searchQuery.toLowerCase()); - const start = ind - summaryInclude > 0 ? ind - summaryInclude : 0; - const end = ind + searchQuery.length + summaryInclude < content.length ? ind + searchQuery.length + summaryInclude : content.length; - snippet += content.substring(start, end); - if (ind > -1) { - snippetHighlights.push(content.substring(ind, ind + searchQuery.length)); - } else { - snippetHighlights.push(mvalue.value.substring(mvalue.indices[0][0], mvalue.indices[0][1] - mvalue.indices[0][0] + 1)); - } - } - } - } - - if (snippet.length < 1) { - snippet += content.substring(0, summaryInclude * 2); - } - // pull template from hugo template definition - const templateDefinition = document.getElementById('search-result-template').innerHTML; - // replace values - const output = render(templateDefinition, { - key, - title: value.item.title, - link: value.item.permalink, - tags: value.item.tags, - categories: value.item.categories, - snippet - }); - document.getElementById('search-results').append(htmlToElement(output)); - - for (const snipvalue of snippetHighlights) { - new Mark(document.getElementById(`summary-${key}`)).mark(snipvalue); - } - } -} - -function render(templateString, data) { - let conditionalMatches, copy; - const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*\}/g; - // since loop below depends on re.lastIndex, we use a copy to capture any manipulations whilst inside the loop - copy = templateString; - while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) { - if (data[conditionalMatches[1]]) { - // valid key, remove conditionals, leave content. - copy = copy.replace(conditionalMatches[0], conditionalMatches[2]); - } else { - // not valid, remove entire section - copy = copy.replace(conditionalMatches[0], ''); - } - } - templateString = copy; - // now any conditionals removed we can do simple substitution - let key, find, re; - for (key of Object.keys(data)) { - find = `\\$\\{\\s*${key}\\s*\\}`; - re = new RegExp(find, 'g'); - templateString = templateString.replace(re, data[key]); - } - return templateString; -} - -/** - * By Mark Amery: https://stackoverflow.com/a/35385518 - * @param {String} HTML representing a single element - * @return {Element} - */ -function htmlToElement(html) { - const template = document.createElement('template'); - html = html.trim(); // Never return a text node of whitespace as the result - template.innerHTML = html; - return template.content.firstChild; -} diff --git a/docs/config.yaml b/docs/config.yaml deleted file mode 100644 index 81adcaf4526f..000000000000 --- a/docs/config.yaml +++ /dev/null @@ -1,369 +0,0 @@ -baseurl: https://docs.gitea.io/ -languageCode: en-us -title: Docs -theme: gitea - -defaultContentLanguage: en-us -defaultContentLanguageInSubdir: true -enableMissingTranslationPlaceholders: true -enableEmoji: true - -permalinks: - post: /:year/:month/:title/ - doc: /:sections[1:]/:slug/ - page: /:slug/ - default: /:slug/ - -params: - description: Git with a cup of tea - author: The Gitea Authors - website: https://docs.gitea.io - version: 1.19.0 # FIXME: this version was used as "latest stable release", but it always gets outdated and doesn't make sense - minGoVersion: 1.20 - goVersion: 1.20 - minNodeVersion: 16 - search: nav - repo: "https://github.com/go-gitea/gitea" - docContentPath: "docs/content" - -markup: - tableOfContents: - startLevel: 1 - endLevel: 9 - -outputs: - home: - - HTML - - RSS - - JSON - -menu: - page: - - name: Website - url: https://gitea.io/en-us/ - weight: 10 - pre: home - - name: Docs - url: /en-us/ - weight: 20 - pre: question - post: active - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: Blog - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: Shop - url: https://shop.gitea.io/ - weight: 40 - pre: shopping-cart - - name: Translation - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: Downloads - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group - -languages: - en-us: - weight: 0 - languageName: English - - zh-cn: - weight: 1 - languageName: 中文(简体) - menu: - page: - - name: 网站 - url: https://gitea.io/zh-cn/ - weight: 10 - pre: home - - name: 文档 - url: /zh-cn/ - weight: 20 - pre: question - post: active - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: 博客 - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: 导入 - url: https://code.gitea.io/ - weight: 40 - pre: code - - name: 翻译 - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: 下载 - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group - - zh-tw: - weight: 2 - languageName: 中文(繁體) - menu: - page: - - name: 網站 - url: https://gitea.io/zh-tw/ - weight: 10 - pre: home - - name: 文件 - url: /zh-tw/ - weight: 20 - pre: question - post: active - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: 部落格 - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: 商店 - url: https://shop.gitea.io/ - weight: 40 - pre: shopping-cart - - name: 翻譯 - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: 下載 - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord 聊天室 - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: 討論區 - url: https://discourse.gitea.io/ - weight: 80 - pre: group - - pt-br: - weight: 3 - languageName: Português Brasileiro - menu: - page: - - name: Página inicial - url: https://gitea.io/pt-br/ - weight: 10 - pre: home - - name: Documentação - url: /pt-br/ - weight: 20 - pre: question - post: active - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: Blog - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: Código-fonte - url: https://code.gitea.io/ - weight: 40 - pre: code - - name: Translation - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: Downloads - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Chat no Discord - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group - - nl-nl: - weight: 4 - languageName: Nederlands - menu: - page: - - name: Website - url: https://gitea.io/nl-nl/ - weight: 10 - pre: home - - name: Docs - url: /nl-nl/ - weight: 20 - pre: question - post: active - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: Blog - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: Code - url: https://code.gitea.io/ - weight: 40 - pre: code - - name: Translation - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: Downloads - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group - - fr-fr: - weight: 5 - languageName: Français - menu: - page: - - name: Site - url: https://gitea.io/en-us/ - weight: 10 - pre: home - post: active - - name: Documentation - url: /fr-fr/ - weight: 20 - pre: question - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: Blog - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: Code - url: https://code.gitea.io/ - weight: 40 - pre: code - - name: Translation - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: Téléchargement - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group - - de-de: - weight: 6 - languageName: Deutsch - menu: - page: - - name: Webseite - url: https://gitea.io/en-us/ - weight: 10 - pre: home - post: active - - name: Dokumentation - url: /de-de/ - weight: 20 - pre: question - - name: API - url: https://try.gitea.io/api/swagger - weight: 45 - pre: plug - - name: Blog - url: https://blog.gitea.io/ - weight: 30 - pre: rss - - name: Code - url: https://code.gitea.io/ - weight: 40 - pre: code - - name: Übersetzung - url: https://crowdin.com/project/gitea - weight: 41 - pre: language - - name: Downloads - url: https://dl.gitea.io/ - weight: 50 - pre: download - - name: GitHub - url: https://github.com/go-gitea/ - weight: 60 - pre: github - - name: Discord Chat - url: https://discord.gg/Gitea - weight: 70 - pre: comment - - name: Forum - url: https://discourse.gitea.io/ - weight: 80 - pre: group diff --git a/docs/content/doc/actions.en-us.md b/docs/content/actions.en-us.md similarity index 78% rename from docs/content/doc/actions.en-us.md rename to docs/content/actions.en-us.md index 7cd2ba0546fc..d8e33d37846a 100644 --- a/docs/content/doc/actions.en-us.md +++ b/docs/content/actions.en-us.md @@ -2,12 +2,12 @@ date: "2023-04-27T14:00:00+08:00" title: "Actions" slug: "actions" -weight: 36 +sidebar_position: 36 toc: false draft: false menu: sidebar: name: "Usage - Actions" - weight: 31 + sidebar_position: 31 identifier: "actions" --- diff --git a/docs/content/doc/administration.en-us.md b/docs/content/administration.en-us.md similarity index 81% rename from docs/content/doc/administration.en-us.md rename to docs/content/administration.en-us.md index 5d3ba385d951..416b9e631e90 100644 --- a/docs/content/doc/administration.en-us.md +++ b/docs/content/administration.en-us.md @@ -2,13 +2,13 @@ date: "2016-12-01T16:00:00+02:00" title: "Administration" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "Administration" - weight: 20 + sidebar_position: 20 collapse: true identifier: "administration" --- diff --git a/docs/content/doc/administration.fr-fr.md b/docs/content/administration.fr-fr.md similarity index 79% rename from docs/content/doc/administration.fr-fr.md rename to docs/content/administration.fr-fr.md index 957ff7b1942c..ed11881b7703 100644 --- a/docs/content/doc/administration.fr-fr.md +++ b/docs/content/administration.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-08-23T09:00:00+02:00" title: "Avancé" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "Avancé" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/docs/content/doc/administration.zh-cn.md b/docs/content/administration.zh-cn.md similarity index 79% rename from docs/content/doc/administration.zh-cn.md rename to docs/content/administration.zh-cn.md index 6e032d326656..262e5f068f10 100644 --- a/docs/content/doc/administration.zh-cn.md +++ b/docs/content/administration.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "运维" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "运维" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/docs/content/doc/administration.zh-tw.md b/docs/content/administration.zh-tw.md similarity index 79% rename from docs/content/doc/administration.zh-tw.md rename to docs/content/administration.zh-tw.md index daf8e3f1052a..455d6a363fb8 100644 --- a/docs/content/doc/administration.zh-tw.md +++ b/docs/content/administration.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "運維" slug: "administration" -weight: 30 +sidebar_position: 30 toc: false draft: false menu: sidebar: name: "運維" - weight: 20 + sidebar_position: 20 identifier: "administration" --- diff --git a/docs/content/doc/administration/_index.en-us.md b/docs/content/administration/_index.en-us.md similarity index 100% rename from docs/content/doc/administration/_index.en-us.md rename to docs/content/administration/_index.en-us.md diff --git a/docs/content/doc/administration/_index.zh-cn.md b/docs/content/administration/_index.zh-cn.md similarity index 100% rename from docs/content/doc/administration/_index.zh-cn.md rename to docs/content/administration/_index.zh-cn.md diff --git a/docs/content/doc/administration/_index.zh-tw.md b/docs/content/administration/_index.zh-tw.md similarity index 100% rename from docs/content/doc/administration/_index.zh-tw.md rename to docs/content/administration/_index.zh-tw.md diff --git a/docs/content/doc/administration/adding-legal-pages.en-us.md b/docs/content/administration/adding-legal-pages.en-us.md similarity index 96% rename from docs/content/doc/administration/adding-legal-pages.en-us.md rename to docs/content/administration/adding-legal-pages.en-us.md index 6de145ce09ca..c6f68edcd0e5 100644 --- a/docs/content/doc/administration/adding-legal-pages.en-us.md +++ b/docs/content/administration/adding-legal-pages.en-us.md @@ -2,7 +2,7 @@ date: "2019-12-28" title: "Adding Legal Pages" slug: adding-legal-pages -weight: 110 +sidebar_position: 110 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "Adding Legal Pages" identifier: "adding-legal-pages" - weight: 110 + sidebar_position: 110 --- Some jurisdictions (such as EU), requires certain legal pages (e.g. Privacy Policy) to be added to website. Follow these steps to add them to your Gitea instance. diff --git a/docs/content/doc/administration/adding-legal-pages.zh-cn.md b/docs/content/administration/adding-legal-pages.zh-cn.md similarity index 96% rename from docs/content/doc/administration/adding-legal-pages.zh-cn.md rename to docs/content/administration/adding-legal-pages.zh-cn.md index dc0bccef3db9..5d582e871de5 100644 --- a/docs/content/doc/administration/adding-legal-pages.zh-cn.md +++ b/docs/content/administration/adding-legal-pages.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "添加法律页面" slug: adding-legal-pages -weight: 110 +sidebar_position: 110 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "添加法律页面" identifier: "adding-legal-pages" - weight: 110 + sidebar_position: 110 --- 一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。 diff --git a/docs/content/doc/administration/backup-and-restore.en-us.md b/docs/content/administration/backup-and-restore.en-us.md similarity index 99% rename from docs/content/doc/administration/backup-and-restore.en-us.md rename to docs/content/administration/backup-and-restore.en-us.md index 5a722f4965f5..251bd53afefc 100644 --- a/docs/content/doc/administration/backup-and-restore.en-us.md +++ b/docs/content/administration/backup-and-restore.en-us.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "Backup and Restore" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Backup and Restore" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- @@ -20,10 +20,6 @@ menu: Gitea currently has a `dump` command that will save the installation to a ZIP file. This file can be unpacked and used to restore an instance. -**Table of Contents** - -{{< toc >}} - ## Backup Consistency To ensure the consistency of the Gitea instance, it must be shutdown during backup. diff --git a/docs/content/doc/administration/backup-and-restore.zh-cn.md b/docs/content/administration/backup-and-restore.zh-cn.md similarity index 98% rename from docs/content/doc/administration/backup-and-restore.zh-cn.md rename to docs/content/administration/backup-and-restore.zh-cn.md index 89ae93923ae8..98d378d5dcb7 100644 --- a/docs/content/doc/administration/backup-and-restore.zh-cn.md +++ b/docs/content/administration/backup-and-restore.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-06T09:33:00+08:00" title: "备份与恢复" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "备份与恢复" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- diff --git a/docs/content/doc/administration/backup-and-restore.zh-tw.md b/docs/content/administration/backup-and-restore.zh-tw.md similarity index 97% rename from docs/content/doc/administration/backup-and-restore.zh-tw.md rename to docs/content/administration/backup-and-restore.zh-tw.md index 07b9b0726b4d..4966ccdc509a 100644 --- a/docs/content/doc/administration/backup-and-restore.zh-tw.md +++ b/docs/content/administration/backup-and-restore.zh-tw.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "用法: 備份與還原" slug: "backup-and-restore" -weight: 11 +sidebar_position: 11 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "備份與還原" - weight: 11 + sidebar_position: 11 identifier: "backup-and-restore" --- diff --git a/docs/content/doc/administration/cmd-embedded.en-us.md b/docs/content/administration/cmd-embedded.en-us.md similarity index 93% rename from docs/content/doc/administration/cmd-embedded.en-us.md rename to docs/content/administration/cmd-embedded.en-us.md index a58cbbf7fc79..fabb7148ad87 100644 --- a/docs/content/doc/administration/cmd-embedded.en-us.md +++ b/docs/content/administration/cmd-embedded.en-us.md @@ -2,7 +2,7 @@ date: "2020-01-25T21:00:00-03:00" title: "Embedded data extraction tool" slug: "cmd-embedded" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "administration" name: "Embedded data extraction tool" - weight: 20 + sidebar_position: 20 identifier: "cmd-embedded" --- # Embedded data extraction tool -**Table of Contents** - -{{< toc >}} - Gitea's executable contains all the resources required to run: templates, images, style-sheets and translations. Any of them can be overridden by placing a replacement in a matching path -inside the `custom` directory (see [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}})). +inside the `custom` directory (see [Customizing Gitea](administration/customizing-gitea.md)). To obtain a copy of the embedded resources ready for editing, the `embedded` command from the CLI can be used from the OS shell interface. @@ -87,7 +83,7 @@ The default is the current directory. The `--custom` flag tells Gitea to extract the files directly into the `custom` directory. For this to work, the command needs to know the location of the `app.ini` configuration file (`--config`) and, depending of the configuration, be ran from the directory where -Gitea normally starts. See [Customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) for details. +Gitea normally starts. See [Customizing Gitea](administration/customizing-gitea.md) for details. The `--overwrite` flag allows any existing files in the destination directory to be overwritten. diff --git a/docs/content/doc/administration/cmd-embedded.zh-cn.md b/docs/content/administration/cmd-embedded.zh-cn.md similarity index 92% rename from docs/content/doc/administration/cmd-embedded.zh-cn.md rename to docs/content/administration/cmd-embedded.zh-cn.md index 663d9cdada8d..27ee61040edf 100644 --- a/docs/content/doc/administration/cmd-embedded.zh-cn.md +++ b/docs/content/administration/cmd-embedded.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "嵌入资源提取工具" slug: "cmd-embedded" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,17 +11,13 @@ menu: sidebar: parent: "administration" name: "嵌入资源提取工具" - weight: 20 + sidebar_position: 20 identifier: "cmd-embedded" --- # 嵌入资源提取工具 -**目录** - -{{< toc >}} - -Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}))。 +Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置](administration/customizing-gitea.md))。 要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。 @@ -75,7 +71,7 @@ gitea [--config {file}] embedded extract [--destination {dir}|--custom] [--overw `--destination` 选项用于指定提取文件的目标目录。默认为当前目录。 -`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})。 +`--custom` 标志告知 Gitea 直接将文件提取到 `custom` 目录中。为使其正常工作,该命令需要知道 `app.ini` 配置文件的位置(通过 `--config` 指定),并且根据配置的不同,需要从 Gitea 通常启动的目录运行。有关详细信息,请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md)。 `--overwrite` 标志允许覆盖目标目录中的任何现有文件。 diff --git a/docs/content/doc/administration/command-line.en-us.md b/docs/content/administration/command-line.en-us.md similarity index 99% rename from docs/content/doc/administration/command-line.en-us.md rename to docs/content/administration/command-line.en-us.md index a977ed3a64c9..400d9dd877af 100644 --- a/docs/content/doc/administration/command-line.en-us.md +++ b/docs/content/administration/command-line.en-us.md @@ -2,7 +2,7 @@ date: "2017-01-01T16:00:00+02:00" title: "Gitea Command Line" slug: "command-line" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Command Line" - weight: 1 + sidebar_position: 1 identifier: "command-line" --- # Command Line -**Table of Contents** - -{{< toc >}} - ## Usage `gitea [global options] command [command or global options] [arguments...]` diff --git a/docs/content/doc/administration/command-line.zh-cn.md b/docs/content/administration/command-line.zh-cn.md similarity index 99% rename from docs/content/doc/administration/command-line.zh-cn.md rename to docs/content/administration/command-line.zh-cn.md index a832cbef97e3..4b8176322dd1 100644 --- a/docs/content/doc/administration/command-line.zh-cn.md +++ b/docs/content/administration/command-line.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Gitea 命令行" slug: "command-line" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Gitea 命令行" - weight: 1 + sidebar_position: 1 identifier: "command-line" --- # 命令行 -**目录** - -{{< toc >}} - ## 用法 `gitea [全局选项] 命令 [命令或全局选项] [参数...]` diff --git a/docs/content/doc/administration/config-cheat-sheet.en-us.md b/docs/content/administration/config-cheat-sheet.en-us.md similarity index 92% rename from docs/content/doc/administration/config-cheat-sheet.en-us.md rename to docs/content/administration/config-cheat-sheet.en-us.md index fc2184e88459..6d5789ff0dc5 100644 --- a/docs/content/doc/administration/config-cheat-sheet.en-us.md +++ b/docs/content/administration/config-cheat-sheet.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-26T16:00:00+02:00" title: "Config Cheat Sheet" slug: "config-cheat-sheet" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Config Cheat Sheet" - weight: 30 + sidebar_position: 30 identifier: "config-cheat-sheet" --- @@ -35,8 +35,6 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. **Note:** A full restart is required for Gitea configuration changes to take effect. -{{< toc >}} - ## Default Configuration (non-`app.ini` configuration) These values are environment-dependent but form the basis of a lot of values. They will be @@ -82,7 +80,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `SCRIPT_TYPE`: **bash**: The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. - `DETECTED_CHARSETS_ORDER`: **UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr**: Tie-break order of detected charsets - if the detected charsets have equal confidence, charsets earlier in the list will be chosen in preference to those later. Adding `defaults` will place the unnamed charsets at that point. -- `ANSI_CHARSET`: **\**: Default ANSI charset to override non-UTF-8 charsets to. +- `ANSI_CHARSET`: **_empty_**: Default ANSI charset to override non-UTF-8 charsets to. - `FORCE_PRIVATE`: **false**: Force every new repository to be private. - `DEFAULT_PRIVATE`: **last**: Default private when creating a new repository. \[last, private, public\] @@ -97,7 +95,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build default SSH port is used. - `GO_GET_CLONE_URL_PROTOCOL`: **https**: Value for the "go get" request returns the repository url as https or ssh default is https. -- `ACCESS_CONTROL_ALLOW_ORIGIN`: **\**: Value for Access-Control-Allow-Origin header, +- `ACCESS_CONTROL_ALLOW_ORIGIN`: **_empty_**: Value for Access-Control-Allow-Origin header, default is not to present. **WARNING**: This maybe harmful to you website if you do not give it a right value. - `DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH`: **false**: Close an issue if a commit on a non default branch marks it as closed. @@ -147,13 +145,13 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build - `ENABLED`: **true**: Whether repository file uploads are enabled - `TEMP_PATH`: **data/tmp/uploads**: Path for uploads (content gets deleted on Gitea restart) -- `ALLOWED_TYPES`: **\**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. - `FILE_MAX_SIZE`: **3**: Max size of each file in megabytes. - `MAX_FILES`: **5**: Max number of files per upload ### Repository - Release (`repository.release`) -- `ALLOWED_TYPES`: **\**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +- `ALLOWED_TYPES`: **_empty_**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. - `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface - For settings related to file attachments on releases, see the `attachment` section. @@ -291,7 +289,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `ROOT_URL`: **%(PROTOCOL)s://%(DOMAIN)s:%(HTTP\_PORT)s/**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -- `STATIC_URL_PREFIX`: **\**: +- `STATIC_URL_PREFIX`: **_empty_**: Overwrite this option to request static resources from a different URL. This includes CSS files, images, JS files and web fonts. Avatar images are dynamic resources and still served by Gitea. @@ -337,7 +335,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_ROOT_PATH`: **~/.ssh**: Root path of SSH directory. - `SSH_CREATE_AUTHORIZED_KEYS_FILE`: **true**: Gitea will create a authorized_keys file by default when it is not using the internal ssh server. If you intend to use the AuthorizedKeysCommand functionality then you should turn this off. - `SSH_AUTHORIZED_KEYS_BACKUP`: **false**: Enable SSH Authorized Key Backup when rewriting all keys, default is false. -- `SSH_TRUSTED_USER_CA_KEYS`: **\**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh- ` or `ssh- , ssh- `. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`. +- `SSH_TRUSTED_USER_CA_KEYS`: **_empty_**: Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. Multiple keys should be comma separated. E.g.`ssh- ` or `ssh- , ssh- `. For more information see `TrustedUserCAKeys` in the sshd config man pages. When empty no file will be created and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` will default to `off`. - `SSH_TRUSTED_USER_CA_KEYS_FILENAME`: **`RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem**: Absolute path of the `TrustedUserCaKeys` file Gitea will manage. If you're running your own ssh server and you want to use the Gitea managed file you'll also need to modify your sshd_config to point to this file. The official docker image will automatically work without further configuration. - `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set. - `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. @@ -348,7 +346,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect - `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you. - `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory. -- `SSH_KEYGEN_PATH`: **\**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. +- `SSH_KEYGEN_PATH`: **_empty_**: Use `ssh-keygen` to parse public SSH keys. The value is passed to the shell. By default, Gitea does the parsing itself. - `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false. - `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to -1 to disable all timeouts.) @@ -367,8 +365,8 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login, **custom**\]. Where custom would instead be any URL such as "/org/repo" or even `https://anotherwebsite.com` - `LFS_START_SERVER`: **false**: Enables Git LFS support. - `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)s/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`. -- `LFS_JWT_SECRET`: **\**: LFS authentication secret, change this a unique string. -- `LFS_JWT_SECRET_URI`: **\**: Instead of defining LFS_JWT_SECRET in the configuration, this configuration option can be used to give Gitea a path to a file that contains the secret (example value: `file:/etc/gitea/lfs_jwt_secret`) +- `LFS_JWT_SECRET`: **_empty_**: LFS authentication secret, change this a unique string. +- `LFS_JWT_SECRET_URI`: **_empty_**: Instead of defining LFS_JWT_SECRET in the configuration, this configuration option can be used to give Gitea a path to a file that contains the secret (example value: `file:/etc/gitea/lfs_jwt_secret`) - `LFS_HTTP_AUTH_EXPIRY`: **24h**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail. - `LFS_MAX_FILE_SIZE`: **0**: Maximum allowed LFS file size in bytes (Set to 0 for no limit). - `LFS_LOCKS_PAGING_NUM`: **50**: Maximum number of LFS Locks returned per page. @@ -377,7 +375,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `REDIRECTOR_USE_PROXY_PROTOCOL`: **%(USE_PROXY_PROTOCOL)s**: expect PROXY protocol header on connections to https redirector. - `PORT_TO_REDIRECT`: **80**: Port for the http redirection service to listen on. Used when `REDIRECT_OTHER_PORT` is true. - `SSL_MIN_VERSION`: **TLSv1.2**: Set the minimum version of ssl support. -- `SSL_MAX_VERSION`: **\**: Set the maximum version of ssl support. +- `SSL_MAX_VERSION`: **_empty_**: Set the maximum version of ssl support. - `SSL_CURVE_PREFERENCES`: **X25519,P256**: Set the preferred curves, - `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites. - If there is no hardware support for AES suites, by default the ChaCha suites will be preferred over the AES suites. @@ -413,11 +411,11 @@ The following configuration set `Content-Type: application/vnd.android.package-a - "ecdhe_rsa_with_chacha20_poly1305" is an alias for "ecdhe_rsa_with_chacha20_poly1305_sha256" - "ecdhe_ecdsa_with_chacha20_poly1305" is alias for "ecdhe_ecdsa_with_chacha20_poly1305_sha256" - `ENABLE_ACME`: **false**: Flag to enable automatic certificate management via an ACME capable Certificate Authority (CA) server (default: Lets Encrypt). If enabled, `CERT_FILE` and `KEY_FILE` are ignored, and the CA must resolve `DOMAIN` to this gitea server. Ensure that DNS records are set and either port `80` or port `443` are accessible by the CA server (the public internet by default), and redirected to the appropriate ports `PORT_TO_REDIRECT` or `HTTP_PORT` respectively. -- `ACME_URL`: **\**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well). +- `ACME_URL`: **_empty_**: The CA's ACME directory URL, e.g. for a self-hosted [smallstep CA server](https://github.com/smallstep/certificates), it can look like `https://ca.example.com/acme/acme/directory`. If left empty, it defaults to using Let's Encerypt's production CA (check `LETSENCRYPT_ACCEPTTOS` as well). - `ACME_ACCEPTTOS`: **false**: This is an explicit check that you accept the terms of service of the ACME provider. The default is Lets Encrypt [terms of service](https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf). - `ACME_DIRECTORY`: **https**: Directory that the certificate manager will use to cache information such as certs and private keys. -- `ACME_EMAIL`: **\**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates. -- `ACME_CA_ROOT`: **\**: The CA's root certificate. If left empty, it defaults to using the system's trust chain. +- `ACME_EMAIL`: **_empty_**: Email used for the ACME registration. Usually it is to notify about problems with issued certificates. +- `ACME_CA_ROOT`: **_empty_**: The CA's root certificate. If left empty, it defaults to using the system's trust chain. - `ALLOW_GRACEFUL_RESTARTS`: **true**: Perform a graceful restart on SIGHUP - `GRACEFUL_HAMMER_TIME`: **60s**: After a restart the parent process will stop accepting new connections and will allow requests to finish before stopping. Shutdown will be forced if it takes longer than this time. - `STARTUP_TIMEOUT`: **0**: Shutsdown the server if startup takes longer than the provided time. On Windows setting this sends a waithint to the SVC host to tell the SVC host startup may take some time. Please note startup is determined by the opening of the listeners - HTTP/HTTPS/SSH. Indexers may take longer to startup and can have their own timeouts. @@ -428,8 +426,8 @@ The following configuration set `Content-Type: application/vnd.android.package-a - `HOST`: **127.0.0.1:3306**: Database host address and port or absolute path for unix socket \[mysql, postgres\] (ex: /var/run/mysqld/mysqld.sock). - `NAME`: **gitea**: Database name. - `USER`: **root**: Database username. -- `PASSWD`: **\**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password. -- `SCHEMA`: **\**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand, +- `PASSWD`: **_empty_**: Database user password. Use \`your password\` or """your password""" for quoting if you use special characters in the password. +- `SCHEMA`: **_empty_**: For PostgreSQL only, schema to use if different from "public". The schema must exist beforehand, the user must have creation privileges on it, and the user search path must be set to the look into the schema first (e.g. `ALTER USER user SET SEARCH_PATH = schema_name,"$user",public;`). - `SSL_MODE`: **disable**: SSL/TLS encryption mode for connecting to the database. This option is only applied for PostgreSQL and MySQL. @@ -517,7 +515,7 @@ And the following unique queues: - `INSTALL_LOCK`: **false**: Controls access to the installation page. When set to "true", the installation page is not accessible. - `SECRET_KEY`: **\**: Global secret key. This key is VERY IMPORTANT, if you lost it, the data encrypted by it (like 2FA secret) can't be decrypted anymore. -- `SECRET_KEY_URI`: **\**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY. +- `SECRET_KEY_URI`: **_empty_**: Instead of defining SECRET_KEY, this option can be used to use the key stored in a file (example value: `file:/etc/gitea/secret_key`). It shouldn't be lost like SECRET_KEY. - `LOGIN_REMEMBER_DAYS`: **7**: Cookie lifetime, in days. - `COOKIE_USERNAME`: **gitea\_awesome**: Name of the cookie used to store the current username. - `COOKIE_REMEMBER_NAME`: **gitea\_incredible**: Name of cookie used to store authentication @@ -543,7 +541,7 @@ And the following unique queues: - `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to Gitea repositories you should set the environment appropriately. - `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server. - `INTERNAL_TOKEN`: **\**: Secret used to validate communication within Gitea binary. -- `INTERNAL_TOKEN_URI`: **\**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`) +- `INTERNAL_TOKEN_URI`: **_empty_**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`) - `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, pbkdf2_v1, pbkdf2_hi, scrypt, bcrypt\], argon2 and scrypt will spend significant amounts of memory. - Note: The default parameters for `pbkdf2` hashing have changed - the previous settings are available as `pbkdf2_v1` but are not recommended. - The hash functions may be tuned by using `$` after the algorithm: @@ -574,23 +572,23 @@ And the following unique queues: ## Camo (`camo`) - `ENABLED`: **false**: Enable media proxy, we support images only at the moment. -- `SERVER_URL`: **\**: URL of camo server, it **is required** if camo is enabled. -- `HMAC_KEY`: **\**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled. +- `SERVER_URL`: **_empty_**: URL of camo server, it **is required** if camo is enabled. +- `HMAC_KEY`: **_empty_**: Provide the HMAC key for encoding URLs, it **is required** if camo is enabled. - `ALLWAYS`: **false**: Set to true to use camo for both HTTP and HTTPS content, otherwise only non-HTTPS URLs are proxied ## OpenID (`openid`) - `ENABLE_OPENID_SIGNIN`: **false**: Allow authentication in via OpenID. - `ENABLE_OPENID_SIGNUP`: **! DISABLE\_REGISTRATION**: Allow registering via OpenID. -- `WHITELISTED_URIS`: **\**: If non-empty, list of POSIX regex patterns matching +- `WHITELISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching OpenID URI's to permit. -- `BLACKLISTED_URIS`: **\**: If non-empty, list of POSIX regex patterns matching +- `BLACKLISTED_URIS`: **_empty_**: If non-empty, list of POSIX regex patterns matching OpenID URI's to block. ## OAuth2 Client (`oauth2_client`) - `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section) -- `OPENID_CONNECT_SCOPES`: **\**: List of additional openid connect scopes. (`openid` is implicitly added) +- `OPENID_CONNECT_SCOPES`: **_empty_**: List of additional openid connect scopes. (`openid` is implicitly added) - `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users. - `USERNAME`: **nickname**: The source of the username for new oauth2 accounts: - userid - use the userid / sub attribute @@ -654,8 +652,8 @@ And the following unique queues: - `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature. - `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default. - `DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME`: **true**: Only allow users with write permissions to track time. -- `EMAIL_DOMAIN_ALLOWLIST`: **\**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported. -- `EMAIL_DOMAIN_BLOCKLIST`: **\**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported. +- `EMAIL_DOMAIN_ALLOWLIST`: **_empty_**: If non-empty, comma separated list of domain names that can only be used to register on this instance, wildcard is supported. +- `EMAIL_DOMAIN_BLOCKLIST`: **_empty_**: If non-empty, comma separated list of domain names that cannot be used to register on this instance, wildcard is supported. - `SHOW_REGISTRATION_BUTTON`: **! DISABLE\_REGISTRATION**: Show Registration Button - `SHOW_MILESTONES_DASHBOARD_PAGE`: **true** Enable this to show the milestones dashboard page - a view of all the user's milestones - `AUTO_WATCH_NEW_REPOS`: **true**: Enable this to let all organisation users watch new repos when they are created @@ -699,8 +697,8 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type - Wildcard hosts: `*.mydomain.com`, `192.168.100.*` - `SKIP_TLS_VERIFY`: **false**: Allow insecure certification. - `PAGING_NUM`: **10**: Number of webhook history events that are shown in one page. -- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting. -- `PROXY_HOSTS`: **\`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting. +- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting. +- `PROXY_HOSTS`: **_empty_`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting. ## Mailer (`mailer`) @@ -711,14 +709,14 @@ and [Gitea 1.17 configuration document](https://github.com/go-gitea/gitea/blob/release/v1.17/docs/content/doc/advanced/config-cheat-sheet.en-us.md) - `ENABLED`: **false**: Enable to use a mail service. -- `PROTOCOL`: **\**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._ +- `PROTOCOL`: **_empty_**: Mail server protocol. One of "smtp", "smtps", "smtp+starttls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._ - SMTP family, if your provider does not explicitly say which protocol it uses but does provide a port, you can set SMTP_PORT instead and this will be inferred. - **sendmail** Use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems. - **dummy** Send email messages to the log as a testing phase. - Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`, `FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`. - Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`. -- `SMTP_ADDR`: **\**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._ -- `SMTP_PORT`: **\**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._ +- `SMTP_ADDR`: **_empty_**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._ +- `SMTP_PORT`: **_empty_**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._ - 25: insecure SMTP - 465: SMTP Secure - 587: StartTLS @@ -726,16 +724,16 @@ and - `CLIENT_CERT_FILE`: **custom/mailer/cert.pem**: Client certificate file. - `CLIENT_KEY_FILE`: **custom/mailer/key.pem**: Client key file. - `FORCE_TRUST_SERVER_CERT`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. Consider adding the certificate to the system trust store instead. -- `USER`: **\**: Username of mailing user (usually the sender's e-mail address). -- `PASSWD`: **\**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password. - - Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup]({{< relref "doc/administration/email-setup.en-us.md" >}}) for more information. +- `USER`: **_empty_**: Username of mailing user (usually the sender's e-mail address). +- `PASSWD`: **_empty_**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password. + - Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup](administration/email-setup.md) for more information. - `ENABLE_HELO`: **true**: Enable HELO operation. - `HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname. -- `FROM`: **\**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \ format. -- `ENVELOPE_FROM`: **\**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address. -- `SUBJECT_PREFIX`: **\**: Prefix to be placed before e-mail subject lines. +- `FROM`: **_empty_**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \ format. +- `ENVELOPE_FROM`: **_empty_**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address. +- `SUBJECT_PREFIX`: **_empty_**: Prefix to be placed before e-mail subject lines. - `SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be command or full path). -- `SENDMAIL_ARGS`: **\**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`) +- `SENDMAIL_ARGS`: **_empty_**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`) - `SENDMAIL_TIMEOUT`: **5m**: default timeout for sending email through sendmail - `SENDMAIL_CONVERT_CRLF`: **true**: Most versions of sendmail prefer LF line endings rather than CRLF line endings. Set this to false if your version of sendmail requires CRLF line endings. - `SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]` @@ -744,11 +742,11 @@ and ## Incoming Email (`email.incoming`) - `ENABLED`: **false**: Enable handling of incoming emails. -- `REPLY_TO_ADDRESS`: **\**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`). -- `HOST`: **\**: IMAP server host. -- `PORT`: **\**: IMAP server port. -- `USERNAME`: **\**: Username of the receiving account. -- `PASSWORD`: **\**: Password of the receiving account. +- `REPLY_TO_ADDRESS`: **_empty_**: The email address including the `%{token}` placeholder that will be replaced per user/action. Example: `incoming+%{token}@example.com`. The placeholder must appear in the user part of the address (before the `@`). +- `HOST`: **_empty_**: IMAP server host. +- `PORT`: **_empty_**: IMAP server port. +- `USERNAME`: **_empty_**: Username of the receiving account. +- `PASSWORD`: **_empty_**: Password of the receiving account. - `USE_TLS`: **false**: Whether the IMAP server uses TLS. - `SKIP_TLS_VERIFY`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. - `MAILBOX`: **INBOX**: The mailbox name where incoming mail will end up. @@ -760,7 +758,7 @@ and - `ENABLED`: **true**: Enable the cache. - `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `redis-cluster`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.) - `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only. -- `HOST`: **\**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue. +- `HOST`: **_empty_**: Connection string for `redis`, `redis-cluster` and `memcache`. For `twoqueue` sets configuration for the queue. - Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` - Redis-cluster `redis+cluster://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` - Memcache: `127.0.0.1:9090;127.0.0.1:9091` @@ -781,7 +779,7 @@ and - `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID. - `GC_INTERVAL_TIME`: **86400**: GC interval in seconds. - `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day) -- `DOMAIN`: **\**: Sets the cookie Domain +- `DOMAIN`: **_empty_**: Sets the cookie Domain - `SAME_SITE`: **lax** \[strict, lax, none\]: Set the SameSite setting for the cookie. ## Picture (`picture`) @@ -836,12 +834,12 @@ Default templates for project boards: ## Log (`log`) -- `ROOT_PATH`: **\**: Root path for log files. +- `ROOT_PATH`: **_empty_**: Root path for log files. - `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.writer-mode-name\]`. - `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] - `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces (rarely useful, do not set it). \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] - `ENABLE_SSH_LOG`: **false**: save ssh log to log file -- `logger.access.MODE`: **\**: The "access" logger +- `logger.access.MODE`: **_empty_**: The "access" logger - `logger.router.MODE`: **,**: The "router" logger, a single comma means it will use the default MODE above - `logger.xorm.MODE`: **,**: The "xorm" logger @@ -855,7 +853,7 @@ Default templates for project boards: - `ResponseWriter`: the responseWriter from the request. - `RequestID`: the value matching REQUEST_ID_HEADERS(default: `-`, if not matched). - You must be very careful to ensure that this template does not throw errors or panics as this template runs outside the panic/recovery script. -- `REQUEST_ID_HEADERS`: **\**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. +- `REQUEST_ID_HEADERS`: **_empty_**: You can configure multiple values that are splited by comma here. It will match in the order of configuration, and the first match will be finally printed in the access log. - e.g. - In the Request Header: X-Request-ID: **test-id-123** - Configuration in app.ini: REQUEST_ID_HEADERS = X-Request-ID @@ -923,7 +921,7 @@ Default templates for project boards: - `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. -- `ARGS`: **\**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck +- `ARGS`: **_empty_**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) @@ -965,7 +963,7 @@ Default templates for project boards: - `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `TIMEOUT`: **60s**: Time duration syntax for garbage collection execution timeout. - `NOTICE_ON_SUCCESS`: **false**: Set to true to switch on success notices. -- `ARGS`: **\**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS +- `ARGS`: **_empty_**: Arguments for command `git gc`, e.g. `--aggressive --auto`. The default value is same with [git] -> GC_ARGS #### Cron - Update the '.ssh/authorized_keys' file with Gitea SSH keys (`cron.resync_all_sshkeys`) @@ -1047,7 +1045,7 @@ Default templates for project boards: - `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view. - `COMMITS_RANGE_SIZE`: **50**: Set the default commits range size - `BRANCHES_RANGE_SIZE`: **20**: Set the default branches range size -- `GC_ARGS`: **\**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/ +- `GC_ARGS`: **_empty_**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/ - `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use Git wire protocol version 2 when Git version >= 2.18, default is true, set to false when you always want Git wire protocol version 1. To enable this for Git over SSH when using a OpenSSH server, add `AcceptEnv GIT_PROTOCOL` to your sshd_config file. - `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled) @@ -1080,7 +1078,7 @@ This section only does "set" config, a removed config key from this section won' - `ENABLED`: **false**: Enables /metrics endpoint for prometheus. - `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics with format `gitea_issues_by_label{label="bug"} 2`. - `ENABLED_ISSUE_BY_REPOSITORY`: **false**: Enable issue by repository metrics with format `gitea_issues_by_repository{repository="org/repo"} 5`. -- `TOKEN`: **\**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`. +- `TOKEN`: **_empty_**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`. ## API (`api`) @@ -1097,8 +1095,8 @@ This section only does "set" config, a removed config key from this section won' - `REFRESH_TOKEN_EXPIRATION_TIME`: **730**: Lifetime of an OAuth2 refresh token in hours - `INVALIDATE_REFRESH_TOKENS`: **false**: Check if refresh token has already been used - `JWT_SIGNING_ALGORITHM`: **RS256**: Algorithm used to sign OAuth2 tokens. Valid values: \[`HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`\] -- `JWT_SECRET`: **\**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`. -- `JWT_SECRET_URI`: **\**: Instead of defining JWT_SECRET in the configuration, this configuration option can be used to give Gitea a path to a file that contains the secret (example value: `file:/etc/gitea/oauth2_jwt_secret`) +- `JWT_SECRET`: **_empty_**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`. +- `JWT_SECRET_URI`: **_empty_**: Instead of defining JWT_SECRET in the configuration, this configuration option can be used to give Gitea a path to a file that contains the secret (example value: `file:/etc/gitea/oauth2_jwt_secret`) - `JWT_SIGNING_PRIVATE_KEY_FILE`: **jwt/private.pem**: Private key file path used to sign OAuth2 tokens. The path is relative to `APP_DATA_PATH`. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `RS256`, `RS384`, `RS512`, `ES256`, `ES384` or `ES512`. The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you. - `MAX_TOKEN_LENGTH`: **32767**: Maximum length of token/cookie to accept from OAuth2 provider @@ -1125,7 +1123,7 @@ IS_INPUT_FILE = false - ENABLED: **false** Enable markup support; set to **true** to enable this renderer. - NEED\_POSTPROCESS: **true** set to **true** to replace links / sha1 and etc. -- FILE\_EXTENSIONS: **\** List of file extensions that should be rendered by an external +- FILE\_EXTENSIONS: **_empty_** List of file extensions that should be rendered by an external command. Multiple extensions needs a comma as splitter. - RENDER\_COMMAND: External command to render all matching extensions. - IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`. @@ -1184,8 +1182,8 @@ Task queue configuration has been moved to `queue.task`. However, the below conf - `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations. - `RETRY_BACKOFF`: **3**: Backoff time per http/https request retry (seconds) -- `ALLOWED_DOMAINS`: **\**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. Wildcard is supported: `github.com, *.github.com`. -- `BLOCKED_DOMAINS`: **\**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains. Wildcard is supported. +- `ALLOWED_DOMAINS`: **_empty_**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. Wildcard is supported: `github.com, *.github.com`. +- `BLOCKED_DOMAINS`: **_empty_**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option has a higher priority to deny domains. Wildcard is supported. - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291. If a domain is allowed by `ALLOWED_DOMAINS`, this option will be ignored. - `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify @@ -1364,8 +1362,8 @@ is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`. ## Proxy (`proxy`) - `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy -- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy -- `PROXY_HOSTS`: **\**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. +- `PROXY_URL`: **_empty_**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy +- `PROXY_HOSTS`: **_empty_**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. i.e. diff --git a/docs/content/doc/administration/config-cheat-sheet.zh-cn.md b/docs/content/administration/config-cheat-sheet.zh-cn.md similarity index 96% rename from docs/content/doc/administration/config-cheat-sheet.zh-cn.md rename to docs/content/administration/config-cheat-sheet.zh-cn.md index d0af323dc049..a2fa25df9296 100644 --- a/docs/content/doc/administration/config-cheat-sheet.zh-cn.md +++ b/docs/content/administration/config-cheat-sheet.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-26T16:00:00+02:00" title: "配置说明" slug: "config-cheat-sheet" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "配置说明" - weight: 30 + sidebar_position: 30 identifier: "config-cheat-sheet" --- @@ -26,8 +26,6 @@ menu: 此文档的内容可能过于陈旧或者错误,请参考英文文档。 -{{< toc >}} - ## Overall (`DEFAULT`) - `APP_NAME`: 应用名称,改成你希望的名字。 @@ -46,7 +44,7 @@ menu: ### Repository - Release (`repository.release`) -- `ALLOWED_TYPES`: **\**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。 +- `ALLOWED_TYPES`: **_empty_**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。 - `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。 ## UI (`ui`) @@ -187,7 +185,7 @@ menu: - `ENABLED`: **true**: 是否启用。 - `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。 - `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。 -- `HOST`: **\**: 针对redis和memcache有效,主机地址和端口。 +- `HOST`: **_empty_**: 针对redis和memcache有效,主机地址和端口。 - Redis: `network=tcp,addr=127.0.0.1:6379,password=macaron,db=0,pool_size=100,idle_timeout=180` - Memache: `127.0.0.1:9090;127.0.0.1:9091` - `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。 @@ -392,8 +390,8 @@ ALLOW_DATA_URI_IMAGES = true - `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。 - `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。 -- `ALLOWED_DOMAINS`: **\**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。 -- `BLOCKED_DOMAINS`: **\**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。 +- `ALLOWED_DOMAINS`: **_empty_**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。 +- `BLOCKED_DOMAINS`: **_empty_**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。 - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918 - `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证 @@ -515,8 +513,8 @@ Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配 ## Proxy (`proxy`) - `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用 -- `PROXY_URL`: **\**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy -- `PROXY_HOSTS`: **\**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站 +- `PROXY_URL`: **_empty_**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy +- `PROXY_HOSTS`: **_empty_**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站 i.e. diff --git a/docs/content/doc/administration/customizing-gitea.en-us.md b/docs/content/administration/customizing-gitea.en-us.md similarity index 97% rename from docs/content/doc/administration/customizing-gitea.en-us.md rename to docs/content/administration/customizing-gitea.en-us.md index ccc5c1bc89af..38bf00bfd60c 100644 --- a/docs/content/doc/administration/customizing-gitea.en-us.md +++ b/docs/content/administration/customizing-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2017-04-15T14:56:00+02:00" title: "Customizing Gitea" slug: "customizing-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -12,7 +12,7 @@ menu: parent: "administration" name: "Customizing Gitea" identifier: "customizing-gitea" - weight: 100 + sidebar_position: 100 --- # Customizing Gitea @@ -48,10 +48,6 @@ is set under the "Configuration" tab on the site administration page. **Note:** Gitea must perform a full restart to see configuration changes. -**Table of Contents** - -{{< toc >}} - ## Serving custom public files To make Gitea serve custom public files (like pages and images), use the folder @@ -91,7 +87,7 @@ directory at the top of this document). Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/), which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory. -To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/administration/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using). +To obtain any embedded file (including templates), the [`gitea embedded` tool](administration/cmd-embedded.md) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using). Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and shouldn't be touched without fully understanding these components. @@ -320,7 +316,7 @@ The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/lab `#hex-color label name ; label description` -For more information, see the [labels documentation]({{< relref "doc/usage/labels.en-us.md" >}}). +For more information, see the [labels documentation](usage/labels.md). ### Licenses diff --git a/docs/content/doc/administration/customizing-gitea.zh-cn.md b/docs/content/administration/customizing-gitea.zh-cn.md similarity index 98% rename from docs/content/doc/administration/customizing-gitea.zh-cn.md rename to docs/content/administration/customizing-gitea.zh-cn.md index 64115ba178b5..77b2fd83127a 100644 --- a/docs/content/doc/administration/customizing-gitea.zh-cn.md +++ b/docs/content/administration/customizing-gitea.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-04-15T14:56:00+02:00" title: "自定义 Gitea 配置" slug: "customizing-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "自定义 Gitea 配置" - weight: 100 + sidebar_position: 100 identifier: "customizing-gitea" --- diff --git a/docs/content/doc/administration/email-setup.en-us.md b/docs/content/administration/email-setup.en-us.md similarity index 94% rename from docs/content/doc/administration/email-setup.en-us.md rename to docs/content/administration/email-setup.en-us.md index 92ec95cce424..2f92e20410de 100644 --- a/docs/content/doc/administration/email-setup.en-us.md +++ b/docs/content/administration/email-setup.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-15T10:10:00+05:00" title: "Email setup" slug: "email-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Email setup" - weight: 12 + sidebar_position: 12 identifier: "email-setup" --- # Email setup -**Table of Contents** - -{{< toc >}} - Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server. ## Using Sendmail @@ -60,7 +56,7 @@ Restart Gitea for the configuration changes to take effect. To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration. -For the full list of options check the [Config Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}) +For the full list of options check the [Config Cheat Sheet](administration/config-cheat-sheet.md) Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through: diff --git a/docs/content/doc/administration/email-setup.zh-cn.md b/docs/content/administration/email-setup.zh-cn.md similarity index 98% rename from docs/content/doc/administration/email-setup.zh-cn.md rename to docs/content/administration/email-setup.zh-cn.md index 0bbeebf2f6eb..e526a9d4337c 100644 --- a/docs/content/doc/administration/email-setup.zh-cn.md +++ b/docs/content/administration/email-setup.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Email 设置" slug: "email-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Email 设置" - weight: 12 + sidebar_position: 12 identifier: "email-setup" --- # Email 设置 -**目录** - -{{< toc >}} - Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。 ## 使用 Sendmail diff --git a/docs/content/doc/administration/environment-variables.en-us.md b/docs/content/administration/environment-variables.en-us.md similarity index 96% rename from docs/content/doc/administration/environment-variables.en-us.md rename to docs/content/administration/environment-variables.en-us.md index 261d1bea5f30..f910cf060e88 100644 --- a/docs/content/doc/administration/environment-variables.en-us.md +++ b/docs/content/administration/environment-variables.en-us.md @@ -2,7 +2,7 @@ date: "2017-04-08T11:34:00+02:00" title: "Environment variables" slug: "environment-variables" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Environment variables" - weight: 10 + sidebar_position: 10 identifier: "environment-variables" --- # Environment variables -**Table of Contents** - -{{< toc >}} - This is an inventory of Gitea environment variables. They change Gitea behaviour. Initialize them before Gitea command to be effective, for example: diff --git a/docs/content/doc/administration/environment-variables.zh-cn.md b/docs/content/administration/environment-variables.zh-cn.md similarity index 97% rename from docs/content/doc/administration/environment-variables.zh-cn.md rename to docs/content/administration/environment-variables.zh-cn.md index cbc9787c35a2..25e120becdc5 100644 --- a/docs/content/doc/administration/environment-variables.zh-cn.md +++ b/docs/content/administration/environment-variables.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-04-08T11:34:00+02:00" title: "环境变量清单" slug: "environment-variables" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "环境变量清单" - weight: 10 + sidebar_position: 10 identifier: "environment-variables" --- diff --git a/docs/content/doc/administration/external-renderers.en-us.md b/docs/content/administration/external-renderers.en-us.md similarity index 98% rename from docs/content/doc/administration/external-renderers.en-us.md rename to docs/content/administration/external-renderers.en-us.md index 2de72c8343e5..f903a7e76053 100644 --- a/docs/content/doc/administration/external-renderers.en-us.md +++ b/docs/content/administration/external-renderers.en-us.md @@ -2,7 +2,7 @@ date: "2018-11-23:00:00+02:00" title: "External renderers" slug: "external-renderers" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "External renderers" - weight: 60 + sidebar_position: 60 identifier: "external-renderers" --- # Custom files rendering configuration -**Table of Contents** - -{{< toc >}} - Gitea supports custom file renderings (i.e., Jupyter notebooks, asciidoc, etc.) through external binaries, it is just a matter of: @@ -36,7 +32,7 @@ In order to get file rendering through external binaries, their associated packa If you're using a Docker image, your `Dockerfile` should contain something along this lines: ```docker -FROM gitea/gitea:{{< version >}} +FROM gitea/gitea:@version@ [...] COPY custom/app.ini /data/gitea/conf/app.ini diff --git a/docs/content/doc/administration/external-renderers.zh-cn.md b/docs/content/administration/external-renderers.zh-cn.md similarity index 96% rename from docs/content/doc/administration/external-renderers.zh-cn.md rename to docs/content/administration/external-renderers.zh-cn.md index 26d3fb45d39f..0b53b452776a 100644 --- a/docs/content/doc/administration/external-renderers.zh-cn.md +++ b/docs/content/administration/external-renderers.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "外部渲染器" slug: "external-renderers" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,23 +11,19 @@ menu: sidebar: parent: "administration" name: "外部渲染器" - weight: 60 + sidebar_position: 60 identifier: "external-renderers" --- # 自定义文件渲染配置 -**目录** - -{{< toc >}} - Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter notebooks、asciidoc 等),只需要进行以下步骤: - 安装外部二进制文件 - 在您的 `app.ini` 文件中添加一些配置 - 重新启动 Gitea 实例 -此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}) 页面上的一些示例。 +此功能支持整个文件的渲染。如果您想要在 Markdown 中渲染代码块,您需要使用 JavaScript 进行一些操作。请参阅 [自定义 Gitea 配置](administration/customizing-gitea.md) 页面上的一些示例。 ## 安装外部二进制文件 @@ -35,7 +31,7 @@ Gitea 通过外部二进制文件支持自定义文件渲染(例如 Jupyter no 如果您正在使用 Docker 镜像,则您的 `Dockerfile` 应该包含以下内容: ```docker -FROM gitea/gitea:{{< version >}} +FROM gitea/gitea:@version@ [...] COPY custom/app.ini /data/gitea/conf/app.ini diff --git a/docs/content/doc/administration/fail2ban-setup.en-us.md b/docs/content/administration/fail2ban-setup.en-us.md similarity index 98% rename from docs/content/doc/administration/fail2ban-setup.en-us.md rename to docs/content/administration/fail2ban-setup.en-us.md index 1638e0dd1f9a..5c0101ef976a 100644 --- a/docs/content/doc/administration/fail2ban-setup.en-us.md +++ b/docs/content/administration/fail2ban-setup.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-11T11:00:00+02:00" title: "Fail2ban Setup " slug: "fail2ban-setup" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Fail2ban setup" - weight: 16 + sidebar_position: 16 identifier: "fail2ban-setup" --- diff --git a/docs/content/doc/administration/fail2ban-setup.zh-cn.md b/docs/content/administration/fail2ban-setup.zh-cn.md similarity index 98% rename from docs/content/doc/administration/fail2ban-setup.zh-cn.md rename to docs/content/administration/fail2ban-setup.zh-cn.md index f4f3cff4ca70..2ca0b3a79005 100644 --- a/docs/content/doc/administration/fail2ban-setup.zh-cn.md +++ b/docs/content/administration/fail2ban-setup.zh-cn.md @@ -2,7 +2,7 @@ date: "2022-08-01T00:00:00+00:00" title: "设置 Fail2ban" slug: "fail2ban-setup" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "设置 Fail2ban" - weight: 16 + sidebar_position: 16 identifier: "fail2ban-setup" --- diff --git a/docs/content/doc/administration/git-lfs-support.en-us.md b/docs/content/administration/git-lfs-support.en-us.md similarity index 93% rename from docs/content/doc/administration/git-lfs-support.en-us.md rename to docs/content/administration/git-lfs-support.en-us.md index 884b19896a51..d2c55a29fb5f 100644 --- a/docs/content/doc/administration/git-lfs-support.en-us.md +++ b/docs/content/administration/git-lfs-support.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-06T08:00:00+05:00" title: "Git LFS setup" slug: "git-lfs-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Git LFS setup" - weight: 12 + sidebar_position: 12 identifier: "git-lfs-setup" --- diff --git a/docs/content/doc/administration/git-lfs-support.zh-cn.md b/docs/content/administration/git-lfs-support.zh-cn.md similarity index 93% rename from docs/content/doc/administration/git-lfs-support.zh-cn.md rename to docs/content/administration/git-lfs-support.zh-cn.md index 247e9a4777a6..268f40f3f04d 100644 --- a/docs/content/doc/administration/git-lfs-support.zh-cn.md +++ b/docs/content/administration/git-lfs-support.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Git LFS 设置" slug: "git-lfs-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Git LFS 设置" - weight: 12 + sidebar_position: 12 identifier: "git-lfs-setup" --- diff --git a/docs/content/doc/administration/https-support.en-us.md b/docs/content/administration/https-support.en-us.md similarity index 96% rename from docs/content/doc/administration/https-support.en-us.md rename to docs/content/administration/https-support.en-us.md index d59ae2e8ee26..6441663c851a 100644 --- a/docs/content/doc/administration/https-support.en-us.md +++ b/docs/content/administration/https-support.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-02T11:00:00+02:00" title: "HTTPS setup" slug: "https-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,22 +11,18 @@ menu: sidebar: parent: "administration" name: "HTTPS setup" - weight: 12 + sidebar_position: 12 identifier: "https-setup" --- # HTTPS setup to encrypt connections to Gitea -**Table of Contents** - -{{< toc >}} - ## Using the built-in server Before you enable HTTPS, make sure that you have valid SSL/TLS certificates. You could use self-generated certificates for evaluation and testing. Please run `gitea cert --host [HOST]` to generate a self signed certificate. -If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}). +If you are using Apache or nginx on the server, it's recommended to check the [reverse proxy guide](administration/reverse-proxies.md). To use Gitea's built-in HTTPS support, you must change your `app.ini` file: diff --git a/docs/content/doc/administration/https-support.zh-cn.md b/docs/content/administration/https-support.zh-cn.md similarity index 96% rename from docs/content/doc/administration/https-support.zh-cn.md rename to docs/content/administration/https-support.zh-cn.md index c67776b9e639..124242f7441e 100644 --- a/docs/content/doc/administration/https-support.zh-cn.md +++ b/docs/content/administration/https-support.zh-cn.md @@ -2,29 +2,25 @@ date: "2023-04-09T11:00:00+02:00" title: "HTTPS配置" slug: "https-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "administration" name: "HTTPS setup" - weight: 12 + sidebar_position: 12 identifier: "https-setup" --- # HTTPS setup to encrypt connections to Gitea -**Table of Contents** - -{{< toc >}} - ## 使用内置服务器 在启用HTTPS之前,确保您拥有有效的SSL/TLS证书。 建议在测试和评估情况下使用自签名证书,请运行 `gitea cert --host [HOST]` 以生成自签名证书 -如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})。 +如果您在服务器上使用阿帕奇(Apache)或Nginx,建议参考 [反向代理指南](administration/reverse-proxies.md)。 要使用Gitea内置HTTPS支持,您必须编辑`app.ini`文件。 diff --git a/docs/content/doc/administration/logging-config.en-us.md b/docs/content/administration/logging-config.en-us.md similarity index 97% rename from docs/content/doc/administration/logging-config.en-us.md rename to docs/content/administration/logging-config.en-us.md index 857eb19b563f..d9739e1881ff 100644 --- a/docs/content/doc/administration/logging-config.en-us.md +++ b/docs/content/administration/logging-config.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-02T17:06:00+01:00" title: "Logging Configuration" slug: "logging-config" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Logging Configuration" - weight: 40 + sidebar_position: 40 identifier: "logging-config" --- @@ -25,13 +25,9 @@ The logging configuration of Gitea mainly consists of 3 types of components: There is a fully functional log output by default, so it is not necessary to define one. -**Table of Contents** - -{{< toc >}} - ## Collecting Logs for Help -To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}). +To collect logs for help and issue report, see [Support Options](help/support.md). ## The `[log]` section @@ -47,7 +43,7 @@ In the top level `[log]` section the following configurations can be placed: And it can contain the following sub-loggers: - `logger.router.MODE`: (Default: **,**): List of log outputs to use for the Router logger. -- `logger.access.MODE`: (Default: **\**) List of log outputs to use for the Access logger. By default, the access logger is disabled. +- `logger.access.MODE`: (Default: **_empty_**) List of log outputs to use for the Access logger. By default, the access logger is disabled. - `logger.xorm.MODE`: (Default: **,**) List of log outputs to use for the XORM logger. Setting a comma (`,`) to sub-logger's mode means making it use the default global `MODE`. diff --git a/docs/content/doc/administration/logging-config.zh-cn.md b/docs/content/administration/logging-config.zh-cn.md similarity index 97% rename from docs/content/doc/administration/logging-config.zh-cn.md rename to docs/content/administration/logging-config.zh-cn.md index 1edf1443cd9f..273a413592a0 100644 --- a/docs/content/doc/administration/logging-config.zh-cn.md +++ b/docs/content/administration/logging-config.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "日志配置" slug: "logging-config" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "日志配置" - weight: 40 + sidebar_position: 40 identifier: "logging-config" --- @@ -25,13 +25,9 @@ Gitea 的日志配置主要由以下三种类型的组件组成: 默认情况下,已经有一个完全功能的日志输出,因此不需要重新定义。 -**目录** - -{{< toc >}} - ## 收集日志以获取帮助 -要收集日志以获取帮助和报告问题,请参阅 [需要帮助]({{< relref "doc/help/support.zh-cn.md" >}})。 +要收集日志以获取帮助和报告问题,请参阅 [需要帮助](help/support.md)。 ## `[log]` 部分 @@ -47,7 +43,7 @@ Gitea 的日志配置主要由以下三种类型的组件组成: 它还可以包含以下子日志记录器: - `logger.router.MODE`:(默认值:**,**):用于路由器日志记录器的日志输出列表。 -- `logger.access.MODE`:(默认值:**\**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。 +- `logger.access.MODE`:(默认值:**_empty_**):用于访问日志记录器的日志输出列表。默认情况下,访问日志记录器被禁用。 - `logger.xorm.MODE`:(默认值:**,**):用于 XORM 日志记录器的日志输出列表。 将子日志记录器的模式设置为逗号(`,`)表示使用默认的全局 `MODE`。 diff --git a/docs/content/doc/administration/mail-templates.en-us.md b/docs/content/administration/mail-templates.en-us.md similarity index 99% rename from docs/content/doc/administration/mail-templates.en-us.md rename to docs/content/administration/mail-templates.en-us.md index 0740ccaa5fa3..d66108f26a81 100644 --- a/docs/content/doc/administration/mail-templates.en-us.md +++ b/docs/content/administration/mail-templates.en-us.md @@ -2,7 +2,7 @@ date: "2019-10-23T17:00:00-03:00" title: "Mail templates" slug: "mail-templates" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Mail templates" - weight: 45 + sidebar_position: 45 identifier: "mail-templates" --- # Mail templates -**Table of Contents** - -{{< toc >}} - To craft the e-mail subject and contents for certain operations, Gitea can be customized by using templates. The templates for these functions are located under the [`custom` directory](https://docs.gitea.io/en-us/customizing-gitea/). Gitea has an internal template that serves as default in case there's no custom alternative. diff --git a/docs/content/doc/administration/mail-templates.zh-cn.md b/docs/content/administration/mail-templates.zh-cn.md similarity index 99% rename from docs/content/doc/administration/mail-templates.zh-cn.md rename to docs/content/administration/mail-templates.zh-cn.md index 3b03090099dd..49f8b97789e4 100644 --- a/docs/content/doc/administration/mail-templates.zh-cn.md +++ b/docs/content/administration/mail-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "邮件模板" slug: "mail-templates" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "邮件模板" - weight: 45 + sidebar_position: 45 identifier: "mail-templates" --- # 邮件模板 -**目录** - -{{< toc >}} - 为了定制特定操作的电子邮件主题和内容,可以使用模板来自定义 Gitea。这些功能的模板位于 [`custom` 目录](https://docs.gitea.io/en-us/customizing-gitea/) 下。 如果没有自定义的替代方案,Gitea 将使用内部模板作为默认模板。 diff --git a/docs/content/doc/administration/repo-indexer.en-us.md b/docs/content/administration/repo-indexer.en-us.md similarity index 97% rename from docs/content/doc/administration/repo-indexer.en-us.md rename to docs/content/administration/repo-indexer.en-us.md index a1980bc5fed0..71eb4ffbc418 100644 --- a/docs/content/doc/administration/repo-indexer.en-us.md +++ b/docs/content/administration/repo-indexer.en-us.md @@ -2,7 +2,7 @@ date: "2019-09-06T01:35:00-03:00" title: "Repository indexer" slug: "repo-indexer" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Repository indexer" - weight: 45 + sidebar_position: 45 identifier: "repo-indexer" --- # Repository indexer -**Table of Contents** - -{{< toc >}} - ## Setting up the repository indexer Gitea can search through the files of the repositories by enabling this function in your [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/): diff --git a/docs/content/doc/administration/repo-indexer.zh-cn.md b/docs/content/administration/repo-indexer.zh-cn.md similarity index 97% rename from docs/content/doc/administration/repo-indexer.zh-cn.md rename to docs/content/administration/repo-indexer.zh-cn.md index 621710e36a81..157bfd97f446 100644 --- a/docs/content/doc/administration/repo-indexer.zh-cn.md +++ b/docs/content/administration/repo-indexer.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "仓库索引器" slug: "repo-indexer" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "仓库索引器" - weight: 45 + sidebar_position: 45 identifier: "repo-indexer" --- # 仓库索引器 -**目录** - -{{< toc >}} - ## 设置仓库索引器 通过在您的 [`app.ini`](https://docs.gitea.io/en-us/config-cheat-sheet/) 中启用此功能,Gitea 可以通过仓库的文件进行搜索: diff --git a/docs/content/doc/administration/reverse-proxies.en-us.md b/docs/content/administration/reverse-proxies.en-us.md similarity index 99% rename from docs/content/doc/administration/reverse-proxies.en-us.md rename to docs/content/administration/reverse-proxies.en-us.md index 7272eb5aa46b..ca06636469fb 100644 --- a/docs/content/doc/administration/reverse-proxies.en-us.md +++ b/docs/content/administration/reverse-proxies.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-22T11:00:00+00:00" title: "Reverse Proxies" slug: "reverse-proxies" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "Reverse Proxies" - weight: 16 + sidebar_position: 16 identifier: "reverse-proxies" --- # Reverse Proxies -**Table of Contents** - -{{< toc >}} - ## Nginx If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`: diff --git a/docs/content/doc/administration/reverse-proxies.zh-cn.md b/docs/content/administration/reverse-proxies.zh-cn.md similarity index 98% rename from docs/content/doc/administration/reverse-proxies.zh-cn.md rename to docs/content/administration/reverse-proxies.zh-cn.md index 63c7c24985dc..4c7de782c757 100644 --- a/docs/content/doc/administration/reverse-proxies.zh-cn.md +++ b/docs/content/administration/reverse-proxies.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-05-22T11:00:00+00:00" title: "反向代理" slug: "reverse-proxies" -weight: 16 +sidebar_position: 16 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "反向代理" - weight: 16 + sidebar_position: 16 identifier: "reverse-proxies" --- # 反向代理 -**目录** - -{{< toc >}} - ## 使用 Nginx 作为反向代理服务 如果您想使用 Nginx 作为 Gitea 的反向代理服务,您可以参照以下 `nginx.conf` 配置中 `server` 的 `http` 部分: diff --git a/docs/content/doc/administration/search-engines-indexation.en-us.md b/docs/content/administration/search-engines-indexation.en-us.md similarity index 91% rename from docs/content/doc/administration/search-engines-indexation.en-us.md rename to docs/content/administration/search-engines-indexation.en-us.md index 27427531ce7d..7898e8146eed 100644 --- a/docs/content/doc/administration/search-engines-indexation.en-us.md +++ b/docs/content/administration/search-engines-indexation.en-us.md @@ -2,7 +2,7 @@ date: "2019-12-31T13:55:00+05:00" title: "Search Engines Indexation" slug: "search-engines-indexation" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "Search Engines Indexation" - weight: 60 + sidebar_position: 60 identifier: "search-engines-indexation" --- @@ -23,7 +23,7 @@ If you don't want your repository to be visible for search engines read further. ## Block search engines indexation using robots.txt To make Gitea serve a custom `robots.txt` (default: empty 404) for top level installations, -create a file called `robots.txt` in the [`custom` folder or `CustomPath`]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) +create a file called `robots.txt` in the [`custom` folder or `CustomPath`](administration/customizing-gitea.md) Examples on how to configure the `robots.txt` can be found at [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt). diff --git a/docs/content/doc/administration/search-engines-indexation.zh-cn.md b/docs/content/administration/search-engines-indexation.zh-cn.md similarity index 87% rename from docs/content/doc/administration/search-engines-indexation.zh-cn.md rename to docs/content/administration/search-engines-indexation.zh-cn.md index 4f9d18af7021..77ad5eca2cb1 100644 --- a/docs/content/doc/administration/search-engines-indexation.zh-cn.md +++ b/docs/content/administration/search-engines-indexation.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "搜索引擎索引" slug: "search-engines-indexation" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "administration" name: "搜索引擎索引" - weight: 60 + sidebar_position: 60 identifier: "search-engines-indexation" --- @@ -22,7 +22,7 @@ menu: ## 使用 robots.txt 阻止搜索引擎索引 -为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})中创建一个名为 `robots.txt` 的文件。 +为了使 Gitea 为顶级安装提供自定义的`robots.txt`(默认为空的 404),请在[`custom`文件夹或`CustomPath`](administration/customizing-gitea.md)中创建一个名为 `robots.txt` 的文件。 有关如何配置 `robots.txt` 的示例,请参考 [https://moz.com/learn/seo/robotstxt](https://moz.com/learn/seo/robotstxt)。 diff --git a/docs/content/doc/administration/signing.en-us.md b/docs/content/administration/signing.en-us.md similarity index 98% rename from docs/content/doc/administration/signing.en-us.md rename to docs/content/administration/signing.en-us.md index de539e34b263..837af14bb1f9 100644 --- a/docs/content/doc/administration/signing.en-us.md +++ b/docs/content/administration/signing.en-us.md @@ -2,7 +2,7 @@ date: "2019-08-17T10:20:00+01:00" title: "GPG Commit Signatures" slug: "signing" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "GPG Commit Signatures" - weight: 50 + sidebar_position: 50 identifier: "signing" --- # GPG Commit Signatures -**Table of Contents** - -{{< toc >}} - Gitea will verify GPG commit signatures in the provided tree by checking if the commits are signed by a key within the Gitea database, or if the commit matches the default key for Git. diff --git a/docs/content/doc/administration/signing.zh-cn.md b/docs/content/administration/signing.zh-cn.md similarity index 99% rename from docs/content/doc/administration/signing.zh-cn.md rename to docs/content/administration/signing.zh-cn.md index 41c3e6781123..5910b1bf7836 100644 --- a/docs/content/doc/administration/signing.zh-cn.md +++ b/docs/content/administration/signing.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "GPG 提交签名" slug: "signing" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "administration" name: "GPG 提交签名" - weight: 50 + sidebar_position: 50 identifier: "signing" --- # GPG 提交签名 -**目录** - -{{< toc >}} - Gitea 将通过检查提交是否由 Gitea 数据库中的密钥签名,或者提交是否与 Git 的默认密钥匹配,来验证提供的树中的 GPG 提交签名。 密钥不会被检查以确定它们是否已过期或撤销。密钥也不会与密钥服务器进行检查。 diff --git a/docs/content/doc/contributing.en-us.md b/docs/content/contributing.en-us.md similarity index 79% rename from docs/content/doc/contributing.en-us.md rename to docs/content/contributing.en-us.md index 6cc96d91b29d..8cd2e2bd89f2 100644 --- a/docs/content/doc/contributing.en-us.md +++ b/docs/content/contributing.en-us.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "Contributing" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Contributing" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/docs/content/doc/contributing.fr-fr.md b/docs/content/contributing.fr-fr.md similarity index 79% rename from docs/content/doc/contributing.fr-fr.md rename to docs/content/contributing.fr-fr.md index 317566832933..9dc4aa6ca993 100644 --- a/docs/content/doc/contributing.fr-fr.md +++ b/docs/content/contributing.fr-fr.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "Übersetzung" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Übersetzung" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/docs/content/doc/contributing.zh-tw.md b/docs/content/contributing.zh-tw.md similarity index 78% rename from docs/content/doc/contributing.zh-tw.md rename to docs/content/contributing.zh-tw.md index 73a3f94a7c94..0c715eefe465 100644 --- a/docs/content/doc/contributing.zh-tw.md +++ b/docs/content/contributing.zh-tw.md @@ -2,12 +2,12 @@ date: "2021-01-22T00:00:00+02:00" title: "貢獻" slug: "contributing" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "貢獻" - weight: 50 + sidebar_position: 50 identifier: "contributing" --- diff --git a/docs/content/doc/contributing/_index.de-de.md b/docs/content/contributing/_index.de-de.md similarity index 100% rename from docs/content/doc/contributing/_index.de-de.md rename to docs/content/contributing/_index.de-de.md diff --git a/docs/content/doc/contributing/_index.en-us.md b/docs/content/contributing/_index.en-us.md similarity index 100% rename from docs/content/doc/contributing/_index.en-us.md rename to docs/content/contributing/_index.en-us.md diff --git a/docs/content/doc/contributing/_index.zh-cn.md b/docs/content/contributing/_index.zh-cn.md similarity index 100% rename from docs/content/doc/contributing/_index.zh-cn.md rename to docs/content/contributing/_index.zh-cn.md diff --git a/docs/content/doc/contributing/_index.zh-tw.md b/docs/content/contributing/_index.zh-tw.md similarity index 100% rename from docs/content/doc/contributing/_index.zh-tw.md rename to docs/content/contributing/_index.zh-tw.md diff --git a/docs/content/doc/contributing/guidelines-backend.en-us.md b/docs/content/contributing/guidelines-backend.en-us.md similarity index 99% rename from docs/content/doc/contributing/guidelines-backend.en-us.md rename to docs/content/contributing/guidelines-backend.en-us.md index 283fbdf3ae77..084b3886e84e 100644 --- a/docs/content/doc/contributing/guidelines-backend.en-us.md +++ b/docs/content/contributing/guidelines-backend.en-us.md @@ -2,7 +2,7 @@ date: "2021-11-01T23:41:00+08:00" title: "Guidelines for Backend Development" slug: "guidelines-backend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Backend" - weight: 20 + sidebar_position: 20 identifier: "guidelines-backend" --- # Guidelines for Backend Development -**Table of Contents** - -{{< toc >}} - ## Background Gitea uses Golang as the backend programming language. It uses many third-party packages and also write some itself. diff --git a/docs/content/doc/contributing/guidelines-backend.zh-cn.md b/docs/content/contributing/guidelines-backend.zh-cn.md similarity index 99% rename from docs/content/doc/contributing/guidelines-backend.zh-cn.md rename to docs/content/contributing/guidelines-backend.zh-cn.md index c94d4305e19a..33129dc086ef 100644 --- a/docs/content/doc/contributing/guidelines-backend.zh-cn.md +++ b/docs/content/contributing/guidelines-backend.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T23:41:00+08:00" title: "后端开发指南" slug: "guidelines-backend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "后端开发指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-backend" --- # 后端开发指南 -**目录** - -{{< toc >}} - ## 背景 Gitea使用Golang作为后端编程语言。它使用了许多第三方包,并且自己也编写了一些包。 diff --git a/docs/content/doc/contributing/guidelines-frontend.en-us.md b/docs/content/contributing/guidelines-frontend.en-us.md similarity index 98% rename from docs/content/doc/contributing/guidelines-frontend.en-us.md rename to docs/content/contributing/guidelines-frontend.en-us.md index fcbd81b26b2d..3ec18518ce02 100644 --- a/docs/content/doc/contributing/guidelines-frontend.en-us.md +++ b/docs/content/contributing/guidelines-frontend.en-us.md @@ -2,7 +2,7 @@ date: "2021-10-13T16:00:00+02:00" title: "Guidelines for Frontend Development" slug: "guidelines-frontend" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Frontend" - weight: 30 + sidebar_position: 30 identifier: "guidelines-frontend" --- # Guidelines for Frontend Development -**Table of Contents** - -{{< toc >}} - ## Background Gitea uses [Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html) (based on [jQuery](https://api.jquery.com)) and [Vue3](https://vuejs.org/) for its frontend. diff --git a/docs/content/doc/contributing/guidelines-frontend.zh-cn.md b/docs/content/contributing/guidelines-frontend.zh-cn.md similarity index 99% rename from docs/content/doc/contributing/guidelines-frontend.zh-cn.md rename to docs/content/contributing/guidelines-frontend.zh-cn.md index 3a58db0c705a..66a4d4b4d6b6 100644 --- a/docs/content/doc/contributing/guidelines-frontend.zh-cn.md +++ b/docs/content/contributing/guidelines-frontend.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T16:00:00+02:00" title: "前端开发指南" slug: "guidelines-frontend" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "前端开发指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-frontend" --- # 前端开发指南 -**目录** - -{{< toc >}} - ## 背景 Gitea 在其前端中使用[Fomantic-UI](https://fomantic-ui.com/introduction/getting-started.html)(基于[jQuery](https://api.jquery.com))和 [Vue3](https://vuejs.org/)。 diff --git a/docs/content/doc/contributing/guidelines-refactoring.en-us.md b/docs/content/contributing/guidelines-refactoring.en-us.md similarity index 97% rename from docs/content/doc/contributing/guidelines-refactoring.en-us.md rename to docs/content/contributing/guidelines-refactoring.en-us.md index dce2845de52c..5d368a120d3b 100644 --- a/docs/content/doc/contributing/guidelines-refactoring.en-us.md +++ b/docs/content/contributing/guidelines-refactoring.en-us.md @@ -2,7 +2,7 @@ date: "2023-02-14T00:00:00+00:00" title: "Guidelines for Refactoring" slug: "guidelines-refactoring" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "Guidelines for Refactoring" - weight: 40 + sidebar_position: 40 identifier: "guidelines-refactoring" --- # Guidelines for Refactoring -**Table of Contents** - -{{< toc >}} - ## Background Since the first line of code was written at Feb 12, 2014, Gitea has grown to be a large project. diff --git a/docs/content/doc/contributing/guidelines-refactoring.zh-cn.md b/docs/content/contributing/guidelines-refactoring.zh-cn.md similarity index 97% rename from docs/content/doc/contributing/guidelines-refactoring.zh-cn.md rename to docs/content/contributing/guidelines-refactoring.zh-cn.md index 9356fbd110fb..d65fe486dcd7 100644 --- a/docs/content/doc/contributing/guidelines-refactoring.zh-cn.md +++ b/docs/content/contributing/guidelines-refactoring.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T00:00:00+00:00" title: "重构指南" slug: "guidelines-refactoring" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "contributing" name: "重构指南" - weight: 20 + sidebar_position: 20 identifier: "guidelines-refactoring" --- # 重构指南 -**目录** - -{{< toc >}} - ## 背景 自2014年2月12日编写了第一行代码以来,Gitea已经发展成为一个庞大的项目。 diff --git a/docs/content/doc/contributing/localization.de-de.md b/docs/content/contributing/localization.de-de.md similarity index 97% rename from docs/content/doc/contributing/localization.de-de.md rename to docs/content/contributing/localization.de-de.md index c4dcb6cafa14..07411792407f 100644 --- a/docs/content/doc/contributing/localization.de-de.md +++ b/docs/content/contributing/localization.de-de.md @@ -2,14 +2,14 @@ date: "2021-01-22T00:00:00+02:00" title: "Übersetzungs Richtlinien" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false menu: sidebar: parent: "contributing" name: "Übersetzungsrichtlinien" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/docs/content/doc/contributing/localization.en-us.md b/docs/content/contributing/localization.en-us.md similarity index 96% rename from docs/content/doc/contributing/localization.en-us.md rename to docs/content/contributing/localization.en-us.md index c9591254c75f..05ff5ee1218a 100644 --- a/docs/content/doc/contributing/localization.en-us.md +++ b/docs/content/contributing/localization.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Localization" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "Localization" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/docs/content/doc/contributing/localization.zh-cn.md b/docs/content/contributing/localization.zh-cn.md similarity index 95% rename from docs/content/doc/contributing/localization.zh-cn.md rename to docs/content/contributing/localization.zh-cn.md index 659a47332c6e..9f2353e0e9b6 100644 --- a/docs/content/doc/contributing/localization.zh-cn.md +++ b/docs/content/contributing/localization.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "本地化" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "本地化" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/docs/content/doc/contributing/localization.zh-tw.md b/docs/content/contributing/localization.zh-tw.md similarity index 95% rename from docs/content/doc/contributing/localization.zh-tw.md rename to docs/content/contributing/localization.zh-tw.md index 43c678000e05..b045d26be259 100644 --- a/docs/content/doc/contributing/localization.zh-tw.md +++ b/docs/content/contributing/localization.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "在地化" slug: "localization" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "contributing" name: "在地化" - weight: 70 + sidebar_position: 70 identifier: "localization" --- diff --git a/docs/content/doc/contributing/translation.zh-cn.md b/docs/content/contributing/translation.zh-cn.md similarity index 87% rename from docs/content/doc/contributing/translation.zh-cn.md rename to docs/content/contributing/translation.zh-cn.md index 8082c30bec53..80ce6fd743c1 100644 --- a/docs/content/doc/contributing/translation.zh-cn.md +++ b/docs/content/contributing/translation.zh-cn.md @@ -1,14 +1,14 @@ --- date: "2023-05-25T00:00:00+02:00" title: "翻译指南" -weight: 70 +sidebar_position: 70 toc: true draft: false menu: sidebar: parent: "contributing" name: "翻译指南" - weight: 70 + sidebar_position: 70 identifier: "translation-guidelines" --- diff --git a/docs/content/doc/development.en-us.md b/docs/content/development.en-us.md similarity index 79% rename from docs/content/doc/development.en-us.md rename to docs/content/development.en-us.md index e9e8b9c8167b..92201b1f5b1d 100644 --- a/docs/content/doc/development.en-us.md +++ b/docs/content/development.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "Development" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "Development" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/docs/content/doc/development.zh-cn.md b/docs/content/development.zh-cn.md similarity index 78% rename from docs/content/doc/development.zh-cn.md rename to docs/content/development.zh-cn.md index bbdaec4d1d38..4992b313d154 100644 --- a/docs/content/doc/development.zh-cn.md +++ b/docs/content/development.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "开发" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "开发" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/docs/content/doc/development.zh-tw.md b/docs/content/development.zh-tw.md similarity index 78% rename from docs/content/doc/development.zh-tw.md rename to docs/content/development.zh-tw.md index a0fbbf219f7a..2c9d335fda79 100644 --- a/docs/content/doc/development.zh-tw.md +++ b/docs/content/development.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "開發" slug: "development" -weight: 40 +sidebar_position: 40 toc: false draft: false menu: sidebar: name: "開發" - weight: 40 + sidebar_position: 40 identifier: "development" --- diff --git a/docs/content/doc/development/_index.en-us.md b/docs/content/development/_index.en-us.md similarity index 100% rename from docs/content/doc/development/_index.en-us.md rename to docs/content/development/_index.en-us.md diff --git a/docs/content/doc/development/_index.zh-cn.md b/docs/content/development/_index.zh-cn.md similarity index 100% rename from docs/content/doc/development/_index.zh-cn.md rename to docs/content/development/_index.zh-cn.md diff --git a/docs/content/doc/development/_index.zh-tw.md b/docs/content/development/_index.zh-tw.md similarity index 100% rename from docs/content/doc/development/_index.zh-tw.md rename to docs/content/development/_index.zh-tw.md diff --git a/docs/content/doc/development/api-usage.en-us.md b/docs/content/development/api-usage.en-us.md similarity index 98% rename from docs/content/doc/development/api-usage.en-us.md rename to docs/content/development/api-usage.en-us.md index 4f5304ac0e9d..a49c145ba1fc 100644 --- a/docs/content/doc/development/api-usage.en-us.md +++ b/docs/content/development/api-usage.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-24:00:00+02:00" title: "API Usage" slug: "api-usage" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "API Usage" - weight: 40 + sidebar_position: 40 identifier: "api-usage" --- # API Usage -**Table of Contents** - -{{< toc >}} - ## Enabling/configuring API access By default, `ENABLE_SWAGGER` is true, and diff --git a/docs/content/doc/development/api-usage.zh-cn.md b/docs/content/development/api-usage.zh-cn.md similarity index 98% rename from docs/content/doc/development/api-usage.zh-cn.md rename to docs/content/development/api-usage.zh-cn.md index ceb69b3f0efd..ca5909e5a739 100644 --- a/docs/content/doc/development/api-usage.zh-cn.md +++ b/docs/content/development/api-usage.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-24:00:00+02:00" title: "API 使用指南" slug: "api-usage" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "API 使用指南" - weight: 40 + sidebar_position: 40 identifier: "api-usage" --- diff --git a/docs/content/doc/development/hacking-on-gitea.en-us.md b/docs/content/development/hacking-on-gitea.en-us.md similarity index 95% rename from docs/content/doc/development/hacking-on-gitea.en-us.md rename to docs/content/development/hacking-on-gitea.en-us.md index e1efe2ec11eb..1eaa3d62b840 100644 --- a/docs/content/doc/development/hacking-on-gitea.en-us.md +++ b/docs/content/development/hacking-on-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Hacking on Gitea" slug: "hacking-on-gitea" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "Hacking on Gitea" - weight: 10 + sidebar_position: 10 identifier: "hacking-on-gitea" --- # Hacking on Gitea -**Table of Contents** - -{{< toc >}} - ## Quickstart To get a quick working development environment you could use Gitpod. @@ -34,7 +30,7 @@ environment correctly. Next, [install Node.js with npm](https://nodejs.org/en/download/) which is required to build the JavaScript and CSS files. The minimum supported Node.js -version is {{< min-node-version >}} and the latest LTS version is recommended. +version is @minNodeVersion@ and the latest LTS version is recommended. **Note**: When executing make tasks that require external tools, like `make watch-backend`, Gitea will automatically download and build these as @@ -42,11 +38,11 @@ necessary. To be able to use these you must have the `"$GOPATH"/bin` directory on the executable path. If you don't add the go bin directory to the executable path you will have to manage this yourself. -**Note 2**: Go version {{< min-go-version >}} or higher is required. +**Note 2**: Go version @minGoVersion@ or higher is required. Gitea uses `gofmt` to format source code. However, the results of `gofmt` can differ by the version of `go`. Therefore it is recommended to install the version of Go that our continuous integration is -running. As of last update, the Go version should be {{< go-version >}}. +running. As of last update, the Go version should be @goVersion@. To lint the template files, ensure [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/) are installed. @@ -126,8 +122,8 @@ to the Gitea sources. Otherwise, changes can't be pushed. ## Building Gitea (Basic) Take a look at our -[instructions]({{< relref "doc/installation/from-source.en-us.md" >}}) -for [building from source]({{< relref "doc/installation/from-source.en-us.md" >}}). +[instructions](installation/from-source.md) +for [building from source](installation/from-source.md). The simplest recommended way to build from source is: @@ -181,7 +177,7 @@ server as mentioned above. ### Working on JS and CSS -Frontend development should follow [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.en-us.md" >}}) +Frontend development should follow [Guidelines for Frontend Development](contributing/guidelines-frontend.md) To build with frontend resources, either use the `watch-frontend` target mentioned above or just build once: @@ -268,7 +264,7 @@ OpenAPI 3 documentation. When creating new configuration options, it is not enough to add them to the `modules/setting` files. You should add information to `custom/conf/app.ini` and to the -[configuration cheat sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md" >}}) +[configuration cheat sheet](administration/config-cheat-sheet.md) found in `docs/content/doc/administer/config-cheat-sheet.en-us.md` ### Changing the logo diff --git a/docs/content/doc/development/hacking-on-gitea.zh-cn.md b/docs/content/development/hacking-on-gitea.zh-cn.md similarity index 94% rename from docs/content/doc/development/hacking-on-gitea.zh-cn.md rename to docs/content/development/hacking-on-gitea.zh-cn.md index 6f0ce6bc0bfd..8e32c4c2441b 100644 --- a/docs/content/doc/development/hacking-on-gitea.zh-cn.md +++ b/docs/content/development/hacking-on-gitea.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "玩转 Gitea" slug: "hacking-on-gitea" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "玩转 Gitea" - weight: 10 + sidebar_position: 10 identifier: "hacking-on-gitea" --- # Hacking on Gitea -**目录** - -{{< toc >}} - ## 快速入门 要获得快速工作的开发环境,您可以使用 Gitpod。 @@ -32,7 +28,7 @@ menu: 您需要 [安装 go]( https://golang.org/doc/install ) 并设置您的 go 环境。 接下来,[使用 npm 安装 Node.js](https://nodejs.org/en/download/) ,这是构建 -JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{< min-node-version >}} +JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 @minNodeVersion@ 并且推荐使用最新的 LTS 版本。 **注意** :当执行需要外部工具的 make 任务时,比如 @@ -40,9 +36,9 @@ JavaScript 和 CSS 文件的必要工具。最低支持的 Node.js 版本是 {{< 将 `"$GOPATH"/bin` 目录加入到可执行路径上。如果你不把go bin目录添加到可执行路径你必须手动 指定可执行程序路径。 -**注意2** :Go版本 {{< min-go-version >}} 或更高版本是必须的。Gitea 使用 `gofmt` 来 +**注意2** :Go版本 @minGoVersion@ 或更高版本是必须的。Gitea 使用 `gofmt` 来 格式化源代码。然而,`gofmt` 的结果可能因 `go` 的版本而有差异。因此推荐安装我们持续集成使用 -的 Go版本。截至上次更新,Go 版本应该是 {{< go-version >}}。 +的 Go版本。截至上次更新,Go 版本应该是 @goVersion@。 ## 安装 Make @@ -115,8 +111,8 @@ git fetch --all --prune ## 构建 Gitea(基本) 看看我们的 -[说明]({{< relref "doc/installation/from-source.zh-cn.md" >}}) -关于如何[从源代码构建]({{< relref "doc/installation/from-source.zh-cn.md" >}}) 。 +[说明](installation/from-source.md) +关于如何[从源代码构建](installation/from-source.md) 。 从源代码构建的最简单推荐方法是: @@ -168,7 +164,7 @@ make lint-backend ### 处理 JS 和 CSS -前端开发应遵循 [Guidelines for Frontend Development]({{< relref "doc/contributing/guidelines-frontend.zh-cn.md" >}})。 +前端开发应遵循 [Guidelines for Frontend Development](contributing/guidelines-frontend.md)。 要使用前端资源构建,请使用上面提到的“watch-frontend”目标或只构建一次: @@ -249,7 +245,7 @@ make swagger-check ### 创建新的配置选项 创建新的配置选项时,将它们添加到 `modules/setting` 的对应文件。您应该将信息添加到 `custom/conf/app.ini` -并到[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md" >}}) +并到[配置备忘单](administration/config-cheat-sheet.md) 在 `docs/content/doc/advanced/config-cheat-sheet.zh-cn.md` 中找到 ### 更改Logo diff --git a/docs/content/doc/development/integrations.en-us.md b/docs/content/development/integrations.en-us.md similarity index 96% rename from docs/content/doc/development/integrations.en-us.md rename to docs/content/development/integrations.en-us.md index bbb50ae71dc7..66ea36243b15 100644 --- a/docs/content/doc/development/integrations.en-us.md +++ b/docs/content/development/integrations.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "Integrations" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "Integrations" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/docs/content/doc/development/integrations.zh-cn.md b/docs/content/development/integrations.zh-cn.md similarity index 96% rename from docs/content/doc/development/integrations.zh-cn.md rename to docs/content/development/integrations.zh-cn.md index 694a9d5616d5..0b8ca0d5a03f 100644 --- a/docs/content/doc/development/integrations.zh-cn.md +++ b/docs/content/development/integrations.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T17:29:00+08:00" title: "集成" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "集成" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/docs/content/doc/development/integrations.zh-tw.md b/docs/content/development/integrations.zh-tw.md similarity index 94% rename from docs/content/doc/development/integrations.zh-tw.md rename to docs/content/development/integrations.zh-tw.md index 278a8f41d5cf..9a6afad4ff1b 100644 --- a/docs/content/doc/development/integrations.zh-tw.md +++ b/docs/content/development/integrations.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "整合" slug: "integrations" -weight: 65 +sidebar_position: 65 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "整合" - weight: 65 + sidebar_position: 65 identifier: "integrations" --- diff --git a/docs/content/doc/development/migrations.en-us.md b/docs/content/development/migrations.en-us.md similarity index 97% rename from docs/content/doc/development/migrations.en-us.md rename to docs/content/development/migrations.en-us.md index f4116341566f..1e72f1b5209f 100644 --- a/docs/content/doc/development/migrations.en-us.md +++ b/docs/content/development/migrations.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "Migrations Interfaces" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "Migrations Interfaces" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/docs/content/doc/development/migrations.zh-cn.md b/docs/content/development/migrations.zh-cn.md similarity index 97% rename from docs/content/doc/development/migrations.zh-cn.md rename to docs/content/development/migrations.zh-cn.md index 8e3d73417df0..923be9046e2d 100644 --- a/docs/content/doc/development/migrations.zh-cn.md +++ b/docs/content/development/migrations.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T17:29:00+08:00" title: "迁移界面" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "迁移界面" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/docs/content/doc/development/migrations.zh-tw.md b/docs/content/development/migrations.zh-tw.md similarity index 97% rename from docs/content/doc/development/migrations.zh-tw.md rename to docs/content/development/migrations.zh-tw.md index c4171f3fb723..1dc222f379c8 100644 --- a/docs/content/doc/development/migrations.zh-tw.md +++ b/docs/content/development/migrations.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-15T17:29:00+08:00" title: "遷移介面" slug: "migrations-interfaces" -weight: 55 +sidebar_position: 55 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "遷移介面" - weight: 55 + sidebar_position: 55 identifier: "migrations-interfaces" --- diff --git a/docs/content/doc/development/oauth2-provider.en-us.md b/docs/content/development/oauth2-provider.en-us.md similarity index 99% rename from docs/content/doc/development/oauth2-provider.en-us.md rename to docs/content/development/oauth2-provider.en-us.md index f7a73dcc8833..b3824f4b2eac 100644 --- a/docs/content/doc/development/oauth2-provider.en-us.md +++ b/docs/content/development/oauth2-provider.en-us.md @@ -2,7 +2,7 @@ date: "2023-06-01T08:40:00+08:00" title: "OAuth2 provider" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "OAuth2 Provider" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- # OAuth2 provider -**Table of Contents** - -{{< toc >}} - Gitea supports acting as an OAuth2 provider to allow third party applications to access its resources with the user's consent. This feature is available since release 1.8.0. ## Endpoints diff --git a/docs/content/doc/development/oauth2-provider.zh-cn.md b/docs/content/development/oauth2-provider.zh-cn.md similarity index 99% rename from docs/content/doc/development/oauth2-provider.zh-cn.md rename to docs/content/development/oauth2-provider.zh-cn.md index 3fbf174efc96..6584bac37b22 100644 --- a/docs/content/doc/development/oauth2-provider.zh-cn.md +++ b/docs/content/development/oauth2-provider.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-04-19:44:00+01:00" title: "OAuth2 提供者" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "development" name: "OAuth2 提供者" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- # OAuth2 提供者 -**目录** - -{{< toc >}} - Gitea 支持作为 OAuth2 提供者,允许第三方应用程序在用户同意的情况下访问其资源。此功能自 1.8.0 版起可用。 ## 端点 diff --git a/docs/content/doc/development/oauth2-provider.zh-tw.md b/docs/content/development/oauth2-provider.zh-tw.md similarity index 98% rename from docs/content/doc/development/oauth2-provider.zh-tw.md rename to docs/content/development/oauth2-provider.zh-tw.md index 8d62264abc5d..dac6e684bd81 100644 --- a/docs/content/doc/development/oauth2-provider.zh-tw.md +++ b/docs/content/development/oauth2-provider.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-04-19:44:00+01:00" title: "OAuth2 提供者" slug: "oauth2-provider" -weight: 41 +sidebar_position: 41 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "development" name: "OAuth2 提供者" - weight: 41 + sidebar_position: 41 identifier: "oauth2-provider" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。 ## Endpoint diff --git a/docs/content/doc/help.en-us.md b/docs/content/help.en-us.md similarity index 76% rename from docs/content/doc/help.en-us.md rename to docs/content/help.en-us.md index 03c9a27818d9..5a7f4a42bc13 100644 --- a/docs/content/doc/help.en-us.md +++ b/docs/content/help.en-us.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "Help" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "Help" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/docs/content/doc/help.fr-fr.md b/docs/content/help.fr-fr.md similarity index 76% rename from docs/content/doc/help.fr-fr.md rename to docs/content/help.fr-fr.md index 42e01009ce82..cb41ad64870e 100644 --- a/docs/content/doc/help.fr-fr.md +++ b/docs/content/help.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "Aide" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "Aide" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/docs/content/doc/help.zh-cn.md b/docs/content/help.zh-cn.md similarity index 77% rename from docs/content/doc/help.zh-cn.md rename to docs/content/help.zh-cn.md index e8c0bd260b30..60b63bc28afe 100644 --- a/docs/content/doc/help.zh-cn.md +++ b/docs/content/help.zh-cn.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "帮助" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "帮助" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/docs/content/doc/help.zh-tw.md b/docs/content/help.zh-tw.md similarity index 77% rename from docs/content/doc/help.zh-tw.md rename to docs/content/help.zh-tw.md index 270a4ed8a749..840ea100e843 100644 --- a/docs/content/doc/help.zh-tw.md +++ b/docs/content/help.zh-tw.md @@ -2,12 +2,12 @@ date: "2017-01-20T15:00:00+08:00" title: "幫助" slug: "help" -weight: 5 +sidebar_position: 5 toc: false draft: false menu: sidebar: name: "幫助" - weight: 100 + sidebar_position: 100 identifier: "help" --- diff --git a/docs/content/doc/help/_index.en-us.md b/docs/content/help/_index.en-us.md similarity index 100% rename from docs/content/doc/help/_index.en-us.md rename to docs/content/help/_index.en-us.md diff --git a/docs/content/doc/help/_index.zh-cn.md b/docs/content/help/_index.zh-cn.md similarity index 100% rename from docs/content/doc/help/_index.zh-cn.md rename to docs/content/help/_index.zh-cn.md diff --git a/docs/content/doc/help/_index.zh-tw.md b/docs/content/help/_index.zh-tw.md similarity index 100% rename from docs/content/doc/help/_index.zh-tw.md rename to docs/content/help/_index.zh-tw.md diff --git a/docs/content/doc/help/faq.en-us.md b/docs/content/help/faq.en-us.md similarity index 89% rename from docs/content/doc/help/faq.en-us.md rename to docs/content/help/faq.en-us.md index 5a2cafba494a..3d03dd23ba32 100644 --- a/docs/content/doc/help/faq.en-us.md +++ b/docs/content/help/faq.en-us.md @@ -2,7 +2,7 @@ date: "2019-04-05T16:00:00+02:00" title: "FAQ" slug: "faq" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "help" name: "FAQ" - weight: 5 + sidebar_position: 5 identifier: "faq" --- -# Frequently Asked Questions +# Frequently Asked Questions This page contains some common questions and answers. -For more help resources, check all [Support Options]({{< relref "doc/help/support.en-us.md" >}}). - -**Table of Contents** - -{{< toc >}} +For more help resources, check all [Support Options](help/support.md). ## Difference between 1.x and 1.x.x downloads, how can I get latest stable release with bug fixes? @@ -43,7 +39,7 @@ If a bug fix is targeted on 1.20.1 but 1.20.1 is not released yet, you can get t To migrate from Gogs to Gitea: -- [Gogs version 0.9.146 or less]({{< relref "doc/installation/upgrade-from-gogs.en-us.md" >}}) +- [Gogs version 0.9.146 or less](installation/upgrade-from-gogs.md) - [Gogs version 0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286) To migrate from GitHub to Gitea, you can use Gitea's built-in migration form. @@ -91,7 +87,7 @@ https://github.com/loganinak/MigrateGitlabToGogs There are a few places that could make this show incorrectly. -1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}) +1. If using a reverse proxy, make sure you have followed the correction directions in the [reverse proxy guide](administration/reverse-proxies.md) 2. Make sure you have correctly set `ROOT_URL` in the `server` section of your `app.ini` If certain clone options aren't showing up (HTTP/S or SSH), the following options can be checked in your `app.ini` @@ -104,7 +100,7 @@ If certain clone options aren't showing up (HTTP/S or SSH), the following option This error occurs when the reverse proxy limits the file upload size. -See the [reverse proxy guide]({{< relref "doc/administration/reverse-proxies.en-us.md" >}}) for a solution with nginx. +See the [reverse proxy guide](administration/reverse-proxies.md) for a solution with nginx. ## Custom Templates not loading or working incorrectly @@ -114,7 +110,7 @@ The correct path for the template(s) will be relative to the `CustomPath` 1. To find `CustomPath`, look for Custom File Root Path in Site Administration -> Configuration 2. If you are still unable to find a path, the default can be [calculated above](#where-does-gitea-store-what-file) -3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea]({{< relref "doc/administration/customizing-gitea.en-us.md" >}}) page to add your template to the correct location. +3. Once you have figured out the correct custom path, you can refer to the [customizing Gitea](administration/customizing-gitea.md) page to add your template to the correct location. ## Does Gitea have a "GitHub/GitLab pages" feature? @@ -132,7 +128,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo ## Setting up logging -- [Official Docs]({{< relref "doc/administration/logging-config.en-us.md" >}}) +- [Official Docs](administration/logging-config.md) ## What is Swagger? @@ -140,7 +136,7 @@ A "login prohibited" user is a user that is not allowed to log in to Gitea anymo All Gitea instances have the built-in API and there is no way to disable it completely. You can, however, disable showing its documentation by setting `ENABLE_SWAGGER` to `false` in the `api` section of your `app.ini`. -For more information, refer to Gitea's [API docs]({{< relref "doc/development/api-usage.en-us.md" >}}). +For more information, refer to Gitea's [API docs](development/api-usage.md). You can see the latest API (for example) on . @@ -155,7 +151,7 @@ There are multiple things you can combine to prevent spammers. 1. By whitelisting or blocklisting certain email domains 2. By only whitelisting certain domains with OpenID (see below) 3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` -4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/administration/command-line.en-us.md" >}}), [API]({{< relref "doc/development/api-usage.en-us.md" >}}), or Gitea's Admin UI +4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI](administration/command-line.md), [API](development/api-usage.md), or Gitea's Admin UI ### Only allow/block certain email domains @@ -181,7 +177,7 @@ At some point, a customer or third party needs access to a specific repo and onl ### Enable Fail2ban -Use [Fail2Ban]({{< relref "doc/administration/fail2ban-setup.en-us.md" >}}) to monitor and stop automated login attempts or other malicious behavior based on log patterns +Use [Fail2Ban](administration/fail2ban-setup.md) to monitor and stop automated login attempts or other malicious behavior based on log patterns ## How to add/use custom themes @@ -334,24 +330,24 @@ You may want to set this value to `60m` or `120m`. ## How can I create users before starting Gitea -Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}) to add users like normal. +Gitea provides a sub-command `gitea migrate` to initialize the database, after which you can use the [admin CLI commands](administration/command-line.md#admin) to add users like normal. ## How can I enable password reset -There is no setting for password resets. It is enabled when a [mail service]({{< relref "doc/administration/email-setup.en-us.md" >}}) is configured, and disabled otherwise. +There is no setting for password resets. It is enabled when a [mail service](administration/email-setup.md) is configured, and disabled otherwise. ## How can a user's password be changed - As an **admin**, you can change any user's password (and optionally force them to change it on next login)... - By navigating to your `Site Administration -> User Accounts` page and editing a user. - - By using the [admin CLI commands]({{< relref "doc/administration/command-line.en-us.md#admin" >}}). + - By using the [admin CLI commands](administration/command-line.md#admin). - Keep in mind most commands will also need a [global flag]({{< relref "doc/administration/command-line.en-us.md#global-options" >}}) to point the CLI at the correct configuration. + Keep in mind most commands will also need a [global flag](administration/command-line.md#global-options) to point the CLI at the correct configuration. - As a **user** you can change it... - In your account `Settings -> Account` page (this method **requires** you to know your current password). - By using the `Forgot Password` link. - If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service]({{< relref "doc/administration/email-setup.en-us.md" >}}). + If the `Forgot Password/Account Recovery` page is disabled, please contact your administrator to configure a [mail service](administration/email-setup.md). ## Why is my markdown broken @@ -447,9 +443,9 @@ It is highly recommended to back-up your database before running these commands. - You can also check `/admin/config` for the repository root path. - Ensure that the user/org exists that you want to adopt repositories for. - As an admin, go to `/admin/repos/unadopted` and search. - - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}). + - Users can also be given similar permissions via config [`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.md#repository). - If the above steps are done correctly, you should be able to select repositories to adopt. - - If no repositories are found, enable [debug logging]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository" >}}) to check for any specific errors. + - If no repositories are found, enable [debug logging](administration/config-cheat-sheet.md#repository) to check for any specific errors. ## Gitea can't start on NFS diff --git a/docs/content/doc/help/faq.zh-cn.md b/docs/content/help/faq.zh-cn.md similarity index 88% rename from docs/content/doc/help/faq.zh-cn.md rename to docs/content/help/faq.zh-cn.md index 6a63b4530e8c..a11e074a2477 100644 --- a/docs/content/doc/help/faq.zh-cn.md +++ b/docs/content/help/faq.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-25T16:00:00+02:00" title: "常见问题" slug: "faq" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "help" name: "常见问题" - weight: 5 + sidebar_position: 5 identifier: "faq" --- -# 常见问题 +# 常见问题 本页面包含一些常见问题和答案。 -有关更多帮助资源,请查看所有[支持选项]({{< relref "doc/help/support.zh-cn.md" >}})。 - -**目录** - -{{< toc >}} +有关更多帮助资源,请查看所有[支持选项](help/support.md)。 ## 1.x和1.x.x下载之间的区别 @@ -45,7 +41,7 @@ menu: 要从Gogs迁移到Gitea: -- [Gogs版本0.9.146或更低]({{< relref "doc/installation/upgrade-from-gogs.zh-cn.md" >}}) +- [Gogs版本0.9.146或更低](installation/upgrade-from-gogs.md) - [Gogs版本0.11.46.0418](https://github.com/go-gitea/gitea/issues/4286) 要从GitHub迁移到Gitea,您可以使用Gitea内置的迁移表单。 @@ -92,7 +88,7 @@ https://github.com/loganinak/MigrateGitlabToGogs 有几个地方可能会导致显示不正确。 -1. 如果使用反向代理,请确保按照[反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})中的正确说明进行设置。 +1. 如果使用反向代理,请确保按照[反向代理指南](administration/reverse-proxies.md)中的正确说明进行设置。 2. 确保在`app.ini`的`server`部分中正确设置了`ROOT_URL`。 如果某些克隆选项未显示(HTTP/S或SSH),可以在`app.ini中` @@ -105,7 +101,7 @@ https://github.com/loganinak/MigrateGitlabToGogs 当反向代理限制文件上传大小时,会出现此错误。 -有关使用nginx解决此问题,请参阅[反向代理指南]({{< relref "doc/administration/reverse-proxies.zh-cn.md" >}})。 +有关使用nginx解决此问题,请参阅[反向代理指南](administration/reverse-proxies.md)。 ## 自定义模板无法加载或运行错误 @@ -117,8 +113,8 @@ Gitea的自定义模板必须将其添加到正确的位置,否则Gitea将无 如果找不到,请尝试`echo $GITEA_CUSTOM`。 -2. 如果仍然找不到,默认值可以被[计算]({{< relref "doc/help/faq.zh-cn.md#where-does-gitea-store-what-file" >}}) -3. 如果仍然找不到路径,则可以参考[自定义Gitea]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}})页面,将模板添加到正确的位置。 +2. 如果仍然找不到,默认值可以被[计算](help/faq.md#where-does-gitea-store-what-file) +3. 如果仍然找不到路径,则可以参考[自定义Gitea](administration/customizing-gitea.md)页面,将模板添加到正确的位置。 ## Gitea是否有"GitHub/GitLab Pages"功能? @@ -136,7 +132,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 ## 设置日志记录 -- [官方文档]({{< relref "doc/administration/logging-config.zh-cn.md" >}}) +- [官方文档](administration/logging-config.md) ## 什么是Swagger? @@ -144,7 +140,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 所有Gitea实例都有内置的API,无法完全禁用它。 但是,您可以在app.ini的api部分将ENABLE_SWAGGER设置为false,以禁用其文档显示。 -有关更多信息,请参阅Gitea的[API文档]({{< relref "doc/development/api-usage.zh-cn.md" >}})。 +有关更多信息,请参阅Gitea的[API文档](development/api-usage.md)。 您可以在上查看最新的API(例如)。 @@ -159,7 +155,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 1. 通过设置电子邮件域名的白名单或黑名单。 2. 通过设置一些域名或者OpenID白名单(见下文)。 3. 在您的`app.ini`中将`ENABLE_CAPTCHA`设置为`true`,并正确配置`RECAPTCHA_SECRET`和 `RECAPTCHA_SITEKEY`。 -4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI]({{< relref "doc/administration/command-line.zh-cn.md" >}})、[API]({{< relref "doc/development/api-usage.zh-cn.md" >}}) 或 Gitea 的管理界面创建新用户。 +4. 将`DISABLE_REGISTRATION`设置为`true`,并通过 [CLI](administration/command-line.md)、[API](development/api-usage.md) 或 Gitea 的管理界面创建新用户。 ### 仅允许/阻止特定的电子邮件域名 @@ -185,7 +181,7 @@ Gitea不提供内置的Pages服务器。您需要一个专用的域名来提供 ### 启用 Fail2ban -使用 [Fail2Ban]({{< relref "doc/administration/fail2ban-setup.zh-cn.md" >}}) 监视并阻止基于日志模式的自动登录尝试或其他恶意行为。 +使用 [Fail2Ban](administration/fail2ban-setup.md) 监视并阻止基于日志模式的自动登录尝试或其他恶意行为。 ## 如何添加/使用自定义主题 @@ -216,7 +212,7 @@ Gitea还提供了自己的SSH服务器,用于在SSHD不可用时使用。 请确保Gitea具有足够的权限来写入其主目录和数据目录。 -参见[AppDataPath 和 RepoRootPath]({{< relref "doc/help/faq.zh-cn.md#where-does-gitea-store-what-file" >}}) +参见[AppDataPath 和 RepoRootPath](help/faq.md#where-does-gitea-store-what-file) **适用于Arch用户的注意事项:**在撰写本文时,Arch软件包的systemd文件包含了以下行: @@ -338,24 +334,24 @@ error: failed to push some refs to '' ## 如何在启动 Gitea 之前创建用户 -Gitea 提供了一个子命令`gitea migrate`来初始化数据库,然后您可以使用[管理 CLI 命令]({{< relref "doc/administration/command-line.zh-cn.md#admin" >}})像正常情况下添加用户。 +Gitea 提供了一个子命令`gitea migrate`来初始化数据库,然后您可以使用[管理 CLI 命令](administration/command-line.md#admin)像正常情况下添加用户。 ## 如何启用密码重置 -没有密码重置的设置。当配置了[邮件服务]({{< relref "doc/administration/email-setup.zh-cn.md" >}})时,密码重置将自动启用;否则将被禁用。 +没有密码重置的设置。当配置了[邮件服务](administration/email-setup.md)时,密码重置将自动启用;否则将被禁用。 ## 如何更改用户的密码 - 作为管理员,您可以更改任何用户的密码(并可选择强制其在下次登录时更改密码)... - 转到您的`站点管理 -> 用户账户`页面并编辑用户。 -- 使用[管理 CLI 命令]({{< relref "doc/administration/command-line.zh-cn.md#admin" >}})。 +- 使用[管理 CLI 命令](administration/command-line.md#admin)。 - 请注意,大多数命令还需要一个[全局标志]({{< relref "doc/administration/command-line.zh-cn.- md#global-options" >}})来指向正确的配置。 + 请注意,大多数命令还需要一个[全局标志](administration/command-line.md#global-options)来指向正确的配置。 - 作为**用户**,您可以更改密码... - 在您的账户的`设置 -> 账户`页面(此方法**需要**您知道当前密码)。 - 使用`忘记密码`链接。 - 如果`忘记密码/账户恢复`页面被禁用,请联系管理员配置[邮件服务]({{< relref "doc/administration/email-setup.zh-cn.md" >}})。 + 如果`忘记密码/账户恢复`页面被禁用,请联系管理员配置[邮件服务](administration/email-setup.md)。 ## 为什么我的 Markdown 显示错误 @@ -410,7 +406,7 @@ SystemD 上的标准输出默认会写入日志记录中。您可以尝试使用 类似地,Docker 上的标准输出可以使用`docker logs `来查看。 -要收集日志以进行帮助和问题报告,请参阅[支持选项]({{< relref "doc/help/support.zh-cn.md" >}})。 +要收集日志以进行帮助和问题报告,请参阅[支持选项](help/support.md)。 ## 初始日志记录 @@ -467,6 +463,6 @@ gitea doctor recreate-table - 您还可以在`/admin/config`中检查存储库根路径。 - 确保存在要采用存储库的用户/组织。 - 作为管理员,转到`/admin/repos/unadopted`并搜索。 -- 用户也可以通过配置[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository" >}}) 获得类似的权限。 +- 用户也可以通过配置[`ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`](administration/config-cheat-sheet.md#repository) 获得类似的权限。 - 如果上述步骤都正确执行,您应该能够选择要采用的存储库。 - - 如果没有找到存储库,请启用[调试日志记录]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository" >}})以检查是否有特定错误。 + - 如果没有找到存储库,请启用[调试日志记录](administration/config-cheat-sheet.md#repository)以检查是否有特定错误。 diff --git a/docs/content/doc/help/support.en-us.md b/docs/content/help/support.en-us.md similarity index 97% rename from docs/content/doc/help/support.en-us.md rename to docs/content/help/support.en-us.md index 2b285ce6ea8c..144072299a1c 100644 --- a/docs/content/doc/help/support.en-us.md +++ b/docs/content/help/support.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-21T15:00:00+00:00" title: "Support Options" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "Support Options" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/docs/content/doc/help/support.zh-cn.md b/docs/content/help/support.zh-cn.md similarity index 93% rename from docs/content/doc/help/support.zh-cn.md rename to docs/content/help/support.zh-cn.md index 775dfe83bd7d..de56d8abe0e1 100644 --- a/docs/content/doc/help/support.zh-cn.md +++ b/docs/content/help/support.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-01-20T15:00:00+08:00" title: "需要帮助" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "需要帮助" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/docs/content/doc/help/support.zh-tw.md b/docs/content/help/support.zh-tw.md similarity index 95% rename from docs/content/doc/help/support.zh-tw.md rename to docs/content/help/support.zh-tw.md index a9c35eaafbba..70f4db01b301 100644 --- a/docs/content/doc/help/support.zh-tw.md +++ b/docs/content/help/support.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-05-21T15:00:00+00:00" title: "取得協助" slug: "support" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "help" name: "取得協助" - weight: 20 + sidebar_position: 20 identifier: "support" --- diff --git a/docs/content/page/index.de-de.md b/docs/content/index.de-de.md similarity index 96% rename from docs/content/page/index.de-de.md rename to docs/content/index.de-de.md index 3b344db1448d..7f0f611c25af 100644 --- a/docs/content/page/index.de-de.md +++ b/docs/content/index.de-de.md @@ -1,9 +1,8 @@ --- date: "2023-01-07T22:03:00+01:00" title: "Dokumentation" -slug: "documentation" -url: "/de-de/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/docs/content/page/index.en-us.md b/docs/content/index.en-us.md similarity index 99% rename from docs/content/page/index.en-us.md rename to docs/content/index.en-us.md index 4d455391e09a..7275b97452a5 100644 --- a/docs/content/page/index.en-us.md +++ b/docs/content/index.en-us.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "Documentation" -slug: "documentation" -url: "/en-us/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/docs/content/page/index.fr-fr.md b/docs/content/index.fr-fr.md similarity index 99% rename from docs/content/page/index.fr-fr.md rename to docs/content/index.fr-fr.md index f26fbeb8ccbb..60a9dfb6a36c 100755 --- a/docs/content/page/index.fr-fr.md +++ b/docs/content/index.fr-fr.md @@ -1,9 +1,8 @@ --- date: "2017-08-23T09:00:00+02:00" title: "Documentation" -slug: "documentation" -url: "/fr-fr/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/docs/content/page/index.zh-cn.md b/docs/content/index.zh-cn.md similarity index 98% rename from docs/content/page/index.zh-cn.md rename to docs/content/index.zh-cn.md index 4b747e230bdd..a9d7b8f7f0a1 100644 --- a/docs/content/page/index.zh-cn.md +++ b/docs/content/index.zh-cn.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "文档" -slug: "documentation" -url: "/zh-cn/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/docs/content/page/index.zh-tw.md b/docs/content/index.zh-tw.md similarity index 99% rename from docs/content/page/index.zh-tw.md rename to docs/content/index.zh-tw.md index e52eba572edd..e64a54cd01fe 100644 --- a/docs/content/page/index.zh-tw.md +++ b/docs/content/index.zh-tw.md @@ -1,9 +1,8 @@ --- date: "2016-11-08T16:00:00+02:00" title: "文件" -slug: "documentation" -url: "/zh-tw/" -weight: 10 +slug: / +sidebar_position: 10 toc: false draft: false --- diff --git a/docs/content/doc/installation.en-us.md b/docs/content/installation.en-us.md similarity index 79% rename from docs/content/doc/installation.en-us.md rename to docs/content/installation.en-us.md index 4257521d973b..32933f0f7887 100644 --- a/docs/content/doc/installation.en-us.md +++ b/docs/content/installation.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "Installation" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/docs/content/doc/installation.fr-fr.md b/docs/content/installation.fr-fr.md similarity index 79% rename from docs/content/doc/installation.fr-fr.md rename to docs/content/installation.fr-fr.md index 55b48bda3eca..1466e03e184b 100644 --- a/docs/content/doc/installation.fr-fr.md +++ b/docs/content/installation.fr-fr.md @@ -2,12 +2,12 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "Installation" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/docs/content/doc/installation.zh-cn.md b/docs/content/installation.zh-cn.md similarity index 78% rename from docs/content/doc/installation.zh-cn.md rename to docs/content/installation.zh-cn.md index 8f57e0f00c27..979abc28c111 100644 --- a/docs/content/doc/installation.zh-cn.md +++ b/docs/content/installation.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "安装" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "安装" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/docs/content/doc/installation.zh-tw.md b/docs/content/installation.zh-tw.md similarity index 78% rename from docs/content/doc/installation.zh-tw.md rename to docs/content/installation.zh-tw.md index f955e994ac09..48b0983f2a8c 100644 --- a/docs/content/doc/installation.zh-tw.md +++ b/docs/content/installation.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-01T16:00:00+02:00" title: "安裝" slug: "installation" -weight: 10 +sidebar_position: 10 toc: false draft: false menu: sidebar: name: "安裝" - weight: 10 + sidebar_position: 10 identifier: "installation" --- diff --git a/docs/content/doc/installation/_index.en-us.md b/docs/content/installation/_index.en-us.md similarity index 100% rename from docs/content/doc/installation/_index.en-us.md rename to docs/content/installation/_index.en-us.md diff --git a/docs/content/doc/installation/_index.fr-fr.md b/docs/content/installation/_index.fr-fr.md similarity index 100% rename from docs/content/doc/installation/_index.fr-fr.md rename to docs/content/installation/_index.fr-fr.md diff --git a/docs/content/doc/installation/_index.zh-cn.md b/docs/content/installation/_index.zh-cn.md similarity index 100% rename from docs/content/doc/installation/_index.zh-cn.md rename to docs/content/installation/_index.zh-cn.md diff --git a/docs/content/doc/installation/_index.zh-tw.md b/docs/content/installation/_index.zh-tw.md similarity index 100% rename from docs/content/doc/installation/_index.zh-tw.md rename to docs/content/installation/_index.zh-tw.md diff --git a/docs/content/doc/installation/comparison.en-us.md b/docs/content/installation/comparison.en-us.md similarity index 99% rename from docs/content/doc/installation/comparison.en-us.md rename to docs/content/installation/comparison.en-us.md index 578b00c21125..80fa9b7054d1 100644 --- a/docs/content/doc/installation/comparison.en-us.md +++ b/docs/content/installation/comparison.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-07T13:00:00+02:00" title: "Compared to other Git hosting" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -10,17 +10,13 @@ aliases: menu: sidebar: name: "Comparison" - weight: 5 + sidebar_position: 5 parent: installation identifier: "comparison" --- # Gitea compared to other Git hosting options -**Table of Contents** - -{{< toc >}} - To help decide if Gitea is suited for your needs, here is how it compares to other Git self hosted options. Be warned that we don't regularly check for feature changes in other products, so this list may be outdated. If you find anything that needs to be updated in the table below, please [open an issue](https://github.com/go-gitea/gitea/issues/new/choose). diff --git a/docs/content/doc/installation/comparison.zh-cn.md b/docs/content/installation/comparison.zh-cn.md similarity index 99% rename from docs/content/doc/installation/comparison.zh-cn.md rename to docs/content/installation/comparison.zh-cn.md index 91955ee68856..acf3f4ebe033 100644 --- a/docs/content/doc/installation/comparison.zh-cn.md +++ b/docs/content/installation/comparison.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-02-14T11:51:04+08:00" title: "对比 Gitea 与其它 Git 托管工具" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "横向对比" - weight: 5 + sidebar_position: 5 identifier: "comparison" --- diff --git a/docs/content/doc/installation/comparison.zh-tw.md b/docs/content/installation/comparison.zh-tw.md similarity index 99% rename from docs/content/doc/installation/comparison.zh-tw.md rename to docs/content/installation/comparison.zh-tw.md index 042acba8d3da..01a1035dafde 100644 --- a/docs/content/doc/installation/comparison.zh-tw.md +++ b/docs/content/installation/comparison.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-05-07T13:00:00+02:00" title: "比較 Gitea 和其它自託管 Git 服務" slug: "comparison" -weight: 5 +sidebar_position: 5 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "比較" - weight: 5 + sidebar_position: 5 identifier: "comparison" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - 為了幫助您判斷 Gitea 是否適合您的需求,這裡列出了它和其它自託管 Git 服務的比較。 請注意我們不會經常檢查其它產品的功能異動,所以這份清單可能過期,如果您在下方表格中找到需要更新的資料,請在 [GitHub 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。 diff --git a/docs/content/doc/installation/database-preparation.en-us.md b/docs/content/installation/database-preparation.en-us.md similarity index 99% rename from docs/content/doc/installation/database-preparation.en-us.md rename to docs/content/installation/database-preparation.en-us.md index 4b0d1b5ba819..21360fa4d272 100644 --- a/docs/content/doc/installation/database-preparation.en-us.md +++ b/docs/content/installation/database-preparation.en-us.md @@ -2,7 +2,7 @@ date: "2020-01-16" title: "Database Preparation" slug: "database-prep" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Database preparation" - weight: 10 + sidebar_position: 10 identifier: "database-prep" --- @@ -23,10 +23,6 @@ Database instance can be on same machine as Gitea (local database setup), or on Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers. -**Table of Contents** - -{{< toc >}} - ## MySQL 1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to: diff --git a/docs/content/doc/installation/database-preparation.zh-cn.md b/docs/content/installation/database-preparation.zh-cn.md similarity index 99% rename from docs/content/doc/installation/database-preparation.zh-cn.md rename to docs/content/installation/database-preparation.zh-cn.md index 6c23f8ce5d4d..b5e8b73f1f6b 100644 --- a/docs/content/doc/installation/database-preparation.zh-cn.md +++ b/docs/content/installation/database-preparation.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-01-16" title: "数据库准备" slug: "database-prep" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "数据库准备" - weight: 10 + sidebar_position: 10 identifier: "database-prep" --- @@ -23,10 +23,6 @@ menu: 注意:以下所有步骤要求您的选择的数据库引擎已安装在您的系统上。对于远程数据库设置,请在数据库实例上安装服务器应用程序,在 Gitea 服务器上安装客户端程序。客户端程序用于测试 Gitea 服务器与数据库之间的连接,而 Gitea 本身使用 Go 提供的数据库驱动程序完成相同的任务。此外,请确保服务器和客户端使用相同的引擎版本,以使某些引擎功能正常工作。出于安全原因,请使用安全密码保护 `root`(MySQL)或 `postgres`(PostgreSQL)数据库超级用户。以下步骤假设您在数据库和 Gitea 服务器上都使用 Linux。 -**目录** - -{{< toc >}} - ## MySQL 1. 对于远程数据库设置,您需要让 MySQL 监听您的 IP 地址。编辑数据库实例上的 `/etc/mysql/my.cnf` 文件中的 `bind-address` 选项为: diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/installation/from-binary.en-us.md similarity index 90% rename from docs/content/doc/installation/from-binary.en-us.md rename to docs/content/installation/from-binary.en-us.md index 4c501aa30e3d..88f82be32272 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/installation/from-binary.en-us.md @@ -2,7 +2,7 @@ date: "2017-06-19T12:00:00+02:00" title: "Installation from binary" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "From binary" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,10 +20,6 @@ menu: All downloads come with SQLite, MySQL and PostgreSQL support, and are built with embedded assets. This can be different from Gogs. -**Table of Contents** - -{{< toc >}} - ## Download You can find the file matching your platform from the [downloads page](https://dl.gitea.com/gitea/) after navigating to the version you want to download. @@ -45,11 +41,11 @@ You can find the file matching your platform from the [downloads page](https://d Copy the commands below and replace the URL within the one you wish to download. ```sh -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` -Note that the above command will download Gitea {{< version >}} for 64-bit Linux. +Note that the above command will download Gitea @version@ for 64-bit Linux. ## Verify GPG signature @@ -58,7 +54,7 @@ To validate the binary, download the signature file which ends in `.asc` for the ```sh gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 -gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64 +gpg --verify gitea-@version@-linux-amd64.asc gitea-@version@-linux-amd64 ``` Look for the text `Good signature from "Teabot "` to assert a good binary, @@ -66,7 +62,7 @@ despite warnings like `This key is not certified with a trusted signature!`. ## Recommended server configuration -**NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/administration/environment-variables.en-us.md" >}}) as well! +**NOTE:** Many of the following directories can be configured using [Environment Variables](administration/environment-variables.md) as well! Of note, configuring `GITEA_WORK_DIR` will tell Gitea where to base its working directory, as well as ease installation. ### Prepare environment @@ -127,7 +123,7 @@ If you don't want the web installer to be able to write to the config file, it i * Ensure that the `SECRET_KEY` and `INTERNAL_TOKEN` values are set. (You may want to use the `gitea generate secret` to generate these secret keys.) * Ensure that any other secret keys you need are set. -See the [command line documentation]({{< relref "doc/administration/command-line.en-us.md" >}}) for information on using `gitea generate secret`. +See the [command line documentation](administration/command-line.md) for information on using `gitea generate secret`. ### Configure Gitea's working directory @@ -159,7 +155,7 @@ After you complete the above steps, you can run Gitea two ways: ### 1. Creating a service file to start Gitea automatically (recommended) -See how to create [Linux service]({{< relref "doc/installation/run-as-service-in-ubuntu.en-us.md" >}}) +See how to create [Linux service](installation/run-as-service-in-ubuntu.md) ### 2. Running from command-line/terminal @@ -172,7 +168,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini You can update to a new version of Gitea by stopping Gitea, replacing the binary at `/usr/local/bin/gitea` and restarting the instance. The binary file name should not be changed during the update to avoid problems in existing repositories. -It is recommended that you make a [backup]({{< relref "doc/administration/backup-and-restore.en-us.md" >}}) before updating your installation. +It is recommended that you make a [backup](administration/backup-and-restore.md) before updating your installation. If you have carried out the installation steps as described above, the binary should have the generic name `gitea`. Do not change this, i.e. to include the version number. @@ -200,7 +196,7 @@ Older Linux distributions (such as Debian 7 and CentOS 6) may not be able to loa Gitea binary, usually producing an error such as `./gitea: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC\_2.14' not found (required by ./gitea)`. This is due to the integrated SQLite support in the binaries provided by dl.gitea.com. In this situation, it is usually -possible to [install from source]({{< relref "doc/installation/from-source.en-us.md" >}}), without including +possible to [install from source](installation/from-source.md), without including SQLite support. ### Running Gitea on another port diff --git a/docs/content/doc/installation/from-binary.fr-fr.md b/docs/content/installation/from-binary.fr-fr.md similarity index 91% rename from docs/content/doc/installation/from-binary.fr-fr.md rename to docs/content/installation/from-binary.fr-fr.md index f3d3110439df..ac534263e139 100644 --- a/docs/content/doc/installation/from-binary.fr-fr.md +++ b/docs/content/installation/from-binary.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation avec le binaire pré-compilé" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Binaire pré-compilé" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,7 +20,7 @@ menu: Tous les binaires sont livrés avec le support de SQLite, MySQL et PostgreSQL, et sont construits avec les ressources incorporées. Gardez à l'esprit que cela peut être différent pour les versions antérieures. L'installation basée sur nos binaires est assez simple, il suffit de choisir le fichier correspondant à votre plateforme à partir de la [page de téléchargement](https://dl.gitea.com/gitea). Copiez l'URL et remplacer l'URL dans les commandes suivantes par la nouvelle: ``` -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` @@ -36,7 +36,7 @@ Après avoir suivi les étapes ci-dessus, vous aurez un binaire `gitea` dans vot ### Anciennes version de glibc -Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source]({{< relref "doc/installation/from-source.fr-fr.md" >}}). +Les anciennes distributions Linux (comme Debian 7 ou CentOS 6) peuvent ne pas être capable d'exécuter le binaire Gitea, résultant généralement une erreur du type ```./gitea: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./gitea)```. Cette erreur est due au driver SQLite que nous intégrons dans le binaire Gitea. Dans le futur, nous fournirons des binaires sans la dépendance pour la bibliothèque glibc. En attendant, vous pouvez mettre à jour votre distribution ou installer Gitea depuis le [code source](installation/from-source.md). ### Exécuter Gitea avec un autre port diff --git a/docs/content/doc/installation/from-binary.zh-cn.md b/docs/content/installation/from-binary.zh-cn.md similarity index 89% rename from docs/content/doc/installation/from-binary.zh-cn.md rename to docs/content/installation/from-binary.zh-cn.md index 85fc47362895..a5f54756ed7b 100644 --- a/docs/content/doc/installation/from-binary.zh-cn.md +++ b/docs/content/installation/from-binary.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用二进制文件安装" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用二进制文件安装" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -19,10 +19,6 @@ menu: 所有打包的二进制程序均包含 SQLite,MySQL 和 PostgreSQL 的数据库连接支持,同时网站的静态资源均已嵌入到可执行程序中,这一点和曾经的 Gogs 有所不同。 -**目录** - -{{< toc >}} - ## 下载 你可以从 [下载页面](https://dl.gitea.com/gitea/) 选择对应平台的二进制文件。 @@ -42,7 +38,7 @@ menu: 使用以下命令下载适用于 64-bit Linux 平台的二进制文件。 ```sh -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` @@ -53,7 +49,7 @@ Gitea 对打包的二进制文件使用 [GPG密钥](https://keys.openpgp.org/sea ```sh gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 -gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64 +gpg --verify gitea-@version@-linux-amd64.asc gitea-@version@-linux-amd64 ``` 校验正确时的信息为 `Good signature from "Teabot "`。 @@ -61,7 +57,7 @@ gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-a ## 服务器设置 -**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量]({{< relref "doc/administration/environment-variables.zh-cn.md" >}}) 初始化。 +**提示:** `GITEA_WORK_DIR` 表示 Gitea 工作的路径。以下路径可以通过 [环境变量](administration/environment-variables.md) 初始化。 ### 准备环境 @@ -143,7 +139,7 @@ cp gitea /usr/local/bin/gitea ### 1. 创建服务自动启动 Gitea(推荐) -学习创建 [Linux 服务]({{< relref "doc/installation/run-as-service-in-ubuntu.zh-cn.md" >}}) +学习创建 [Linux 服务](installation/run-as-service-in-ubuntu.md) ### 2. 通过命令行终端运行 @@ -155,7 +151,7 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini 您可以通过停止程序,替换 `/usr/local/bin/gitea` 并重启来更新到新版本。直接替换可执行程序时不要更改或使用新的文件名称,以避免数据出错。 -建议您在更新之前进行[备份]({{< relref "doc/administration/backup-and-restore.zh-cn.md" >}})。 +建议您在更新之前进行[备份](administration/backup-and-restore.md)。 ### 1. 使用 systemd 重新启动 Gitea(推荐) @@ -175,4 +171,4 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini > 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting) -如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "doc/help/support.zh-cn.md" >}}) +如果从本页中没有找到你需要的内容,请访问 [帮助页面](help/support.md) diff --git a/docs/content/doc/installation/from-binary.zh-tw.md b/docs/content/installation/from-binary.zh-tw.md similarity index 89% rename from docs/content/doc/installation/from-binary.zh-tw.md rename to docs/content/installation/from-binary.zh-tw.md index 78db79775d2e..1fff90aa371c 100644 --- a/docs/content/doc/installation/from-binary.zh-tw.md +++ b/docs/content/installation/from-binary.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "執行檔安裝" slug: "install-from-binary" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "執行檔" - weight: 15 + sidebar_position: 15 identifier: "install-from-binary" --- @@ -20,7 +20,7 @@ menu: 所有的執行檔皆支援 SQLite, MySQL and PostgreSQL,且所有檔案都已經包在執行檔內,這一點跟之前的版本有所不同。關於執行檔的安裝方式非常簡單,只要從[下載頁面](https://dl.gitea.com/gitea)選擇相對應平台,複製下載連結,使用底下指令就可以完成了: ``` -wget -O gitea https://dl.gitea.com/gitea/{{< version >}}/gitea-{{< version >}}-linux-amd64 +wget -O gitea https://dl.gitea.com/gitea/@version@/gitea-@version@-linux-amd64 chmod +x gitea ``` diff --git a/docs/content/doc/installation/from-package.en-us.md b/docs/content/installation/from-package.en-us.md similarity index 91% rename from docs/content/doc/installation/from-package.en-us.md rename to docs/content/installation/from-package.en-us.md index b427ae9a49d0..36f3e2db08fb 100644 --- a/docs/content/doc/installation/from-package.en-us.md +++ b/docs/content/installation/from-package.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation from package" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,20 +11,16 @@ menu: sidebar: parent: "installation" name: "From package" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- -**Table of Contents** - -{{< toc >}} - # Official packages ## macOS Currently, the only supported method of installation on MacOS is [Homebrew](http://brew.sh/). -Following the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide may work, +Following the [deployment from binary](installation/from-binary.md) guide may work, but is not supported. To install Gitea via `brew`: ``` @@ -87,7 +83,7 @@ There is a [Gitea](https://chocolatey.org/packages/gitea) package for Windows by choco install gitea ``` -Or follow the [deployment from binary]({{< relref "doc/installation/from-binary.en-us.md" >}}) guide. +Or follow the [deployment from binary](installation/from-binary.md) guide. ## FreeBSD diff --git a/docs/content/doc/installation/from-package.fr-fr.md b/docs/content/installation/from-package.fr-fr.md similarity index 81% rename from docs/content/doc/installation/from-package.fr-fr.md rename to docs/content/installation/from-package.fr-fr.md index 0a00cd7f0c6a..256c913dcffc 100644 --- a/docs/content/doc/installation/from-package.fr-fr.md +++ b/docs/content/installation/from-package.fr-fr.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation depuis le gestionnaire de paquets" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Gestionnaire de paquets" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- @@ -19,15 +19,15 @@ menu: ## Linux -Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. +Nous n'avons pas encore publié de paquet pour Linux, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets pour toutes distributions Linux. En attendant, vous devriez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. ## Windows -Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. +Nous n'avons pas encore publié de paquet pour Windows, nous allons mettre à jour cette page directement lorsque nous commencerons à publier des paquets sous la forme de fichiers `MSI` ou via [Chocolatey](https://chocolatey.org/). En attendant, vous devriez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. ## macOS -Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation]({{< relref "doc/installation/from-binary.fr-fr.md" >}}) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes : +Actuellement, nous ne supportons que l'installation via `brew` pour macOS. Si vous n'utilisez pas [Homebrew](http://brew.sh/), vous pouvez suivre les [instructions d'installation](installation/from-binary.md) avec le binaire pré-compilé. Pour installer Gitea depuis `brew`, utilisez les commandes suivantes : ``` brew tap go-gitea/gitea diff --git a/docs/content/doc/installation/from-package.zh-cn.md b/docs/content/installation/from-package.zh-cn.md similarity index 90% rename from docs/content/doc/installation/from-package.zh-cn.md rename to docs/content/installation/from-package.zh-cn.md index 4845dd11537b..702f2bd80916 100644 --- a/docs/content/doc/installation/from-package.zh-cn.md +++ b/docs/content/installation/from-package.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用包管理器安装" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,19 +11,15 @@ menu: sidebar: parent: "installation" name: "使用包管理器安装" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- -**目录** - -{{< toc >}} - # 官方包管理器 ## macOS -macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}})。在你安装了 `brew` 之后, 你可以执行以下命令: +macOS 平台下当前我们仅支持通过 `brew` 来安装。如果你没有安装 [Homebrew](http://brew.sh/),你也可以查看 [从二进制安装](installation/from-binary.md)。在你安装了 `brew` 之后, 你可以执行以下命令: ``` brew tap gitea/tap https://gitea.com/gitea/homebrew-gitea @@ -77,7 +73,7 @@ OpenSUSE 构建服务为 [openSUSE 和 SLE](https://software.opensuse.org/downlo choco install gitea ``` -你也可以 [从二进制安装]({{< relref "doc/installation/from-binary.zh-cn.md" >}}) 。 +你也可以 [从二进制安装](installation/from-binary.md) 。 ## FreeBSD diff --git a/docs/content/doc/installation/from-package.zh-tw.md b/docs/content/installation/from-package.zh-tw.md similarity index 79% rename from docs/content/doc/installation/from-package.zh-tw.md rename to docs/content/installation/from-package.zh-tw.md index c01653e1d026..5a417ee20299 100644 --- a/docs/content/doc/installation/from-package.zh-tw.md +++ b/docs/content/installation/from-package.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "套件安裝" slug: "install-from-package" -weight: 20 +sidebar_position: 20 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "套件安裝" - weight: 20 + sidebar_position: 20 identifier: "install-from-package" --- @@ -19,7 +19,7 @@ menu: ## Linux -目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。 +目前尚未發佈任何 Linux 套件,如果我們發佈了,會直接更新此網頁。在這之前請先參考[執行檔安裝](installation/from-binary.md)方式。 ## Windows @@ -29,11 +29,11 @@ menu: choco install gitea ``` -也可以參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。 +也可以參考[執行檔安裝](installation/from-binary.md)方式。 ## macOS -目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝]({{< relref "doc/installation/from-binary.zh-tw.md" >}})方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令: +目前我們只支援透過 `brew` 來安裝套件。假如您尚未使用 [Homebrew](http://brew.sh/),您就必須參考[執行檔安裝](installation/from-binary.md)方式。透過 `brew` 安裝 Gitea,您只需要執行底下指令: ``` brew tap go-gitea/gitea diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/installation/from-source.en-us.md similarity index 90% rename from docs/content/doc/installation/from-source.en-us.md rename to docs/content/installation/from-source.en-us.md index 98179dd55e0e..ef720f082469 100644 --- a/docs/content/doc/installation/from-source.en-us.md +++ b/docs/content/installation/from-source.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation from source" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "From source" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -25,7 +25,7 @@ environment variable and to add the go bin directory or directories Next, [install Node.js with npm](https://nodejs.org/en/download/) which is required to build the JavaScript and CSS files. The minimum supported Node.js -version is {{< min-node-version >}} and the latest LTS version is recommended. +version is @minNodeVersion@ and the latest LTS version is recommended. **Note**: When executing make tasks that require external tools, like `make misspell-check`, Gitea will automatically download and build these as @@ -33,13 +33,9 @@ necessary. To be able to use these, you must have the `"$GOPATH/bin"` directory on the executable path. If you don't add the go bin directory to the executable path, you will have to manage this yourself. -**Note 2**: Go version {{< min-go-version >}} or higher is required. However, it is recommended to +**Note 2**: Go version @minGoVersion@ or higher is required. However, it is recommended to obtain the same version as our continuous integration, see the advice given in -[Hacking on Gitea]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}}) - -**Table of Contents** - -{{< toc >}} +[Hacking on Gitea](development/hacking-on-gitea.md) ## Download @@ -62,7 +58,7 @@ To work with tagged releases, the following commands can be used: ```bash git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` To validate a Pull Request, first enable the new branch (`xyz` is the PR id; @@ -72,23 +68,23 @@ for example `2663` for [#2663](https://github.com/go-gitea/gitea/pull/2663)): git fetch origin pull/xyz/head:pr-xyz ``` -To build Gitea from source at a specific tagged release (like v{{< version >}}), list the +To build Gitea from source at a specific tagged release (like v@version@), list the available tags and check out the specific tag. List available tags with the following. ```bash git tag -l -git checkout v{{< version >}} # or git checkout pr-xyz +git checkout v@version@ # or git checkout pr-xyz ``` ## Build To build from source, the following programs must be present on the system: -- `go` {{< min-go-version >}} or higher, see [here](https://golang.org/dl/) -- `node` {{< min-node-version >}} or higher with `npm`, see [here](https://nodejs.org/en/download/) -- `make`, see [here]({{< relref "doc/development/hacking-on-gitea.en-us.md" >}}#installing-make) +- `go` @minGoVersion@ or higher, see [here](https://golang.org/dl/) +- `node` @minNodeVersion@ or higher with `npm`, see [here](https://nodejs.org/en/download/) +- `make`, see [here](development/hacking-on-gitea.md#installing-make) Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile) are provided to keep the build process as simple as possible. @@ -123,8 +119,8 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build The `build` target is split into two sub-targets: -- `make backend` which requires [Go {{< min-go-version >}}](https://golang.org/dl/) or greater. -- `make frontend` which requires [Node.js {{< min-node-version >}}](https://nodejs.org/en/download/) or greater. +- `make backend` which requires [Go @minGoVersion@](https://golang.org/dl/) or greater. +- `make frontend` which requires [Node.js @minNodeVersion@](https://nodejs.org/en/download/) or greater. If pre-built frontend files are present it is possible to only build the backend: diff --git a/docs/content/doc/installation/from-source.fr-fr.md b/docs/content/installation/from-source.fr-fr.md similarity index 93% rename from docs/content/doc/installation/from-source.fr-fr.md rename to docs/content/installation/from-source.fr-fr.md index 6e2ff164f903..fe0f173bda57 100644 --- a/docs/content/doc/installation/from-source.fr-fr.md +++ b/docs/content/installation/from-source.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation depuis le code source" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Code source" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -36,7 +36,7 @@ Si vous souhaitez compiler la dernière version stable, utilisez les étiquettes ``` git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activer cette branche en premier : @@ -45,11 +45,11 @@ Si vous souhaitez valider une demande d'ajout (_Pull request_), vous devez activ git fetch origin pull/xyz/head:pr-xyz # xyz is PR value ``` -Enfin, vous pouvez directement utiliser les versions étiquettées (ex : `v{{< version >}}`). Pour utiliser les étiquettes, vous devez lister les étiquettes disponibles et choisir une étiquette spécifique avec les commandes suivantes : +Enfin, vous pouvez directement utiliser les versions étiquettées (ex : `v@version@`). Pour utiliser les étiquettes, vous devez lister les étiquettes disponibles et choisir une étiquette spécifique avec les commandes suivantes : ``` git tag -l -git checkout v{{< version >}} +git checkout v@version@ git checkout pr-xyz ``` diff --git a/docs/content/doc/installation/from-source.zh-cn.md b/docs/content/installation/from-source.zh-cn.md similarity index 89% rename from docs/content/doc/installation/from-source.zh-cn.md rename to docs/content/installation/from-source.zh-cn.md index 5d4ab0c3ae1a..c1f00904d4fe 100644 --- a/docs/content/doc/installation/from-source.zh-cn.md +++ b/docs/content/installation/from-source.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用源代码安装" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用源代码安装" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -21,10 +21,6 @@ menu: 其次你需要[安装Node.js](https://nodejs.org/zh-cn/download/),Node.js 和 npm 将用于构建 Gitea 前端。 -**目录** - -{{< toc >}} - ## 下载 你需要获取Gitea的源码,最方便的方式是使用 `git` 命令。执行以下命令: @@ -40,22 +36,22 @@ cd gitea ```bash git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` -最后,你也可以直接使用标签版本如 `v{{< version >}}`。你可以执行以下命令列出可用的版本并选择某个版本签出: +最后,你也可以直接使用标签版本如 `v@version@`。你可以执行以下命令列出可用的版本并选择某个版本签出: ```bash git tag -l -git checkout v{{< version >}} +git checkout v@version@ ``` ## 编译 要从源代码进行编译,以下依赖程序必须事先安装好: -- `go` {{< min-go-version >}} 或以上版本, 详见[这里](https://golang.google.cn/doc/install) -- `node` {{< min-node-version >}} 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/) +- `go` @minGoVersion@ 或以上版本, 详见[这里](https://golang.google.cn/doc/install) +- `node` @minNodeVersion@ 或以上版本,并且安装 `npm`, 详见[这里](https://nodejs.org/zh-cn/download/) - `make`, 详见[这里](/zh-cn/hacking-on-gitea/) 各种可用的 [make 任务](https://github.com/go-gitea/gitea/blob/main/Makefile) diff --git a/docs/content/doc/installation/from-source.zh-tw.md b/docs/content/installation/from-source.zh-tw.md similarity index 87% rename from docs/content/doc/installation/from-source.zh-tw.md rename to docs/content/installation/from-source.zh-tw.md index ea34b7e18cc7..eedfc36f0cde 100644 --- a/docs/content/doc/installation/from-source.zh-tw.md +++ b/docs/content/installation/from-source.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "原始碼安裝" slug: "install-from-source" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "原始碼安裝" - weight: 30 + sidebar_position: 30 identifier: "install-from-source" --- @@ -34,14 +34,14 @@ cd $GOPATH/src/code.gitea.io/gitea ``` git branch -a -git checkout v{{< version >}} +git checkout v@version@ ``` -最後您也可以直接編譯最新的標籤版本像是 `v{{< version >}}`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令:: +最後您也可以直接編譯最新的標籤版本像是 `v@version@`,假如您想要從原始碼編譯,這方法是最合適的,在編譯標籤版本前,您需要列出當下所有標籤,並且直接切換到標籤版本,請使用底下指令:: ``` git tag -l -git checkout v{{< version >}} +git checkout v@version@ ``` ## 編譯 diff --git a/docs/content/doc/installation/on-cloud-provider.en-us.md b/docs/content/installation/on-cloud-provider.en-us.md similarity index 97% rename from docs/content/doc/installation/on-cloud-provider.en-us.md rename to docs/content/installation/on-cloud-provider.en-us.md index bf3bf4c31249..d5baece8ca67 100644 --- a/docs/content/doc/installation/on-cloud-provider.en-us.md +++ b/docs/content/installation/on-cloud-provider.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Install on Cloud Provider" slug: "install-on-cloud-provider" -weight: 90 +sidebar_position: 90 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "On cloud provider" - weight: 90 + sidebar_position: 90 identifier: "install-on-cloud-provider" --- # Installation on Cloud Provider -**Table of Contents** - -{{< toc >}} - ## Cloudron Gitea is available as a 1-click install on [Cloudron](https://cloudron.io). diff --git a/docs/content/doc/installation/on-cloud-provider.zh-cn.md b/docs/content/installation/on-cloud-provider.zh-cn.md similarity index 96% rename from docs/content/doc/installation/on-cloud-provider.zh-cn.md rename to docs/content/installation/on-cloud-provider.zh-cn.md index 80fbf2d51dfb..7a2f3709ca13 100644 --- a/docs/content/doc/installation/on-cloud-provider.zh-cn.md +++ b/docs/content/installation/on-cloud-provider.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "在云服务器中安装 Gitea" slug: "install-on-cloud-provider" -weight: 90 +sidebar_position: 90 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "在云服务器中安装 Gitea" - weight: 90 + sidebar_position: 90 identifier: "install-on-cloud-provider" --- # 在云服务器上安装 Gitea -**Table of Contents** - -{{< toc >}} - ## Cloudron Gitea 可以在 [Cloudron](https://cloudron.io) 上进行一键安装。 diff --git a/docs/content/doc/installation/on-kubernetes.en-us.md b/docs/content/installation/on-kubernetes.en-us.md similarity index 97% rename from docs/content/doc/installation/on-kubernetes.en-us.md rename to docs/content/installation/on-kubernetes.en-us.md index 0847a3b85225..00f2aab28d42 100644 --- a/docs/content/doc/installation/on-kubernetes.en-us.md +++ b/docs/content/installation/on-kubernetes.en-us.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "Install on Kubernetes" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Kubernetes" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -49,7 +49,6 @@ a successful health check response will respond with http code `200`, here's exa ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/docs/content/doc/installation/on-kubernetes.zh-cn.md b/docs/content/installation/on-kubernetes.zh-cn.md similarity index 97% rename from docs/content/doc/installation/on-kubernetes.zh-cn.md rename to docs/content/installation/on-kubernetes.zh-cn.md index 83647a2eab9a..1af55d874b7f 100644 --- a/docs/content/doc/installation/on-kubernetes.zh-cn.md +++ b/docs/content/installation/on-kubernetes.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "在 Kubernetes 中安装 Gitea" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "在 Kubernetes 中安装 Gitea" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -60,7 +60,6 @@ Gitea 附带了一个运行状况检查接口 `/api/healthz`,你可以像这 ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/docs/content/doc/installation/on-kubernetes.zh-tw.md b/docs/content/installation/on-kubernetes.zh-tw.md similarity index 97% rename from docs/content/doc/installation/on-kubernetes.zh-tw.md rename to docs/content/installation/on-kubernetes.zh-tw.md index 28dfbda81d32..294e11ee1e8d 100644 --- a/docs/content/doc/installation/on-kubernetes.zh-tw.md +++ b/docs/content/installation/on-kubernetes.zh-tw.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "在 Kubernetes 安裝" slug: "install-on-kubernetes" -weight: 80 +sidebar_position: 80 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Kubernetes" - weight: 80 + sidebar_position: 80 identifier: "install-on-kubernetes" --- @@ -49,7 +49,6 @@ Gitea 附帶了一個運行狀況檢查端點 `/api/healthz`,你可以像這 ``` HTTP/1.1 200 OK - { "status": "pass", "description": "Gitea: Git with a cup of tea", diff --git a/docs/content/doc/installation/run-as-service-in-ubuntu.en-us.md b/docs/content/installation/run-as-service-in-ubuntu.en-us.md similarity index 97% rename from docs/content/doc/installation/run-as-service-in-ubuntu.en-us.md rename to docs/content/installation/run-as-service-in-ubuntu.en-us.md index 3587dfc01aa5..ab862b373f33 100644 --- a/docs/content/doc/installation/run-as-service-in-ubuntu.en-us.md +++ b/docs/content/installation/run-as-service-in-ubuntu.en-us.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "Run as service in Linux" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Linux service" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/docs/content/doc/installation/run-as-service-in-ubuntu.zh-cn.md b/docs/content/installation/run-as-service-in-ubuntu.zh-cn.md similarity index 97% rename from docs/content/doc/installation/run-as-service-in-ubuntu.zh-cn.md rename to docs/content/installation/run-as-service-in-ubuntu.zh-cn.md index 1512a4ab27a0..6ec127c31292 100644 --- a/docs/content/doc/installation/run-as-service-in-ubuntu.zh-cn.md +++ b/docs/content/installation/run-as-service-in-ubuntu.zh-cn.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "在 Linux 中以 service 方式运行" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "在Linux中以service方式运行" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md b/docs/content/installation/run-as-service-in-ubuntu.zh-tw.md similarity index 97% rename from docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md rename to docs/content/installation/run-as-service-in-ubuntu.zh-tw.md index 7465f2253ef8..51b23deaa475 100644 --- a/docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md +++ b/docs/content/installation/run-as-service-in-ubuntu.zh-tw.md @@ -2,7 +2,7 @@ date: "2017-07-21T12:00:00+02:00" title: "在 Linux 中以服務執行" slug: "linux-service" -weight: 40 +sidebar_position: 40 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Linux 服務" - weight: 40 + sidebar_position: 40 identifier: "linux-service" --- diff --git a/docs/content/doc/installation/upgrade-from-gitea.en-us.md b/docs/content/installation/upgrade-from-gitea.en-us.md similarity index 98% rename from docs/content/doc/installation/upgrade-from-gitea.en-us.md rename to docs/content/installation/upgrade-from-gitea.en-us.md index a6415f78618e..9b82de467a2a 100644 --- a/docs/content/doc/installation/upgrade-from-gitea.en-us.md +++ b/docs/content/installation/upgrade-from-gitea.en-us.md @@ -2,7 +2,7 @@ date: "2021-09-02T16:00:00+08:00" title: "Upgrade from an old Gitea" slug: "upgrade-from-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "Upgrade From Old Gitea" - weight: 100 + sidebar_position: 100 identifier: "upgrade-from-gitea" --- # Upgrade from an old Gitea -**Table of Contents** - -{{< toc >}} - To update Gitea, download a newer version, stop the old one, perform a backup, and run the new one. Every time a Gitea instance starts up, it checks whether a database migration should be run. If a database migration is required, Gitea will take some time to complete the upgrade and then serve. diff --git a/docs/content/doc/installation/upgrade-from-gitea.zh-cn.md b/docs/content/installation/upgrade-from-gitea.zh-cn.md similarity index 98% rename from docs/content/doc/installation/upgrade-from-gitea.zh-cn.md rename to docs/content/installation/upgrade-from-gitea.zh-cn.md index 8429ca492e74..8c919e15f327 100644 --- a/docs/content/doc/installation/upgrade-from-gitea.zh-cn.md +++ b/docs/content/installation/upgrade-from-gitea.zh-cn.md @@ -2,23 +2,19 @@ date: "2021-09-02T16:00:00+08:00" title: "从旧版 Gitea 升级" slug: "upgrade-from-gitea" -weight: 100 +sidebar_position: 100 toc: false draft: false menu: sidebar: parent: "installation" name: "从旧版 Gitea 升级" - weight: 100 + sidebar_position: 100 identifier: "upgrade-from-gitea" --- # 从旧版 Gitea 升级 -**目录** - -{{< toc >}} - 想要升级 Gitea,只需要下载新版,停止运行旧版,进行数据备份,然后运行新版就好。 每次 Gitea 实例启动时,它都会检查是否要进行数据库迁移。 如果需要进行数据库迁移,Gitea 会花一些时间完成升级然后继续服务。 diff --git a/docs/content/doc/installation/upgrade-from-gogs.en-us.md b/docs/content/installation/upgrade-from-gogs.en-us.md similarity index 97% rename from docs/content/doc/installation/upgrade-from-gogs.en-us.md rename to docs/content/installation/upgrade-from-gogs.en-us.md index fa545ee025f2..47cddc1c3052 100644 --- a/docs/content/doc/installation/upgrade-from-gogs.en-us.md +++ b/docs/content/installation/upgrade-from-gogs.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Upgrade from Gogs" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "installation" name: "Upgrade From Gogs" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- # Upgrade from Gogs -**Table of Contents** - -{{< toc >}} - Gogs, version 0.9.146 and older, can be easily migrated to Gitea. There are some basic steps to follow. On a Linux system run as the Gogs user: @@ -83,7 +79,7 @@ Upgrade to [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/) first. Download th the destination platform from the [downloads page](https://dl.gitea.com/gitea/1.6.4/) and replace the binary. Run Gitea at least once and check that everything works as expected. -Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/{{< version >}}/). +Then repeat the procedure, but this time using the [latest release](https://dl.gitea.com/gitea/@version@/). ## Upgrading from a more recent version of Gogs diff --git a/docs/content/doc/installation/upgrade-from-gogs.fr-fr.md b/docs/content/installation/upgrade-from-gogs.fr-fr.md similarity index 98% rename from docs/content/doc/installation/upgrade-from-gogs.fr-fr.md rename to docs/content/installation/upgrade-from-gogs.fr-fr.md index 9d287d111dc5..a5cd87598251 100644 --- a/docs/content/doc/installation/upgrade-from-gogs.fr-fr.md +++ b/docs/content/installation/upgrade-from-gogs.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Mise à jour depuis Gogs" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Depuis Gogs" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- diff --git a/docs/content/doc/installation/upgrade-from-gogs.zh-cn.md b/docs/content/installation/upgrade-from-gogs.zh-cn.md similarity index 95% rename from docs/content/doc/installation/upgrade-from-gogs.zh-cn.md rename to docs/content/installation/upgrade-from-gogs.zh-cn.md index f537896ca1ee..4de41ca32fa0 100644 --- a/docs/content/doc/installation/upgrade-from-gogs.zh-cn.md +++ b/docs/content/installation/upgrade-from-gogs.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "从 Gogs 升级" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "从 Gogs 升级" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- diff --git a/docs/content/doc/installation/upgrade-from-gogs.zh-tw.md b/docs/content/installation/upgrade-from-gogs.zh-tw.md similarity index 97% rename from docs/content/doc/installation/upgrade-from-gogs.zh-tw.md rename to docs/content/installation/upgrade-from-gogs.zh-tw.md index 46442845e780..ef5737bc6d2d 100644 --- a/docs/content/doc/installation/upgrade-from-gogs.zh-tw.md +++ b/docs/content/installation/upgrade-from-gogs.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "從 Gogs 升級" slug: "upgrade-from-gogs" -weight: 101 +sidebar_position: 101 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "從 Gogs 升級" - weight: 101 + sidebar_position: 101 identifier: "upgrade-from-gogs" --- @@ -19,8 +19,6 @@ menu: **目錄** -{{< toc >}} - 若您正在執行 Gogs 0.9.146 以下版本,您可以很簡單地遷移到 Gitea。 請參考下列步驟。在 Linux 系統上請以 Gogs 的使用者身份執行: @@ -80,7 +78,7 @@ menu: 請先升級到 [`gitea 1.6.4`](https://dl.gitea.com/gitea/1.6.4/),先從[下載頁](https://dl.gitea.com/gitea/1.6.4/)下載 您平臺的二進位檔取代既有的。至少執行一次 Gitea 並確認一切符合預期。 -接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.com/gitea/{{< version >}}/)。 +接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.com/gitea/@version@/)。 ## 從更新版本的 Gogs 升級 diff --git a/docs/content/doc/installation/windows-service.en-us.md b/docs/content/installation/windows-service.en-us.md similarity index 97% rename from docs/content/doc/installation/windows-service.en-us.md rename to docs/content/installation/windows-service.en-us.md index d3f5a9abae0b..201681bc039c 100644 --- a/docs/content/doc/installation/windows-service.en-us.md +++ b/docs/content/installation/windows-service.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "Register as a Windows Service" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows Service" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/docs/content/doc/installation/windows-service.fr-fr.md b/docs/content/installation/windows-service.fr-fr.md similarity index 95% rename from docs/content/doc/installation/windows-service.fr-fr.md rename to docs/content/installation/windows-service.fr-fr.md index c4e00b04e134..d0d760629761 100644 --- a/docs/content/doc/installation/windows-service.fr-fr.md +++ b/docs/content/installation/windows-service.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Démarrer en tant que service Windows" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Service Windows" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/docs/content/doc/installation/windows-service.zh-cn.md b/docs/content/installation/windows-service.zh-cn.md similarity index 95% rename from docs/content/doc/installation/windows-service.zh-cn.md rename to docs/content/installation/windows-service.zh-cn.md index 0f2a0f5869ad..f2bff86f0b63 100644 --- a/docs/content/doc/installation/windows-service.zh-cn.md +++ b/docs/content/installation/windows-service.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "注册为Windows服务" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows服务" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/docs/content/doc/installation/windows-service.zh-tw.md b/docs/content/installation/windows-service.zh-tw.md similarity index 96% rename from docs/content/doc/installation/windows-service.zh-tw.md rename to docs/content/installation/windows-service.zh-tw.md index 5764d647fc2a..bd10b71db916 100644 --- a/docs/content/doc/installation/windows-service.zh-tw.md +++ b/docs/content/installation/windows-service.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-21T15:00:00-02:00" title: "註冊為 Windows 服務" slug: "windows-service" -weight: 50 +sidebar_position: 50 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Windows 服務" - weight: 50 + sidebar_position: 50 identifier: "windows-service" --- diff --git a/docs/content/doc/installation/with-docker-rootless.en-us.md b/docs/content/installation/with-docker-rootless.en-us.md similarity index 94% rename from docs/content/doc/installation/with-docker-rootless.en-us.md rename to docs/content/installation/with-docker-rootless.en-us.md index 6c2326b7c9f5..3c81c8633c9c 100644 --- a/docs/content/doc/installation/with-docker-rootless.en-us.md +++ b/docs/content/installation/with-docker-rootless.en-us.md @@ -2,7 +2,7 @@ date: "2020-02-09T20:00:00+02:00" title: "Installation with Docker (rootless)" slug: "install-with-docker-rootless" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "With Docker Rootless" - weight: 60 + sidebar_position: 60 identifier: "install-with-docker-rootless" --- @@ -47,7 +47,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -67,7 +67,7 @@ sudo chown 1000:1000 config/ data/ > If you don't give the volume correct permissions, the container may not start. -For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) +For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:@version@-rootless`, but if you'd like to use the latest development version then `:nightly-rootless` would be an appropriate tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly-rootless` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly-rootless`) ## Custom port @@ -80,7 +80,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -104,7 +104,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless + environment: + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=db:3306 @@ -145,7 +145,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless environment: + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 @@ -193,7 +193,7 @@ version: "2" + services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - - ./data:/var/lib/gitea @@ -220,7 +220,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always + user: 1001 volumes: @@ -282,7 +282,7 @@ docker-compose up -d - Rename folder (inside volume) gitea to custom - Edit app.ini if needed - Set START_SSH_SERVER = true -- Use image gitea/gitea:{{< version >}}-rootless +- Use image gitea/gitea:@version@-rootless ## Managing Deployments With Environment Variables diff --git a/docs/content/doc/installation/with-docker-rootless.zh-cn.md b/docs/content/installation/with-docker-rootless.zh-cn.md similarity index 94% rename from docs/content/doc/installation/with-docker-rootless.zh-cn.md rename to docs/content/installation/with-docker-rootless.zh-cn.md index eca2e4381a5b..1910e0a88400 100644 --- a/docs/content/doc/installation/with-docker-rootless.zh-cn.md +++ b/docs/content/installation/with-docker-rootless.zh-cn.md @@ -2,7 +2,7 @@ date: "2020-02-09T20:00:00+02:00" title: "使用 Docker 安装 (rootless)" slug: "install-with-docker-rootless" -weight: 60 +sidebar_position: 60 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用 Docker 安装 (rootless)" - weight: 60 + sidebar_position: 60 identifier: "install-with-docker-rootless" --- @@ -42,7 +42,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -62,7 +62,7 @@ sudo chown 1000:1000 config/ data/ > 如果未为卷设置正确的权限,容器可能无法启动。 -对于稳定版本,您可以使用 `:latest-rootless`、`:1-rootless`,或指定特定的版本,如: `{{< version >}}-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。 +对于稳定版本,您可以使用 `:latest-rootless`、`:1-rootless`,或指定特定的版本,如: `@version@-rootless`。如果您想使用最新的开发版本,则可以使用 `:dev-rootless` 标签。如果您想运行发布分支的最新提交,可以使用 `:1.x-dev-rootless` 标签,其中 x是 Gitea 的次要版本号(例如:`1.16-dev-rootless`)。 ## 自定义端口 @@ -73,7 +73,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -96,7 +96,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless + environment: + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=db:3306 @@ -136,7 +136,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless environment: + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=db:5432 @@ -181,7 +181,7 @@ version: "2" + services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always volumes: - - ./data:/var/lib/gitea @@ -208,7 +208,7 @@ version: "2" services: server: - image: gitea/gitea:{{< version >}}-rootless + image: gitea/gitea:@version@-rootless restart: always + user: 1001 volumes: @@ -259,7 +259,7 @@ docker-compose up -d - 将卷中的文件夹(gitea)重命名为 custom - 如果需要,编辑 `app.ini` - 设置 `START_SSH_SERVER = true` -- 使用镜像 `gitea/gitea:{{< version >}}-rootless` +- 使用镜像 `gitea/gitea:@version@-rootless` ## 使用环境变量管理部署 diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/installation/with-docker.en-us.md similarity index 98% rename from docs/content/doc/installation/with-docker.en-us.md rename to docs/content/installation/with-docker.en-us.md index 5f49876b8a0b..7b47046031d6 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/installation/with-docker.en-us.md @@ -2,7 +2,7 @@ date: "2020-03-19T19:27:00+02:00" title: "Installation with Docker" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "With Docker" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -25,10 +25,6 @@ This reference setup guides users through the setup based on `docker-compose`, b of `docker-compose` is out of scope of this documentation. To install `docker-compose` itself, follow the official [install instructions](https://docs.docker.com/compose/install/). -**Table of Contents** - -{{< toc >}} - ## Basics The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest` @@ -36,7 +32,7 @@ image as a service. Since there is no database available, one can be initialized Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`. Note that the volume should be owned by the user/group with the UID/GID specified in the config file. If you don't give the volume correct permissions, the container may not start. -For a stable release you can use `:latest`, `:1` or specify a certain release like `:{{< version >}}`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) +For a stable release you can use `:latest`, `:1` or specify a certain release like `:@version@`, but if you'd like to use the latest development version of Gitea then you could use the `:nightly` tag. If you'd like to run the latest commit from a release branch you can use the `:1.x-nightly` tag, where x is the minor version of Gitea. (e.g. `:1.16-nightly`) ```yaml version: "3" @@ -47,7 +43,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -79,7 +75,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -114,7 +110,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -165,7 +161,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -221,7 +217,7 @@ networks: + services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea restart: always networks: diff --git a/docs/content/doc/installation/with-docker.fr-fr.md b/docs/content/installation/with-docker.fr-fr.md similarity index 98% rename from docs/content/doc/installation/with-docker.fr-fr.md rename to docs/content/installation/with-docker.fr-fr.md index 362aa5fc67d2..432add9afd49 100644 --- a/docs/content/doc/installation/with-docker.fr-fr.md +++ b/docs/content/installation/with-docker.fr-fr.md @@ -2,7 +2,7 @@ date: "2017-08-23T09:00:00+02:00" title: "Installation avec Docker" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "Docker" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -19,8 +19,6 @@ menu: Nous fournissons des images Docker mises à jour automatiquement via le Docker Hub de notre organisation. C'est à vous, lors devotre déploiement, de vous assurez d'utiliser toujours la dernière version stable ou d'utiliser un autre service qui met à jour l'image Docker pour vous. -{{< toc >}} - ## Données stockées sur l'hôte Tout d'abord, vous devez simplement récupérer l'image Docker avec la commande suivante : diff --git a/docs/content/doc/installation/with-docker.zh-cn.md b/docs/content/installation/with-docker.zh-cn.md similarity index 97% rename from docs/content/doc/installation/with-docker.zh-cn.md rename to docs/content/installation/with-docker.zh-cn.md index 50acc3ffae12..e04d3158a1c1 100644 --- a/docs/content/doc/installation/with-docker.zh-cn.md +++ b/docs/content/installation/with-docker.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "使用 Docker 安装" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "installation" name: "使用 Docker 安装" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- @@ -21,11 +21,9 @@ Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始 该参考设置指导用户完成基于 `docker-compose` 的设置,但是 `docker-compose` 的安装不在本文档的范围之内。要安装 `docker-compose` 本身,请遵循官方[安装说明](https://docs.docker.com/compose/install/)。 -{{< toc >}} - ## 基本 -最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `{{< version >}}`。 +最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `@version@`。 ```yaml version: "3" @@ -36,7 +34,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -66,7 +64,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -100,7 +98,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -150,7 +148,7 @@ networks: services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea environment: - USER_UID=1000 @@ -203,7 +201,7 @@ networks: + services: server: - image: gitea/gitea:{{< version >}} + image: gitea/gitea:@version@ container_name: gitea restart: always networks: @@ -252,7 +250,7 @@ MySQL 或 PostgreSQL 容器将需要分别创建。 - `DB_HOST`:**localhost:3306**:数据库主机地址和端口。 - `DB_NAME`:**gitea**:数据库名称。 - `DB_USER`:**root**:数据库用户名。 -- `DB_PASSWD`:**"\"** :数据库用户密码。如果您在密码中使用特殊字符,请使用“您的密码”进行引用。 +- `DB_PASSWD`:**"_empty_"** :数据库用户密码。如果您在密码中使用特殊字符,请使用“您的密码”进行引用。 - `INSTALL_LOCK`:**false**:禁止访问安装页面。 - `SECRET_KEY`:**""** :全局密钥。这应该更改。如果它具有一个值并且 `INSTALL_LOCK` 为空,则 `INSTALL_LOCK` 将自动设置为 `true`。 - `DISABLE_REGISTRATION`:**false**:禁用注册,之后只有管理员才能为用户创建帐户。 diff --git a/docs/content/doc/installation/with-docker.zh-tw.md b/docs/content/installation/with-docker.zh-tw.md similarity index 96% rename from docs/content/doc/installation/with-docker.zh-tw.md rename to docs/content/installation/with-docker.zh-tw.md index fdf5a0101dc3..95f5cfffe883 100644 --- a/docs/content/doc/installation/with-docker.zh-tw.md +++ b/docs/content/installation/with-docker.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Docker 安裝" slug: "install-with-docker" -weight: 70 +sidebar_position: 70 toc: false draft: false aliases: @@ -11,14 +11,12 @@ menu: sidebar: parent: "installation" name: "Docker 安裝" - weight: 70 + sidebar_position: 70 identifier: "install-with-docker" --- # 用 Docker 安裝 -{{< toc >}} - 我們在 Docker Hub 提供了自動更新的映像檔,它會保持最新穩定版。根據您的部屬環境來使用最新版本或用其他服務來更新 Docker 映像檔。首先您需要下載映像檔: ``` diff --git a/docs/content/doc/packages.en-us.md b/docs/content/packages.en-us.md similarity index 79% rename from docs/content/doc/packages.en-us.md rename to docs/content/packages.en-us.md index e4a87bdebf62..75c29033ee25 100644 --- a/docs/content/doc/packages.en-us.md +++ b/docs/content/packages.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "Packages" slug: "packages" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Usage - Packages" - weight: 30 + sidebar_position: 30 identifier: "packages" --- diff --git a/docs/content/doc/search.de-de.md b/docs/content/search.de-de.md similarity index 95% rename from docs/content/doc/search.de-de.md rename to docs/content/search.de-de.md index 29c153171e4e..09a1ac22f220 100644 --- a/docs/content/doc/search.de-de.md +++ b/docs/content/search.de-de.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.en-us.md b/docs/content/search.en-us.md similarity index 95% rename from docs/content/doc/search.en-us.md rename to docs/content/search.en-us.md index 60a4898c4289..226d9fe3bc28 100644 --- a/docs/content/doc/search.en-us.md +++ b/docs/content/search.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.fr-fr.md b/docs/content/search.fr-fr.md similarity index 95% rename from docs/content/doc/search.fr-fr.md rename to docs/content/search.fr-fr.md index d3f85c966f3d..25510b7cfdbb 100644 --- a/docs/content/doc/search.fr-fr.md +++ b/docs/content/search.fr-fr.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Chercher" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.nl-nl.md b/docs/content/search.nl-nl.md similarity index 95% rename from docs/content/doc/search.nl-nl.md rename to docs/content/search.nl-nl.md index 9ca7a34d489b..7ebcf28dbf74 100644 --- a/docs/content/doc/search.nl-nl.md +++ b/docs/content/search.nl-nl.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.pt-br.md b/docs/content/search.pt-br.md similarity index 95% rename from docs/content/doc/search.pt-br.md rename to docs/content/search.pt-br.md index 0a70026c23c7..06b215c689fd 100644 --- a/docs/content/doc/search.pt-br.md +++ b/docs/content/search.pt-br.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "Search" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.zh-cn.md b/docs/content/search.zh-cn.md similarity index 95% rename from docs/content/doc/search.zh-cn.md rename to docs/content/search.zh-cn.md index 50415c259e30..6ab5ad08140e 100644 --- a/docs/content/doc/search.zh-cn.md +++ b/docs/content/search.zh-cn.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "搜索" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/search.zh-tw.md b/docs/content/search.zh-tw.md similarity index 95% rename from docs/content/doc/search.zh-tw.md rename to docs/content/search.zh-tw.md index 746cb14c1135..aa8a1ced754e 100644 --- a/docs/content/doc/search.zh-tw.md +++ b/docs/content/search.zh-tw.md @@ -2,7 +2,7 @@ date: "2019-11-12T16:00:00+02:00" title: "搜尋" slug: "search" -weight: 1 +sidebar_position: 1 toc: false draft: false aliases: @@ -12,7 +12,6 @@ sitemap: layout: "search" --- - This file exists solely to respond to /search URL with the related `search` layout template. No content shown here is rendered, all content is based in the template layouts/doc/search.html diff --git a/docs/content/doc/usage.en-us.md b/docs/content/usage.en-us.md similarity index 77% rename from docs/content/doc/usage.en-us.md rename to docs/content/usage.en-us.md index 47a4fdc1d7d4..436d031b4ad3 100644 --- a/docs/content/doc/usage.en-us.md +++ b/docs/content/usage.en-us.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "Usage" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "Usage" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/docs/content/doc/usage.zh-cn.md b/docs/content/usage.zh-cn.md similarity index 78% rename from docs/content/doc/usage.zh-cn.md rename to docs/content/usage.zh-cn.md index 026bef86e991..91e40ced9fa6 100644 --- a/docs/content/doc/usage.zh-cn.md +++ b/docs/content/usage.zh-cn.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "使用指南" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "使用指南" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/docs/content/doc/usage.zh-tw.md b/docs/content/usage.zh-tw.md similarity index 77% rename from docs/content/doc/usage.zh-tw.md rename to docs/content/usage.zh-tw.md index a95e973991ba..795f95c726e7 100644 --- a/docs/content/doc/usage.zh-tw.md +++ b/docs/content/usage.zh-tw.md @@ -2,12 +2,12 @@ date: "2016-12-27T16:00:00+02:00" title: "使用" slug: "usage" -weight: 35 +sidebar_position: 35 toc: false draft: false menu: sidebar: name: "使用" - weight: 30 + sidebar_position: 30 identifier: "usage" --- diff --git a/docs/content/doc/usage/_index.en-us.md b/docs/content/usage/_index.en-us.md similarity index 100% rename from docs/content/doc/usage/_index.en-us.md rename to docs/content/usage/_index.en-us.md diff --git a/docs/content/doc/usage/_index.zh-cn.md b/docs/content/usage/_index.zh-cn.md similarity index 100% rename from docs/content/doc/usage/_index.zh-cn.md rename to docs/content/usage/_index.zh-cn.md diff --git a/docs/content/doc/usage/_index.zh-tw.md b/docs/content/usage/_index.zh-tw.md similarity index 100% rename from docs/content/doc/usage/_index.zh-tw.md rename to docs/content/usage/_index.zh-tw.md diff --git a/docs/content/doc/usage/actions/act-runner.en-us.md b/docs/content/usage/actions/act-runner.en-us.md similarity index 99% rename from docs/content/doc/usage/actions/act-runner.en-us.md rename to docs/content/usage/actions/act-runner.en-us.md index 1f4475508f9c..05ed83c2c488 100644 --- a/docs/content/doc/usage/actions/act-runner.en-us.md +++ b/docs/content/usage/actions/act-runner.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Act Runner" slug: "act-runner" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "actions" name: "Act Runner" - weight: 20 + sidebar_position: 20 identifier: "actions-runner" --- @@ -17,10 +17,6 @@ menu: This page will introduce the [act runner](https://gitea.com/gitea/act_runner) in detail, which is the runner of Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Requirements It is recommended to run jobs in a docker container, so you need to install docker first. diff --git a/docs/content/doc/usage/actions/act-runner.zh-cn.md b/docs/content/usage/actions/act-runner.zh-cn.md similarity index 98% rename from docs/content/doc/usage/actions/act-runner.zh-cn.md rename to docs/content/usage/actions/act-runner.zh-cn.md index cc5728290073..c3978f636135 100644 --- a/docs/content/doc/usage/actions/act-runner.zh-cn.md +++ b/docs/content/usage/actions/act-runner.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Act Runner" slug: "act-runner" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "actions" name: "Act Runner" - weight: 20 + sidebar_position: 20 identifier: "actions-runner" --- @@ -17,10 +17,6 @@ menu: 本页面将详细介绍[Act Runner](https://gitea.com/gitea/act_runner),这是Gitea Actions的Runner。 -**目录** - -{{< toc >}} - ## 要求 建议在Docker容器中运行Job,因此您需要首先安装Docker。 @@ -215,9 +211,9 @@ cache: enabled: true dir: "" # 使用步骤 1. 获取的 LAN IP -host: "192.168.8.17" +host: "192.168.8.17" # 使用步骤 2. 获取的端口号 -port: 8088 +port: 8088 ``` - 4.启动容器时, 将 Cache 端口映射至主机。 @@ -225,7 +221,7 @@ port: 8088 ```bash docker run \ --name gitea-docker-runner \ - -p 8088:8088 \ + -p 8088:8088 \ -d gitea/act_runner:nightly ``` diff --git a/docs/content/doc/usage/actions/comparison.en-us.md b/docs/content/usage/actions/comparison.en-us.md similarity index 97% rename from docs/content/doc/usage/actions/comparison.en-us.md rename to docs/content/usage/actions/comparison.en-us.md index a8545fba44b6..64a5eff4d5a7 100644 --- a/docs/content/doc/usage/actions/comparison.en-us.md +++ b/docs/content/usage/actions/comparison.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Compared to GitHub Actions" slug: "comparison" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "actions" name: "Comparison" - weight: 30 + sidebar_position: 30 identifier: "actions-comparison" --- @@ -17,10 +17,6 @@ menu: Even though Gitea Actions is designed to be compatible with GitHub Actions, there are some differences between them. -**Table of Contents** - -{{< toc >}} - ## Additional features ### Absolute action URLs @@ -132,7 +128,7 @@ The missing host will be filled with `https://gitea.com` if you don't configure That means `uses: actions/checkout@v3` will download the action from [gitea.com/actions/checkout](https://gitea.com/actions/checkout), instead of [github.com/actions/checkout](https://github.com/actions/checkout). As mentioned, it's configurable. -If you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`. See [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#actions-actions" >}}). +If you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`. See [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions). ### Context availability diff --git a/docs/content/doc/usage/actions/comparison.zh-cn.md b/docs/content/usage/actions/comparison.zh-cn.md similarity index 96% rename from docs/content/doc/usage/actions/comparison.zh-cn.md rename to docs/content/usage/actions/comparison.zh-cn.md index 2fc3a23167fc..cfea7970f7d0 100644 --- a/docs/content/doc/usage/actions/comparison.zh-cn.md +++ b/docs/content/usage/actions/comparison.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "与GitHub Actions的对比" slug: "comparison" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "actions" name: "对比" - weight: 30 + sidebar_position: 30 identifier: "actions-comparison" --- @@ -17,10 +17,6 @@ menu: 尽管Gitea Actions旨在与GitHub Actions兼容,但它们之间存在一些差异。 -**目录** - -{{< toc >}} - ## 额外功能 ### Action URL绝对路径 @@ -132,7 +128,7 @@ Gitea Actions默认不从GitHub下载Actions。 这意味着`uses: actions/checkout@v3`将从[gitea.com/actions/checkout](https://gitea.com/actions/checkout)下载该Action,而不是[github.com/actions/checkout](https://github.com/actions/checkout)。 正如前面提到的,这是可配置的。 -如果您希望您的运行程序默认从GitHub或您自己的Gitea实例下载动作,您可以通过设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#actions-actions" >}})。 +如果您希望您的运行程序默认从GitHub或您自己的Gitea实例下载动作,您可以通过设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单](administration/config-cheat-sheet.md#actions-actions)。 ### 上下文可用性 diff --git a/docs/content/doc/usage/actions/design.en-us.md b/docs/content/usage/actions/design.en-us.md similarity index 99% rename from docs/content/doc/usage/actions/design.en-us.md rename to docs/content/usage/actions/design.en-us.md index c996185fe63c..d4c90d54044f 100644 --- a/docs/content/doc/usage/actions/design.en-us.md +++ b/docs/content/usage/actions/design.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Design of Gitea Actions" slug: "design" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "actions" name: "Design" - weight: 40 + sidebar_position: 40 identifier: "actions-design" --- @@ -17,10 +17,6 @@ menu: Gitea Actions has multiple components. This document describes them individually. -**Table of Contents** - -{{< toc >}} - ## Act The [nektos/act](https://github.com/nektos/act) project is an excellent tool that allows you to run your GitHub Actions locally. diff --git a/docs/content/doc/usage/actions/design.zh-cn.md b/docs/content/usage/actions/design.zh-cn.md similarity index 99% rename from docs/content/doc/usage/actions/design.zh-cn.md rename to docs/content/usage/actions/design.zh-cn.md index e1bd1766e729..995e9f0b7fd7 100644 --- a/docs/content/doc/usage/actions/design.zh-cn.md +++ b/docs/content/usage/actions/design.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions设计" slug: "design" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "actions" name: "设计" - weight: 40 + sidebar_position: 40 identifier: "actions-design" --- @@ -17,10 +17,6 @@ menu: Gitea Actions由多个组件组成。本文档将对它们进行逐个描述。 -**目录** - -{{< toc >}} - ## Act [nektos/act](https://github.com/nektos/act) 项目是一个优秀的工具,允许你在本地运行GitHub Actions。 diff --git a/docs/content/doc/usage/actions/faq.en-us.md b/docs/content/usage/actions/faq.en-us.md similarity index 99% rename from docs/content/doc/usage/actions/faq.en-us.md rename to docs/content/usage/actions/faq.en-us.md index 69a4cf3e89ac..d665b05b4b59 100644 --- a/docs/content/doc/usage/actions/faq.en-us.md +++ b/docs/content/usage/actions/faq.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Frequently Asked Questions of Gitea Actions" slug: "faq" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "actions" name: "FAQ" - weight: 100 + sidebar_position: 100 identifier: "actions-faq" --- @@ -17,10 +17,6 @@ menu: This page contains some common questions and answers about Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Why is Actions not enabled by default? We know it's annoying to enable Actions for the whole instance and each repository one by one, but not everyone likes or needs this feature. diff --git a/docs/content/doc/usage/actions/faq.zh-cn.md b/docs/content/usage/actions/faq.zh-cn.md similarity index 99% rename from docs/content/doc/usage/actions/faq.zh-cn.md rename to docs/content/usage/actions/faq.zh-cn.md index ae6edd06f28c..cdfea6d11d67 100644 --- a/docs/content/doc/usage/actions/faq.zh-cn.md +++ b/docs/content/usage/actions/faq.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions常见问题解答" slug: "faq" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "actions" name: "常见问题" - weight: 100 + sidebar_position: 100 identifier: "actions-faq" --- @@ -17,10 +17,6 @@ menu: 本页面包含一些关于Gitea Actions的常见问题和答案。 -**目录** - -{{< toc >}} - ## 为什么默认情况下不启用Actions? 我们知道为整个实例和每个仓库启用Actions可能很麻烦,但并不是每个人都喜欢或需要此功能。 diff --git a/docs/content/doc/usage/actions/overview.en-us.md b/docs/content/usage/actions/overview.en-us.md similarity index 97% rename from docs/content/doc/usage/actions/overview.en-us.md rename to docs/content/usage/actions/overview.en-us.md index e07eca994f8e..59e539f9c1ba 100644 --- a/docs/content/doc/usage/actions/overview.en-us.md +++ b/docs/content/usage/actions/overview.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Gitea Actions" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "actions" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "actions-overview" --- @@ -17,10 +17,6 @@ menu: Starting with Gitea **1.19**, Gitea Actions are available as a built-in CI/CD solution. -**Table of Contents** - -{{< toc >}} - ## Name It is similar and compatible to [GitHub Actions](https://github.com/features/actions), and its name is inspired by it too. diff --git a/docs/content/doc/usage/actions/overview.zh-cn.md b/docs/content/usage/actions/overview.zh-cn.md similarity index 97% rename from docs/content/doc/usage/actions/overview.zh-cn.md rename to docs/content/usage/actions/overview.zh-cn.md index 20814481513e..0e57bf568f8b 100644 --- a/docs/content/doc/usage/actions/overview.zh-cn.md +++ b/docs/content/usage/actions/overview.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "Gitea Actions" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "actions" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "actions-overview" --- @@ -17,10 +17,6 @@ menu: 从Gitea **1.19**版本开始,Gitea Actions成为了内置的CI/CD解决方案。 -**目录** - -{{< toc >}} - ## 名称 Gitea Actions与[GitHub Actions](https://github.com/features/actions)相似且兼容,它的名称也受到了它的启发。 diff --git a/docs/content/doc/usage/actions/quickstart.en-us.md b/docs/content/usage/actions/quickstart.en-us.md similarity index 91% rename from docs/content/doc/usage/actions/quickstart.en-us.md rename to docs/content/usage/actions/quickstart.en-us.md index 829f1a62c0b1..73d90e2e68a8 100644 --- a/docs/content/doc/usage/actions/quickstart.en-us.md +++ b/docs/content/usage/actions/quickstart.en-us.md @@ -2,14 +2,14 @@ date: "2023-04-27T15:00:00+08:00" title: "Quick Start" slug: "quickstart" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "actions" name: "Quick Start" - weight: 10 + sidebar_position: 10 identifier: "actions-quickstart" --- @@ -17,14 +17,10 @@ menu: This page will guide you through the process of using Gitea Actions. -**Table of Contents** - -{{< toc >}} - ## Set up Gitea First of all, you need a Gitea instance. -You can follow the [documentation]({{< relref "doc/installation/from-package.en-us.md" >}}) to set up a new instance or upgrade your existing one. +You can follow the [documentation](installation/from-package.md) to set up a new instance or upgrade your existing one. It doesn't matter how you install or run Gitea, as long as its version is 1.19.0 or higher. Actions are disabled by default, so you need to add the following to the configuration file to enable it: @@ -34,7 +30,7 @@ Actions are disabled by default, so you need to add the following to the configu ENABLED=true ``` -If you want to learn more or encounter any problems while configuring it, please refer to the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#actions-actions" >}}). +If you want to learn more or encounter any problems while configuring it, please refer to the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions). ### Set up runner @@ -89,7 +85,7 @@ And you can see the new runner in the management page: ![view runner](/images/usage/actions/view-runner.png) -You can find more information by visiting [Act runner]({{< relref "doc/usage/actions/act-runner.en-us.md" >}}). +You can find more information by visiting [Act runner](usage/actions/act-runner.md). ### Use Actions @@ -133,7 +129,7 @@ That is because Gitea Actions is designed to be compatible with GitHub Actions Be careful, the demo file contains some emojis. Please make sure your database supports them, especially when using MySQL. If the charset is not `utf8mb4`, errors will occur, such as `Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`. -See [Database Preparation]({{< relref "doc/installation/database-preparation.en-us.md#mysql" >}}) for more information. +See [Database Preparation](installation/database-preparation.md#mysql) for more information. Alternatively, you can remove all emojis from the demo file and try again. diff --git a/docs/content/doc/usage/actions/quickstart.zh-cn.md b/docs/content/usage/actions/quickstart.zh-cn.md similarity index 91% rename from docs/content/doc/usage/actions/quickstart.zh-cn.md rename to docs/content/usage/actions/quickstart.zh-cn.md index 1893300b618f..510d4a904fd1 100644 --- a/docs/content/doc/usage/actions/quickstart.zh-cn.md +++ b/docs/content/usage/actions/quickstart.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-24T15:00:00+08:00" title: "快速入门" slug: "quickstart" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "actions" name: "快速入门" - weight: 10 + sidebar_position: 10 identifier: "actions-quickstart" --- @@ -17,14 +17,10 @@ menu: 本页面将指导您使用Gitea Actions的过程。 -**目录** - -{{< toc >}} - ## 设置Gitea 首先,您需要一个Gitea实例。 -您可以按照[文档]({{< relref "doc/installation/from-package.zh-cn.md" >}}) 来设置一个新实例或升级现有实例。 +您可以按照[文档](installation/from-package.md) 来设置一个新实例或升级现有实例。 无论您如何安装或运行Gitea,只要版本号是1.19.0或更高即可。 默认情况下,Actions是禁用的,因此您需要将以下内容添加到配置文件中以启用它: @@ -34,7 +30,7 @@ menu: ENABLED=true ``` -如果您想了解更多信息或在配置过程中遇到任何问题,请参考[配置速查表]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#actions-actions" >}})。 +如果您想了解更多信息或在配置过程中遇到任何问题,请参考[配置速查表](administration/config-cheat-sheet.md#actions-actions)。 ### 设置Runner @@ -88,7 +84,7 @@ Runner和Job容器(由Runner启动以执行Job)将连接到此地址。 ![view runner](/images/usage/actions/view-runner.png) -您可以通过访问[act runner]({{< relref "doc/usage/actions/act-runner.zh-cn.md" >}}) 获取更多信息。 +您可以通过访问[act runner](usage/actions/act-runner.md) 获取更多信息。 ### 使用Actions @@ -132,7 +128,7 @@ jobs: 请注意,演示文件中包含一些表情符号。 请确保您的数据库支持它们,特别是在使用MySQL时。 如果字符集不是`utf8mb4,将出现错误,例如`Error 1366 (HY000): Incorrect string value: '\\xF0\\x9F\\x8E\\x89 T...' for column 'name' at row 1`。 -有关更多信息,请参阅[数据库准备工作]({{< relref "doc/installation/database-preparation.zh-cn.md#mysql" >}})。 +有关更多信息,请参阅[数据库准备工作](installation/database-preparation.md#mysql)。 或者,您可以从演示文件中删除所有表情符号,然后再尝试一次。 diff --git a/docs/content/doc/usage/agit-support.en-us.md b/docs/content/usage/agit-support.en-us.md similarity index 97% rename from docs/content/doc/usage/agit-support.en-us.md rename to docs/content/usage/agit-support.en-us.md index 30e2879e89b6..25523efe6a62 100644 --- a/docs/content/doc/usage/agit-support.en-us.md +++ b/docs/content/usage/agit-support.en-us.md @@ -2,7 +2,7 @@ date: " 2022-09-01T20:50:42+0000" title: "Agit Setup" slug: "agit-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Agit Setup" - weight: 12 + sidebar_position: 12 identifier: "agit-setup" --- diff --git a/docs/content/doc/usage/agit-support.zh-cn.md b/docs/content/usage/agit-support.zh-cn.md similarity index 96% rename from docs/content/doc/usage/agit-support.zh-cn.md rename to docs/content/usage/agit-support.zh-cn.md index de6eba24b23e..6a2ce1c3736d 100644 --- a/docs/content/doc/usage/agit-support.zh-cn.md +++ b/docs/content/usage/agit-support.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "Agit 设置" slug: "agit-setup" -weight: 12 +sidebar_position: 12 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Agit 设置" - weight: 12 + sidebar_position: 12 identifier: "agit-setup" --- diff --git a/docs/content/doc/usage/authentication.en-us.md b/docs/content/usage/authentication.en-us.md similarity index 99% rename from docs/content/doc/usage/authentication.en-us.md rename to docs/content/usage/authentication.en-us.md index d9648200ef70..d36641421905 100644 --- a/docs/content/doc/usage/authentication.en-us.md +++ b/docs/content/usage/authentication.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Authentication" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,14 +11,12 @@ menu: sidebar: parent: "usage" name: "Authentication" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- # Authentication -{{< toc >}} - ## LDAP (Lightweight Directory Access Protocol) Both the LDAP via BindDN and the simple auth LDAP share the following fields: diff --git a/docs/content/doc/usage/authentication.zh-cn.md b/docs/content/usage/authentication.zh-cn.md similarity index 99% rename from docs/content/doc/usage/authentication.zh-cn.md rename to docs/content/usage/authentication.zh-cn.md index bef78ba649a0..ea9f03b9a0a0 100644 --- a/docs/content/doc/usage/authentication.zh-cn.md +++ b/docs/content/usage/authentication.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "认证" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "认证" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- diff --git a/docs/content/doc/usage/authentication.zh-tw.md b/docs/content/usage/authentication.zh-tw.md similarity index 84% rename from docs/content/doc/usage/authentication.zh-tw.md rename to docs/content/usage/authentication.zh-tw.md index 75959802b1f5..88dc3149145b 100644 --- a/docs/content/doc/usage/authentication.zh-tw.md +++ b/docs/content/usage/authentication.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "認證" slug: "authentication" -weight: 10 +sidebar_position: 10 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "認證" - weight: 10 + sidebar_position: 10 identifier: "authentication" --- diff --git a/docs/content/doc/usage/clone-filter.en-us.md b/docs/content/usage/clone-filter.en-us.md similarity index 96% rename from docs/content/doc/usage/clone-filter.en-us.md rename to docs/content/usage/clone-filter.en-us.md index 8331c138bf5d..c3d4a43e2c9d 100644 --- a/docs/content/doc/usage/clone-filter.en-us.md +++ b/docs/content/usage/clone-filter.en-us.md @@ -2,7 +2,7 @@ date: "2021-02-02" title: "Clone filters (partial clone)" slug: "clone-filters" -weight: 25 +sidebar_position: 25 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Clone filters" - weight: 25 + sidebar_position: 25 identifier: "clone-filters" --- diff --git a/docs/content/doc/usage/clone-filter.zh-cn.md b/docs/content/usage/clone-filter.zh-cn.md similarity index 97% rename from docs/content/doc/usage/clone-filter.zh-cn.md rename to docs/content/usage/clone-filter.zh-cn.md index fc174fcb38c2..53ce060fdfde 100644 --- a/docs/content/doc/usage/clone-filter.zh-cn.md +++ b/docs/content/usage/clone-filter.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "克隆过滤器 (部分克隆)" slug: "clone-filters" -weight: 25 +sidebar_position: 25 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "克隆过滤器" - weight: 25 + sidebar_position: 25 identifier: "clone-filters" --- diff --git a/docs/content/doc/usage/code-owners.en-us.md b/docs/content/usage/code-owners.en-us.md similarity index 96% rename from docs/content/doc/usage/code-owners.en-us.md rename to docs/content/usage/code-owners.en-us.md index 94f81eeae1a3..7642175d8d27 100644 --- a/docs/content/doc/usage/code-owners.en-us.md +++ b/docs/content/usage/code-owners.en-us.md @@ -2,7 +2,7 @@ date: "2023-05-24T16:00:00+00:00" title: "Code Owners" slug: "code-owners" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Code Owners" - weight: 30 + sidebar_position: 30 identifier: "code-owners" --- diff --git a/docs/content/doc/usage/incoming-email.en-us.md b/docs/content/usage/incoming-email.en-us.md similarity index 96% rename from docs/content/doc/usage/incoming-email.en-us.md rename to docs/content/usage/incoming-email.en-us.md index 205b3dd8ed8a..3f20f3b1fefb 100644 --- a/docs/content/doc/usage/incoming-email.en-us.md +++ b/docs/content/usage/incoming-email.en-us.md @@ -2,7 +2,7 @@ date: "2022-12-01T00:00:00+00:00" title: "Incoming Email" slug: "incoming-email" -weight: 13 +sidebar_position: 13 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Incoming Email" - weight: 13 + sidebar_position: 13 identifier: "incoming-email" --- @@ -19,10 +19,6 @@ menu: Gitea supports the execution of several actions through incoming mails. This page describes how to set this up. -**Table of Contents** - -{{< toc >}} - ## Requirements Handling incoming email messages requires an IMAP-enabled email account. diff --git a/docs/content/doc/usage/incoming-email.zh-cn.md b/docs/content/usage/incoming-email.zh-cn.md similarity index 97% rename from docs/content/doc/usage/incoming-email.zh-cn.md rename to docs/content/usage/incoming-email.zh-cn.md index 335e6aa9e2a0..7aeb3c086676 100644 --- a/docs/content/doc/usage/incoming-email.zh-cn.md +++ b/docs/content/usage/incoming-email.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "邮件接收" slug: "incoming-email" -weight: 13 +sidebar_position: 13 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "邮件接收" - weight: 13 + sidebar_position: 13 identifier: "incoming-email" --- @@ -19,10 +19,6 @@ menu: Gitea 支持通过接收邮件执行多种操作。本页面描述了如何进行设置。 -**目录** - -{{< toc >}} - ## 要求 处理接收的电子邮件需要启用 IMAP 功能的电子邮件帐户。 diff --git a/docs/content/doc/usage/issue-pull-request-templates.en-us.md b/docs/content/usage/issue-pull-request-templates.en-us.md similarity index 99% rename from docs/content/doc/usage/issue-pull-request-templates.en-us.md rename to docs/content/usage/issue-pull-request-templates.en-us.md index b48763cf8e0a..34475e346588 100644 --- a/docs/content/doc/usage/issue-pull-request-templates.en-us.md +++ b/docs/content/usage/issue-pull-request-templates.en-us.md @@ -2,7 +2,7 @@ date: "2018-05-10T16:00:00+02:00" title: "Issue and Pull Request templates" slug: "issue-pull-request-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Issue and Pull Request templates" - weight: 15 + sidebar_position: 15 identifier: "issue-pull-request-templates" --- # Issue and Pull Request Templates -**Table of Contents** - -{{< toc >}} - Some projects have a standard list of questions that users need to answer when creating an issue or pull request. Gitea supports adding templates to the main branch of the repository so that they can autopopulate the form when users are diff --git a/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md b/docs/content/usage/issue-pull-request-templates.zh-cn.md similarity index 99% rename from docs/content/doc/usage/issue-pull-request-templates.zh-cn.md rename to docs/content/usage/issue-pull-request-templates.zh-cn.md index fa5b37126fa3..fe865e33583a 100644 --- a/docs/content/doc/usage/issue-pull-request-templates.zh-cn.md +++ b/docs/content/usage/issue-pull-request-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2022-09-07T16:00:00+08:00" title: "工单与合并请求模板" slug: "issue-pull-request-templates" -weight: 15 +sidebar_position: 15 toc: true draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "工单与合并请求模板" - weight: 15 + sidebar_position: 15 identifier: "issue-pull-request-templates" --- @@ -19,10 +19,6 @@ menu: 开发者可以利用问题模板创建工单与合并请求,其目的在于规范参与者的语言表达。 -**目录** - -{{< toc >}} - ## 模板介绍 Gitea 支持两种格式的模板:Markdown 和 YAML。 diff --git a/docs/content/doc/usage/labels.en-us.md b/docs/content/usage/labels.en-us.md similarity index 97% rename from docs/content/doc/usage/labels.en-us.md rename to docs/content/usage/labels.en-us.md index 8467f7e03724..4058ca14e4e9 100644 --- a/docs/content/doc/usage/labels.en-us.md +++ b/docs/content/usage/labels.en-us.md @@ -2,7 +2,7 @@ date: "2023-03-04T19:00:00+00:00" title: "Labels" slug: "labels" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Labels" - weight: 13 + sidebar_position: 13 identifier: "labels" --- diff --git a/docs/content/doc/usage/labels.zh-cn.md b/docs/content/usage/labels.zh-cn.md similarity index 97% rename from docs/content/doc/usage/labels.zh-cn.md rename to docs/content/usage/labels.zh-cn.md index 07dd2bf85437..27c7d84fbd35 100644 --- a/docs/content/doc/usage/labels.zh-cn.md +++ b/docs/content/usage/labels.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "标签" slug: "labels" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "标签" - weight: 13 + sidebar_position: 13 identifier: "labels" --- diff --git a/docs/content/doc/usage/linked-references.en-us.md b/docs/content/usage/linked-references.en-us.md similarity index 99% rename from docs/content/doc/usage/linked-references.en-us.md rename to docs/content/usage/linked-references.en-us.md index 4e9519301521..a05a07a95eb8 100644 --- a/docs/content/doc/usage/linked-references.en-us.md +++ b/docs/content/usage/linked-references.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-21T17:00:00-03:00" title: "Automatically Linked References" slug: "automatically-linked-references" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Automatically Linked References" - weight: 15 + sidebar_position: 15 identifier: "automatically-linked-references" --- # Automatically Linked References in Issues, Pull Requests and Commit Messages -**Table of Contents** - -{{< toc >}} - When an issue, pull request or comment is posted, the text description is parsed in search for references. These references will be shown as links in the Issue View and, in some cases, produce certain _actions_. diff --git a/docs/content/doc/usage/linked-references.zh-cn.md b/docs/content/usage/linked-references.zh-cn.md similarity index 99% rename from docs/content/doc/usage/linked-references.zh-cn.md rename to docs/content/usage/linked-references.zh-cn.md index e56584738711..3cc8dca0b4f2 100644 --- a/docs/content/doc/usage/linked-references.zh-cn.md +++ b/docs/content/usage/linked-references.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "自动链接引用" slug: "automatically-linked-references" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "自动链接引用s" - weight: 15 + sidebar_position: 15 identifier: "automatically-linked-references" --- # 在工单、合并请求和提交消息中的自动链接引用 -**目录** - -{{< toc >}} - 当发布工单、合并请求或评论时,文本描述会被解析以查找引用。这些引用将显示为工单视图中的链接,并且在某些情况下会触发特定的“操作”。 类似地,当列出提交消息时,它们也会被解析,并且当它们被推送到主分支时可以触发“操作”。 diff --git a/docs/content/doc/usage/merge-message-templates.en-us.md b/docs/content/usage/merge-message-templates.en-us.md similarity index 96% rename from docs/content/doc/usage/merge-message-templates.en-us.md rename to docs/content/usage/merge-message-templates.en-us.md index 03095a3bbef8..fbdbd136f858 100644 --- a/docs/content/doc/usage/merge-message-templates.en-us.md +++ b/docs/content/usage/merge-message-templates.en-us.md @@ -2,7 +2,7 @@ date: "2022-08-31T17:35:40+08:00" title: "Merge Message templates" slug: "merge-message-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Merge Message templates" - weight: 15 + sidebar_position: 15 identifier: "merge-message-templates" --- # Merge Message templates -**Table of Contents** - -{{< toc >}} - ## File names Possible file names for PR default merge message templates: diff --git a/docs/content/doc/usage/merge-message-templates.zh-cn.md b/docs/content/usage/merge-message-templates.zh-cn.md similarity index 97% rename from docs/content/doc/usage/merge-message-templates.zh-cn.md rename to docs/content/usage/merge-message-templates.zh-cn.md index 0ec4eee483c9..0923e637a57d 100644 --- a/docs/content/doc/usage/merge-message-templates.zh-cn.md +++ b/docs/content/usage/merge-message-templates.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "合并消息模板" slug: "merge-message-templates" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "合并消息模板" - weight: 15 + sidebar_position: 15 identifier: "merge-message-templates" --- # 合并消息模板 -**目录** - -{{< toc >}} - ## 文件名 PR 默认合并消息模板可能的文件名: diff --git a/docs/content/doc/usage/packages/_index.en-us.md b/docs/content/usage/packages/_index.en-us.md similarity index 100% rename from docs/content/doc/usage/packages/_index.en-us.md rename to docs/content/usage/packages/_index.en-us.md diff --git a/docs/content/doc/usage/packages/alpine.en-us.md b/docs/content/usage/packages/alpine.en-us.md similarity index 92% rename from docs/content/doc/usage/packages/alpine.en-us.md rename to docs/content/usage/packages/alpine.en-us.md index f7d2c66586d2..1fcbe848537a 100644 --- a/docs/content/doc/usage/packages/alpine.en-us.md +++ b/docs/content/usage/packages/alpine.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Alpine" - weight: 4 + sidebar_position: 4 identifier: "alpine" --- @@ -16,10 +16,6 @@ menu: Publish [Alpine](https://pkgs.alpinelinux.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Alpine registry, you need to use a HTTP client like `curl` to upload and a package manager like `apk` to consume packages. @@ -40,7 +36,7 @@ https://gitea.example.com/api/packages/{owner}/alpine// | `branch` | The branch to use. | | `repository` | The repository to use. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ``` https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/alpine// @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/alpine/v3.17/main ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package file first. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/alpine.zh-cn.md b/docs/content/usage/packages/alpine.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/alpine.zh-cn.md rename to docs/content/usage/packages/alpine.zh-cn.md index fd9470525d57..cca002caf4f0 100644 --- a/docs/content/doc/usage/packages/alpine.zh-cn.md +++ b/docs/content/usage/packages/alpine.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Alpine" - weight: 4 + sidebar_position: 4 identifier: "alpine" --- @@ -16,10 +16,6 @@ menu: 在您的用户或组织中发布 [Alpine](https://pkgs.alpinelinux.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Alpine 注册表,您需要使用像 curl 这样的 HTTP 客户端来上传包,并使用像 apk 这样的包管理器来消费包。 @@ -40,7 +36,7 @@ https://gitea.example.com/api/packages/{owner}/alpine// | `branch` | 要使用的分支名 | | `repository` | 要使用的仓库名 | -如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ``` https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/alpine// @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/alpine/v3.17/main ``` -如果您使用的是双重身份验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#authentication" >}})代替密码。 +如果您使用的是双重身份验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#authentication)代替密码。 您不能将具有相同名称的文件两次发布到一个包中。您必须首先删除现有的包文件。 服务器将以以下的 HTTP 状态码响应: diff --git a/docs/content/doc/usage/packages/cargo.en-us.md b/docs/content/usage/packages/cargo.en-us.md similarity index 94% rename from docs/content/doc/usage/packages/cargo.en-us.md rename to docs/content/usage/packages/cargo.en-us.md index d341eb9f8327..d5c2fab6fd45 100644 --- a/docs/content/doc/usage/packages/cargo.en-us.md +++ b/docs/content/usage/packages/cargo.en-us.md @@ -2,14 +2,14 @@ date: "2022-11-20T00:00:00+00:00" title: "Cargo Package Registry" slug: "cargo" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Cargo" - weight: 5 + sidebar_position: 5 identifier: "cargo" --- @@ -17,10 +17,6 @@ menu: Publish [Cargo](https://doc.rust-lang.org/stable/cargo/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Cargo package registry, you need [Rust and Cargo](https://www.rust-lang.org/tools/install). @@ -74,7 +70,7 @@ token = "Bearer {token}" | Parameter | Description | | --------- | ----------- | -| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) | +| `token` | Your [personal access token](development/api-usage.md#authentication) | ## Publish a package diff --git a/docs/content/doc/usage/packages/cargo.zh-cn.md b/docs/content/usage/packages/cargo.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/cargo.zh-cn.md rename to docs/content/usage/packages/cargo.zh-cn.md index 2d451716d139..126dfd370a33 100644 --- a/docs/content/doc/usage/packages/cargo.zh-cn.md +++ b/docs/content/usage/packages/cargo.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-11-20T00:00:00+00:00" title: "Cargo 软件包注册表" slug: "cargo" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Cargo" - weight: 5 + sidebar_position: 5 identifier: "cargo" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Cargo](https://doc.rust-lang.org/stable/cargo/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 若要使用 Cargo 软件包注册表, 您需要安装 [Rust 和 Cargo](https://www.rust-lang.org/tools/install). @@ -74,7 +70,7 @@ token = "Bearer {token}" | 参数 | 描述 | | ------- | ------------------------------------------------------------------------------------- | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | ## 发布软件包 diff --git a/docs/content/doc/usage/packages/chef.en-us.md b/docs/content/usage/packages/chef.en-us.md similarity index 97% rename from docs/content/doc/usage/packages/chef.en-us.md rename to docs/content/usage/packages/chef.en-us.md index ee7795755163..9f23b9eac805 100644 --- a/docs/content/doc/usage/packages/chef.en-us.md +++ b/docs/content/usage/packages/chef.en-us.md @@ -2,14 +2,14 @@ date: "2023-01-20T00:00:00+00:00" title: "Chef Package Registry" slug: "chef" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Chef" - weight: 5 + sidebar_position: 5 identifier: "chef" --- @@ -17,10 +17,6 @@ menu: Publish [Chef](https://chef.io/) cookbooks for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Chef package registry, you have to use [`knife`](https://docs.chef.io/workstation/knife/). diff --git a/docs/content/doc/usage/packages/chef.zh-cn.md b/docs/content/usage/packages/chef.zh-cn.md similarity index 98% rename from docs/content/doc/usage/packages/chef.zh-cn.md rename to docs/content/usage/packages/chef.zh-cn.md index 939c94b42977..d76b33c13ef3 100644 --- a/docs/content/doc/usage/packages/chef.zh-cn.md +++ b/docs/content/usage/packages/chef.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-01-20T00:00:00+00:00" title: "Chef 软件包注册表" slug: "chef" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Chef" - weight: 5 + sidebar_position: 5 identifier: "chef" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Chef](https://chef.io/) cookbooks。 -**目录** - -{{< toc >}} - ## 要求 要使用 Chef 软件包注册表,您需要使用 [`knife`](https://docs.chef.io/workstation/knife/). diff --git a/docs/content/doc/usage/packages/composer.en-us.md b/docs/content/usage/packages/composer.en-us.md similarity index 93% rename from docs/content/doc/usage/packages/composer.en-us.md rename to docs/content/usage/packages/composer.en-us.md index 092518c9f0e8..7fbd77ef5d73 100644 --- a/docs/content/doc/usage/packages/composer.en-us.md +++ b/docs/content/usage/packages/composer.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Composer Package Registry" slug: "composer" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "packages" name: "Composer" - weight: 10 + sidebar_position: 10 identifier: "composer" --- @@ -17,10 +17,6 @@ menu: Publish [Composer](https://getcomposer.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Composer package registry, you can use [Composer](https://getcomposer.org/download/) to consume and a HTTP upload client like `curl` to publish packages. @@ -61,7 +57,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/composer?version=1.0.3 ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/composer.zh-cn.md b/docs/content/usage/packages/composer.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/composer.zh-cn.md rename to docs/content/usage/packages/composer.zh-cn.md index de19f7130590..c37e46b57aae 100644 --- a/docs/content/doc/usage/packages/composer.zh-cn.md +++ b/docs/content/usage/packages/composer.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Composer 软件包注册表" slug: "composer" -weight: 10 +sidebar_position: 10 draft: false toc: false menu: sidebar: parent: "packages" name: "Composer" - weight: 10 + sidebar_position: 10 identifier: "composer" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Composer](https://getcomposer.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Composer 软件包注册表,您可以使用 [Composer](https://getcomposer.org/download/) 消费,并使用类似 `curl` 的 HTTP 上传客户端发布软件包。 @@ -61,7 +57,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/composer?version=1.0.3 ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 服务器将以以下 HTTP 状态码响应。 diff --git a/docs/content/doc/usage/packages/conan.en-us.md b/docs/content/usage/packages/conan.en-us.md similarity index 91% rename from docs/content/doc/usage/packages/conan.en-us.md rename to docs/content/usage/packages/conan.en-us.md index 5ca3ca7a26f0..24c7077a88dc 100644 --- a/docs/content/doc/usage/packages/conan.en-us.md +++ b/docs/content/usage/packages/conan.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Conan Package Registry" slug: "conan" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "packages" name: "Conan" - weight: 20 + sidebar_position: 20 identifier: "conan" --- @@ -17,10 +17,6 @@ menu: Publish [Conan](https://conan.io/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Conan package registry, you need to use the [conan](https://conan.io/downloads.html) command line tool to consume and publish packages. @@ -38,7 +34,7 @@ conan user --remote {remote} --password {password} {username} | -----------| ----------- | | `remote` | The remote name. | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | For example: diff --git a/docs/content/doc/usage/packages/conan.zh-cn.md b/docs/content/usage/packages/conan.zh-cn.md similarity index 93% rename from docs/content/doc/usage/packages/conan.zh-cn.md rename to docs/content/usage/packages/conan.zh-cn.md index 3d3aa8a298fb..4856002525bf 100644 --- a/docs/content/doc/usage/packages/conan.zh-cn.md +++ b/docs/content/usage/packages/conan.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Conan 软件包注册表" slug: "conan" -weight: 20 +sidebar_position: 20 draft: false toc: false menu: sidebar: parent: "packages" name: "Conan" - weight: 20 + sidebar_position: 20 identifier: "conan" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Conan](https://conan.io/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 [conan](https://conan.io/downloads.html) 软件包注册表,您需要使用 conan 命令行工具来消费和发布软件包。 @@ -38,7 +34,7 @@ conan user --remote {remote} --password {password} {username} | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | `remote` | 远程名称。 | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 | +| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 | | `owner` | 软件包的所有者。 | 例如: diff --git a/docs/content/doc/usage/packages/conda.en-us.md b/docs/content/usage/packages/conda.en-us.md similarity index 97% rename from docs/content/doc/usage/packages/conda.en-us.md rename to docs/content/usage/packages/conda.en-us.md index 6178b6237dd9..5b6f97679c1d 100644 --- a/docs/content/doc/usage/packages/conda.en-us.md +++ b/docs/content/usage/packages/conda.en-us.md @@ -2,14 +2,14 @@ date: "2022-12-28T00:00:00+00:00" title: "Conda Package Registry" slug: "conda" -weight: 25 +sidebar_position: 25 draft: false toc: false menu: sidebar: parent: "packages" name: "Conda" - weight: 25 + sidebar_position: 25 identifier: "conda" --- @@ -17,10 +17,6 @@ menu: Publish [Conda](https://docs.conda.io/en/latest/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Conda package registry, you need to use [conda](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html). diff --git a/docs/content/doc/usage/packages/conda.zh-cn.md b/docs/content/usage/packages/conda.zh-cn.md similarity index 98% rename from docs/content/doc/usage/packages/conda.zh-cn.md rename to docs/content/usage/packages/conda.zh-cn.md index 721c2761caca..6b385d25751c 100644 --- a/docs/content/doc/usage/packages/conda.zh-cn.md +++ b/docs/content/usage/packages/conda.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-12-28T00:00:00+00:00" title: "Conda 软件包注册表" slug: "conda" -weight: 25 +sidebar_position: 25 draft: false toc: false menu: sidebar: parent: "packages" name: "Conda" - weight: 25 + sidebar_position: 25 identifier: "conda" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Conda](https://docs.conda.io/en/latest/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Conda 软件包注册表,您需要使用 [conda](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html) 命令行工具。 diff --git a/docs/content/doc/usage/packages/container.en-us.md b/docs/content/usage/packages/container.en-us.md similarity index 90% rename from docs/content/doc/usage/packages/container.en-us.md rename to docs/content/usage/packages/container.en-us.md index 457e6fb1a473..6be21c2b276f 100644 --- a/docs/content/doc/usage/packages/container.en-us.md +++ b/docs/content/usage/packages/container.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Container Registry" slug: "container" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "packages" name: "Container Registry" - weight: 30 + sidebar_position: 30 identifier: "container" --- @@ -18,10 +18,6 @@ menu: Publish [Open Container Initiative](https://opencontainers.org/) compliant images for your user or organization. The container registry follows the OCI specs and supports all compatible images like [Docker](https://www.docker.com/) and [Helm Charts](https://helm.sh/). -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Container registry, you can use the tools for your specific image type. @@ -35,7 +31,7 @@ To push an image or if the image is in a private registry, you have to authentic docker login gitea.example.com ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. ## Image naming convention diff --git a/docs/content/doc/usage/packages/container.zh-cn.md b/docs/content/usage/packages/container.zh-cn.md similarity index 92% rename from docs/content/doc/usage/packages/container.zh-cn.md rename to docs/content/usage/packages/container.zh-cn.md index d441a8107826..28e4835a3d45 100644 --- a/docs/content/doc/usage/packages/container.zh-cn.md +++ b/docs/content/usage/packages/container.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "容器注册表" slug: "container" -weight: 30 +sidebar_position: 30 draft: false toc: false menu: sidebar: parent: "packages" name: "容器" - weight: 30 + sidebar_position: 30 identifier: "container" --- @@ -18,10 +18,6 @@ menu: 为您的用户或组织发布符合 [Open Container Initiative(OCI)](https://opencontainers.org/) 规范的镜像。 该容器注册表遵循 OCI 规范,并支持所有兼容的镜像类型,如 [Docker](https://www.docker.com/) 和 [Helm Charts](https://helm.sh/)。 -**目录** - -{{< toc >}} - ## 目录 要使用容器注册表,您可以使用适用于特定镜像类型的工具。 @@ -35,7 +31,7 @@ menu: docker login gitea.example.com ``` -如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 +如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 ## 镜像命名约定 diff --git a/docs/content/doc/usage/packages/cran.en-us.md b/docs/content/usage/packages/cran.en-us.md similarity index 97% rename from docs/content/doc/usage/packages/cran.en-us.md rename to docs/content/usage/packages/cran.en-us.md index fafe49429b5a..68de425d2167 100644 --- a/docs/content/doc/usage/packages/cran.en-us.md +++ b/docs/content/usage/packages/cran.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "CRAN" - weight: 35 + sidebar_position: 35 identifier: "cran" --- @@ -16,10 +16,6 @@ menu: Publish [R](https://www.r-project.org/) packages to a [CRAN](https://cran.r-project.org/)-like registry for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the CRAN package registry, you need to install [R](https://cran.r-project.org/). diff --git a/docs/content/doc/usage/packages/cran.zh-cn.md b/docs/content/usage/packages/cran.zh-cn.md similarity index 98% rename from docs/content/doc/usage/packages/cran.zh-cn.md rename to docs/content/usage/packages/cran.zh-cn.md index fec9a56feb19..c8e32a64c041 100644 --- a/docs/content/doc/usage/packages/cran.zh-cn.md +++ b/docs/content/usage/packages/cran.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "CRAN" - weight: 35 + sidebar_position: 35 identifier: "cran" --- @@ -16,10 +16,6 @@ menu: 将 [R](https://www.r-project.org/) 软件包发布到您的用户或组织的类似 [CRAN](https://cran.r-project.org/) 的注册表。 -**目录** - -{{< toc >}} - ## 要求 要使用CRAN软件包注册表,您需要安装 [R](https://cran.r-project.org/)。 diff --git a/docs/content/doc/usage/packages/debian.en-us.md b/docs/content/usage/packages/debian.en-us.md similarity index 92% rename from docs/content/doc/usage/packages/debian.en-us.md rename to docs/content/usage/packages/debian.en-us.md index 239fd8c1740e..6bd7475dd641 100644 --- a/docs/content/doc/usage/packages/debian.en-us.md +++ b/docs/content/usage/packages/debian.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Debian" - weight: 35 + sidebar_position: 35 identifier: "debian" --- @@ -16,10 +16,6 @@ menu: Publish [Debian](https://www.debian.org/distrib/packages) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Debian registry, you need to use a HTTP client like `curl` to upload and a package manager like `apt` to consume packages. @@ -40,7 +36,7 @@ echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} { | `distribution` | The distribution to use. | | `component` | The component to use. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ```shell echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package version first. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/debian.zh-cn.md b/docs/content/usage/packages/debian.zh-cn.md similarity index 93% rename from docs/content/doc/usage/packages/debian.zh-cn.md rename to docs/content/usage/packages/debian.zh-cn.md index 57b8a9e4aeca..417b79f703d4 100644 --- a/docs/content/doc/usage/packages/debian.zh-cn.md +++ b/docs/content/usage/packages/debian.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "Debian" - weight: 35 + sidebar_position: 35 identifier: "debian" --- @@ -16,10 +16,6 @@ menu: 为您的用户或组织发布 [Debian](https://www.debian.org/distrib/packages) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Debian 注册表,您需要使用类似于 `curl` 的 HTTP 客户端进行上传,并使用类似于 `apt` 的软件包管理器消费软件包。 @@ -40,7 +36,7 @@ echo "deb https://gitea.example.com/api/packages/{owner}/debian {distribution} { | `distribution` | 要使用的发行版 | | `component` | 要使用的组件 | -如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在 URL 中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ```shell echo "deb https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/debian {distribution} {component}" | sudo tee -a /etc/apt/sources.list.d/gitea.list @@ -80,7 +76,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/debian/pool/bionic/main/upload ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 您无法向软件包中多次发布具有相同名称的文件。您必须首先删除现有的软件包版本。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/docs/content/doc/usage/packages/generic.en-us.md b/docs/content/usage/packages/generic.en-us.md similarity index 93% rename from docs/content/doc/usage/packages/generic.en-us.md rename to docs/content/usage/packages/generic.en-us.md index 9ff893072291..04be6e3597ce 100644 --- a/docs/content/doc/usage/packages/generic.en-us.md +++ b/docs/content/usage/packages/generic.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Generic Package Registry" slug: "generic" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "packages" name: "Generic" - weight: 40 + sidebar_position: 40 identifier: "generic" --- @@ -17,13 +17,9 @@ menu: Publish generic files, like release binaries or other output, for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Authenticate to the package registry -To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). +To authenticate to the Package Registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication). ## Publish a package @@ -49,7 +45,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/generic.zh-cn.md b/docs/content/usage/packages/generic.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/generic.zh-cn.md rename to docs/content/usage/packages/generic.zh-cn.md index ce5cdcb7aec9..f20f7ac4180b 100644 --- a/docs/content/doc/usage/packages/generic.zh-cn.md +++ b/docs/content/usage/packages/generic.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "通用软件包注册表" slug: "generic" -weight: 40 +sidebar_position: 40 draft: false toc: false menu: sidebar: parent: "packages" name: "通用" - weight: 40 + sidebar_position: 40 identifier: "generic" --- @@ -17,13 +17,9 @@ menu: 发布通用文件,如发布二进制文件或其他输出,供您的用户或组织使用。 -**目录** - -{{< toc >}} - ## 身份验证软件包注册表 -要身份验证软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +要身份验证软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证](development/api-usage.md#通过-api-认证)。 ## 发布软件包 @@ -49,7 +45,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/generic/test_package/1.0.0/file.bin ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/docs/content/doc/usage/packages/go.en-us.md b/docs/content/usage/packages/go.en-us.md similarity index 86% rename from docs/content/doc/usage/packages/go.en-us.md rename to docs/content/usage/packages/go.en-us.md index 04452c35168c..7c4069248ea6 100644 --- a/docs/content/doc/usage/packages/go.en-us.md +++ b/docs/content/usage/packages/go.en-us.md @@ -2,14 +2,14 @@ date: "2023-05-10T00:00:00+00:00" title: "Go Package Registry" slug: "go" -weight: 45 +sidebar_position: 45 draft: false toc: false menu: sidebar: parent: "packages" name: "Go" - weight: 45 + sidebar_position: 45 identifier: "go" --- @@ -17,10 +17,6 @@ menu: Publish Go packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Publish a package To publish a Go package perform a HTTP `PUT` operation with the package content in the request body. @@ -35,7 +31,7 @@ PUT https://gitea.example.com/api/packages/{owner}/go/upload | --------- | ----------- | | `owner` | The owner of the package. | -To authenticate to the package registry, you need to provide [custom HTTP headers or use HTTP Basic authentication]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +To authenticate to the package registry, you need to provide [custom HTTP headers or use HTTP Basic authentication](development/api-usage.md#authentication): ```shell curl --user your_username:your_password_or_token \ @@ -43,7 +39,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/go/upload ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/go.zh-cn.md b/docs/content/usage/packages/go.zh-cn.md similarity index 89% rename from docs/content/doc/usage/packages/go.zh-cn.md rename to docs/content/usage/packages/go.zh-cn.md index 069a6991fbac..ddc7b837b052 100644 --- a/docs/content/doc/usage/packages/go.zh-cn.md +++ b/docs/content/usage/packages/go.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-10T00:00:00+00:00" title: "Go 软件包注册表" slug: "go" -weight: 45 +sidebar_position: 45 draft: false toc: false menu: sidebar: parent: "packages" name: "Go" - weight: 45 + sidebar_position: 45 identifier: "go" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 Go 软件包。 -**目录** - -{{< toc >}} - ## 发布软件包 要发布 Go 软件包,请执行 HTTP `PUT` 操作,并将软件包内容放入请求主体中。 @@ -35,7 +31,7 @@ PUT https://gitea.example.com/api/packages/{owner}/go/upload | ------- | -------------- | | `owner` | 软件包的所有者 | -要身份验证到软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +要身份验证到软件包注册表,您需要提供[自定义 HTTP 头或使用 HTTP 基本身份验证](development/api-usage.md#通过-api-认证): ```shell curl --user your_username:your_password_or_token \ @@ -43,7 +39,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/go/upload ``` -如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 +如果您使用的是 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 服务器将使用以下 HTTP 状态代码进行响应。 diff --git a/docs/content/doc/usage/packages/helm.en-us.md b/docs/content/usage/packages/helm.en-us.md similarity index 90% rename from docs/content/doc/usage/packages/helm.en-us.md rename to docs/content/usage/packages/helm.en-us.md index 1db1e8758b28..a9fe6be89d8e 100644 --- a/docs/content/doc/usage/packages/helm.en-us.md +++ b/docs/content/usage/packages/helm.en-us.md @@ -2,14 +2,14 @@ date: "2022-04-14T00:00:00+00:00" title: "Helm Chart Registry" slug: "helm" -weight: 50 +sidebar_position: 50 draft: false toc: false menu: sidebar: parent: "packages" name: "Helm" - weight: 50 + sidebar_position: 50 identifier: "helm" --- @@ -17,10 +17,6 @@ menu: Publish [Helm](https://helm.sh/) charts for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Helm Chart registry use a simple HTTP client like `curl` or the [`helm cm-push`](https://github.com/chartmuseum/helm-push/) plugin. @@ -43,7 +39,7 @@ helm cm-push ./{chart_file}.tgz {repo} | Parameter | Description | | ------------ | ----------- | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | | `repo` | The name for the repository. | | `chart_file` | The Helm Chart archive. | | `owner` | The owner of the package. | diff --git a/docs/content/doc/usage/packages/helm.zh-cn.md b/docs/content/usage/packages/helm.zh-cn.md similarity index 93% rename from docs/content/doc/usage/packages/helm.zh-cn.md rename to docs/content/usage/packages/helm.zh-cn.md index 337170bc26c6..ea9105e63dac 100644 --- a/docs/content/doc/usage/packages/helm.zh-cn.md +++ b/docs/content/usage/packages/helm.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-04-14T00:00:00+00:00" title: "Helm Chart 注册表" slug: "helm" -weight: 50 +sidebar_position: 50 draft: false toc: false menu: sidebar: parent: "packages" name: "Helm" - weight: 50 + sidebar_position: 50 identifier: "helm" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Helm](https://helm.sh/) charts。 -**目录** - -{{< toc >}} - ## 要求 要使用 Helm Chart 注册表,可以使用诸如 `curl` 或 [`helm cm-push`](https://github.com/chartmuseum/helm-push/) 插件之类的简单HTTP客户端。 @@ -43,7 +39,7 @@ helm cm-push ./{chart_file}.tgz {repo} | 参数 | 描述 | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `username` | 您的Gitea用户名 | -| `password` | 您的Gitea密码。如果您使用的是2FA或OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码进行身份验证。 | +| `password` | 您的Gitea密码。如果您使用的是2FA或OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码进行身份验证。 | | `repo` | 仓库名称 | | `chart_file` | Helm Chart 归档文件 | | `owner` | 软件包的所有者 | diff --git a/docs/content/doc/usage/packages/maven.en-us.md b/docs/content/usage/packages/maven.en-us.md similarity index 95% rename from docs/content/doc/usage/packages/maven.en-us.md rename to docs/content/usage/packages/maven.en-us.md index 85b37fe464b5..59e71c87ccfb 100644 --- a/docs/content/doc/usage/packages/maven.en-us.md +++ b/docs/content/usage/packages/maven.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Maven Package Registry" slug: "maven" -weight: 60 +sidebar_position: 60 draft: false toc: false menu: sidebar: parent: "packages" name: "Maven" - weight: 60 + sidebar_position: 60 identifier: "maven" --- @@ -17,10 +17,6 @@ menu: Publish [Maven](https://maven.apache.org) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Maven package registry, you can use [Maven](https://maven.apache.org/install.html) or [Gradle](https://gradle.org/install/). @@ -71,7 +67,7 @@ Afterwards add the following sections to your project `pom.xml` file: | Parameter | Description | | -------------- | ----------- | -| `access_token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). | +| `access_token` | Your [personal access token](development/api-usage.md#authentication). | | `owner` | The owner of the package. | ### Gradle variant diff --git a/docs/content/doc/usage/packages/maven.zh-cn.md b/docs/content/usage/packages/maven.zh-cn.md similarity index 95% rename from docs/content/doc/usage/packages/maven.zh-cn.md rename to docs/content/usage/packages/maven.zh-cn.md index 833bb81507bd..6b873c795995 100644 --- a/docs/content/doc/usage/packages/maven.zh-cn.md +++ b/docs/content/usage/packages/maven.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Maven 软件包注册表" slug: "maven" -weight: 60 +sidebar_position: 60 draft: false toc: false menu: sidebar: parent: "packages" name: "Maven" - weight: 60 + sidebar_position: 60 identifier: "maven" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Maven](https://maven.apache.org) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Maven 软件包注册表,您可以使用 [Maven](https://maven.apache.org/install.html) 或 [Gradle](https://gradle.org/install/)。 @@ -71,7 +67,7 @@ menu: | 参数 | 描述 | | -------------- | ------------------------------------------------------------------------------------- | -| `access_token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `access_token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | | `owner` | 软件包的所有者 | ### Gradle variant diff --git a/docs/content/doc/usage/packages/npm.en-us.md b/docs/content/usage/packages/npm.en-us.md similarity index 95% rename from docs/content/doc/usage/packages/npm.en-us.md rename to docs/content/usage/packages/npm.en-us.md index 58edcd02a43b..1590b9623a0c 100644 --- a/docs/content/doc/usage/packages/npm.en-us.md +++ b/docs/content/usage/packages/npm.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "npm Package Registry" slug: "npm" -weight: 70 +sidebar_position: 70 draft: false toc: false menu: sidebar: parent: "packages" name: "npm" - weight: 70 + sidebar_position: 70 identifier: "npm" --- @@ -17,10 +17,6 @@ menu: Publish [npm](https://www.npmjs.com/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the npm package registry, you need [Node.js](https://nodejs.org/en/download/) coupled with a package manager such as [Yarn](https://classic.yarnpkg.com/en/docs/install) or [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/) itself. @@ -42,7 +38,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t | ------------ | ----------- | | `scope` | The scope of the packages. | | `owner` | The owner of the package. | -| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). | +| `token` | Your [personal access token](development/api-usage.md#authentication). | For example: diff --git a/docs/content/doc/usage/packages/npm.zh-cn.md b/docs/content/usage/packages/npm.zh-cn.md similarity index 95% rename from docs/content/doc/usage/packages/npm.zh-cn.md rename to docs/content/usage/packages/npm.zh-cn.md index 4863b2582bbd..d51b8b78a1e0 100644 --- a/docs/content/doc/usage/packages/npm.zh-cn.md +++ b/docs/content/usage/packages/npm.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "npm 软件包注册表" slug: "npm" -weight: 70 +sidebar_position: 70 draft: false toc: false menu: sidebar: parent: "packages" name: "npm" - weight: 70 + sidebar_position: 70 identifier: "npm" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [npm](https://www.npmjs.com/) 包。 -**目录** - -{{< toc >}} - ## 要求 要使用 npm 包注册表,您需要安装 [Node.js](https://nodejs.org/en/download/) 以及与之配套的软件包管理器,例如 [Yarn](https://classic.yarnpkg.com/en/docs/install) 或 [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm/) 本身。 @@ -42,7 +38,7 @@ npm config set -- '//gitea.example.com/api/packages/{owner}/npm/:_authToken' "{t | ------- | --------------------------------------------------------------------------------------- | | `scope` | 软件包的作用域 | | `owner` | 软件包的所有者 | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证)。 | 例如: diff --git a/docs/content/doc/usage/packages/nuget.en-us.md b/docs/content/usage/packages/nuget.en-us.md similarity index 91% rename from docs/content/doc/usage/packages/nuget.en-us.md rename to docs/content/usage/packages/nuget.en-us.md index ccda2cc49c5f..8cd88e06371e 100644 --- a/docs/content/doc/usage/packages/nuget.en-us.md +++ b/docs/content/usage/packages/nuget.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "NuGet Package Registry" slug: "nuget" -weight: 80 +sidebar_position: 80 draft: false toc: false menu: sidebar: parent: "packages" name: "NuGet" - weight: 80 + sidebar_position: 80 identifier: "nuget" --- @@ -17,10 +17,6 @@ menu: Publish [NuGet](https://www.nuget.org/) packages for your user or organization. The package registry supports the V2 and V3 API protocol and you can work with [NuGet Symbol Packages](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg) too. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the NuGet package registry, you can use command-line interface tools as well as NuGet features in various IDEs like Visual Studio. @@ -39,7 +35,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p | ------------- | ----------- | | `source_name` | The desired source name. | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | For example: @@ -48,7 +44,7 @@ For example: dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json ``` -You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). +You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token](development/api-usage.md#authentication). ## Publish a package diff --git a/docs/content/doc/usage/packages/nuget.zh-cn.md b/docs/content/usage/packages/nuget.zh-cn.md similarity index 93% rename from docs/content/doc/usage/packages/nuget.zh-cn.md rename to docs/content/usage/packages/nuget.zh-cn.md index 14205545b586..692d5f928f4d 100644 --- a/docs/content/doc/usage/packages/nuget.zh-cn.md +++ b/docs/content/usage/packages/nuget.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "NuGet 软件包注册表" slug: "nuget" -weight: 80 +sidebar_position: 80 draft: false toc: false menu: sidebar: parent: "packages" name: "NuGet" - weight: 80 + sidebar_position: 80 identifier: "nuget" --- @@ -17,10 +17,6 @@ menu: 发布适用于您的用户或组织的 [NuGet](https://www.nuget.org/) 软件包。软件包注册表支持 V2 和 V3 API 协议,并且您还可以使用 [NuGet 符号软件包](https://docs.microsoft.com/en-us/nuget/create-packages/symbol-packages-snupkg)。 -**目录** - -{{< toc >}} - ## 要求 要使用 NuGet 软件包注册表,您可以使用命令行界面工具,以及各种集成开发环境(IDE)中的 NuGet 功能,如 Visual Studio。有关 NuGet 客户端的更多信息,请参[阅官方文档](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools)。 @@ -38,7 +34,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `source_name` | 所需源名称 | | `username` | 您的Gitea用户名 | -| `password` | 您的Gitea密码。如果您使用2FA或OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的Gitea密码。如果您使用2FA或OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | | `owner` | 软件包的所有者 | 例如: @@ -47,7 +43,7 @@ dotnet nuget add source --name {source_name} --username {username} --password {p dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json ``` -您可以在不提供凭据的情况下添加源,并在发布软件包时使用--api-key参数。在这种情况下,您需要提供[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +您可以在不提供凭据的情况下添加源,并在发布软件包时使用--api-key参数。在这种情况下,您需要提供[个人访问令牌](development/api-usage.md#通过-api-认证)。 ## 发布软件包 diff --git a/docs/content/doc/usage/packages/overview.en-us.md b/docs/content/usage/packages/overview.en-us.md similarity index 61% rename from docs/content/doc/usage/packages/overview.en-us.md rename to docs/content/usage/packages/overview.en-us.md index bf33ea627d1b..44d18ff48230 100644 --- a/docs/content/doc/usage/packages/overview.en-us.md +++ b/docs/content/usage/packages/overview.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "Package Registry" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "packages" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "packages-overview" --- @@ -17,37 +17,33 @@ menu: Starting with Gitea **1.17**, the Package Registry can be used as a public or private registry for common package managers. -**Table of Contents** - -{{< toc >}} - ## Supported package managers The following package managers are currently supported: | Name | Language | Package client | | ---- | -------- | -------------- | -| [Alpine]({{< relref "doc/usage/packages/alpine.en-us.md" >}}) | - | `apk` | -| [Cargo]({{< relref "doc/usage/packages/cargo.en-us.md" >}}) | Rust | `cargo` | -| [Chef]({{< relref "doc/usage/packages/chef.en-us.md" >}}) | - | `knife` | -| [Composer]({{< relref "doc/usage/packages/composer.en-us.md" >}}) | PHP | `composer` | -| [Conan]({{< relref "doc/usage/packages/conan.en-us.md" >}}) | C++ | `conan` | -| [Conda]({{< relref "doc/usage/packages/conda.en-us.md" >}}) | - | `conda` | -| [Container]({{< relref "doc/usage/packages/container.en-us.md" >}}) | - | any OCI compliant client | -| [CRAN]({{< relref "doc/usage/packages/cran.en-us.md" >}}) | R | - | -| [Debian]({{< relref "doc/usage/packages/debian.en-us.md" >}}) | - | `apt` | -| [Generic]({{< relref "doc/usage/packages/generic.en-us.md" >}}) | - | any HTTP client | -| [Go]({{< relref "doc/usage/packages/go.en-us.md" >}}) | Go | `go` | -| [Helm]({{< relref "doc/usage/packages/helm.en-us.md" >}}) | - | any HTTP client, `cm-push` | -| [Maven]({{< relref "doc/usage/packages/maven.en-us.md" >}}) | Java | `mvn`, `gradle` | -| [npm]({{< relref "doc/usage/packages/npm.en-us.md" >}}) | JavaScript | `npm`, `yarn`, `pnpm` | -| [NuGet]({{< relref "doc/usage/packages/nuget.en-us.md" >}}) | .NET | `nuget` | -| [Pub]({{< relref "doc/usage/packages/pub.en-us.md" >}}) | Dart | `dart`, `flutter` | -| [PyPI]({{< relref "doc/usage/packages/pypi.en-us.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.en-us.md" >}}) | - | `yum`, `dnf`, `zypper` | -| [RubyGems]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Ruby | `gem`, `Bundler` | -| [Swift]({{< relref "doc/usage/packages/rubygems.en-us.md" >}}) | Swift | `swift` | -| [Vagrant]({{< relref "doc/usage/packages/vagrant.en-us.md" >}}) | - | `vagrant` | +| [Alpine](usage/packages/alpine.md) | - | `apk` | +| [Cargo](usage/packages/cargo.md) | Rust | `cargo` | +| [Chef](usage/packages/chef.md) | - | `knife` | +| [Composer](usage/packages/composer.md) | PHP | `composer` | +| [Conan](usage/packages/conan.md) | C++ | `conan` | +| [Conda](usage/packages/conda.md) | - | `conda` | +| [Container](usage/packages/container.md) | - | any OCI compliant client | +| [CRAN](usage/packages/cran.md) | R | - | +| [Debian](usage/packages/debian.md) | - | `apt` | +| [Generic](usage/packages/generic.md) | - | any HTTP client | +| [Go](usage/packages/go.md) | Go | `go` | +| [Helm](usage/packages/helm.md) | - | any HTTP client, `cm-push` | +| [Maven](usage/packages/maven.md) | Java | `mvn`, `gradle` | +| [npm](usage/packages/npm.md) | JavaScript | `npm`, `yarn`, `pnpm` | +| [NuGet](usage/packages/nuget.md) | .NET | `nuget` | +| [Pub](usage/packages/pub.md) | Dart | `dart`, `flutter` | +| [PyPI](usage/packages/pypi.md) | Python | `pip`, `twine` | +| [RPM](usage/packages/rpm.md) | - | `yum`, `dnf`, `zypper` | +| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | +| [Swift](usage/packages/rubygems.md) | Swift | `swift` | +| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | **The following paragraphs only apply if Packages are not globally disabled!** diff --git a/docs/content/doc/usage/packages/overview.zh-cn.md b/docs/content/usage/packages/overview.zh-cn.md similarity index 56% rename from docs/content/doc/usage/packages/overview.zh-cn.md rename to docs/content/usage/packages/overview.zh-cn.md index 9d24a733fd3a..daacf1dcfdcc 100644 --- a/docs/content/doc/usage/packages/overview.zh-cn.md +++ b/docs/content/usage/packages/overview.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "软件包注册表" slug: "overview" -weight: 1 +sidebar_position: 1 draft: false toc: false menu: sidebar: parent: "packages" name: "Overview" - weight: 1 + sidebar_position: 1 identifier: "packages-overview" --- @@ -17,37 +17,33 @@ menu: 从Gitea **1.17**版本开始,软件包注册表可以用作常见软件包管理器的公共或私有注册表。 -**目录** - -{{< toc >}} - ## 支持的软件包管理器 目前支持以下软件包管理器: | Name | Language | Package client | | ------------------------------------------------------------------- | ---------- | ------------------------- | -| [Alpine]({{< relref "doc/usage/packages/alpine.zh-cn.md" >}}) | - | `apk` | -| [Cargo]({{< relref "doc/usage/packages/cargo.zh-cn.md" >}}) | Rust | `cargo` | -| [Chef]({{< relref "doc/usage/packages/chef.zh-cn.md" >}}) | - | `knife` | -| [Composer]({{< relref "doc/usage/packages/composer.zh-cn.md" >}}) | PHP | `composer` | -| [Conan]({{< relref "doc/usage/packages/conan.zh-cn.md" >}}) | C++ | `conan` | -| [Conda]({{< relref "doc/usage/packages/conda.zh-cn.md" >}}) | - | `conda` | -| [Container]({{< relref "doc/usage/packages/container.zh-cn.md" >}}) | - | 任何符合OCI规范的客户端 | -| [CRAN]({{< relref "doc/usage/packages/cran.zh-cn.md" >}}) | R | - | -| [Debian]({{< relref "doc/usage/packages/debian.zh-cn.md" >}}) | - | `apt` | -| [Generic]({{< relref "doc/usage/packages/generic.zh-cn.md" >}}) | - | 任何HTTP客户端 | -| [Go]({{< relref "doc/usage/packages/go.zh-cn.md" >}}) | Go | `go` | -| [Helm]({{< relref "doc/usage/packages/helm.zh-cn.md" >}}) | - | 任何HTTP客户端, `cm-push` | -| [Maven]({{< relref "doc/usage/packages/maven.zh-cn.md" >}}) | Java | `mvn`, `gradle` | -| [npm]({{< relref "doc/usage/packages/npm.zh-cn.md" >}}) | JavaScript | `npm`, `yarn`, `pnpm` | -| [NuGet]({{< relref "doc/usage/packages/nuget.zh-cn.md" >}}) | .NET | `nuget` | -| [Pub]({{< relref "doc/usage/packages/pub.zh-cn.md" >}}) | Dart | `dart`, `flutter` | -| [PyPI]({{< relref "doc/usage/packages/pypi.zh-cn.md" >}}) | Python | `pip`, `twine` | -| [RPM]({{< relref "doc/usage/packages/rpm.zh-cn.md" >}}) | - | `yum`, `dnf`, `zypper` | -| [RubyGems]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Ruby | `gem`, `Bundler` | -| [Swift]({{< relref "doc/usage/packages/rubygems.zh-cn.md" >}}) | Swift | `swift` | -| [Vagrant]({{< relref "doc/usage/packages/vagrant.zh-cn.md" >}}) | - | `vagrant` | +| [Alpine](usage/packages/alpine.md) | - | `apk` | +| [Cargo](usage/packages/cargo.md) | Rust | `cargo` | +| [Chef](usage/packages/chef.md) | - | `knife` | +| [Composer](usage/packages/composer.md) | PHP | `composer` | +| [Conan](usage/packages/conan.md) | C++ | `conan` | +| [Conda](usage/packages/conda.md) | - | `conda` | +| [Container](usage/packages/container.md) | - | 任何符合OCI规范的客户端 | +| [CRAN](usage/packages/cran.md) | R | - | +| [Debian](usage/packages/debian.md) | - | `apt` | +| [Generic](usage/packages/generic.md) | - | 任何HTTP客户端 | +| [Go](usage/packages/go.md) | Go | `go` | +| [Helm](usage/packages/helm.md) | - | 任何HTTP客户端, `cm-push` | +| [Maven](usage/packages/maven.md) | Java | `mvn`, `gradle` | +| [npm](usage/packages/npm.md) | JavaScript | `npm`, `yarn`, `pnpm` | +| [NuGet](usage/packages/nuget.md) | .NET | `nuget` | +| [Pub](usage/packages/pub.md) | Dart | `dart`, `flutter` | +| [PyPI](usage/packages/pypi.md) | Python | `pip`, `twine` | +| [RPM](usage/packages/rpm.md) | - | `yum`, `dnf`, `zypper` | +| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | +| [Swift](usage/packages/rubygems.md) | Swift | `swift` | +| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | **以下段落仅适用于未全局禁用软件包的情况!** diff --git a/docs/content/doc/usage/packages/pub.en-us.md b/docs/content/usage/packages/pub.en-us.md similarity index 91% rename from docs/content/doc/usage/packages/pub.en-us.md rename to docs/content/usage/packages/pub.en-us.md index 823984d54d47..e5e12de34495 100644 --- a/docs/content/doc/usage/packages/pub.en-us.md +++ b/docs/content/usage/packages/pub.en-us.md @@ -2,14 +2,14 @@ date: "2022-07-31T00:00:00+00:00" title: "Pub Package Registry" slug: "pub" -weight: 90 +sidebar_position: 90 draft: false toc: false menu: sidebar: parent: "packages" name: "Pub" - weight: 90 + sidebar_position: 90 identifier: "pub" --- @@ -17,10 +17,6 @@ menu: Publish [Pub](https://dart.dev/guides/packages) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Pub package registry, you need to use the tools [dart](https://dart.dev/tools/dart-tool) and/or [flutter](https://docs.flutter.dev/reference/flutter-cli). @@ -39,7 +35,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub | ------------ | ----------- | | `owner` | The owner of the package. | -You need to provide your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). +You need to provide your [personal access token](development/api-usage.md#authentication). ## Publish a package diff --git a/docs/content/doc/usage/packages/pub.zh-cn.md b/docs/content/usage/packages/pub.zh-cn.md similarity index 91% rename from docs/content/doc/usage/packages/pub.zh-cn.md rename to docs/content/usage/packages/pub.zh-cn.md index 9941a570892a..2b3c302047b1 100644 --- a/docs/content/doc/usage/packages/pub.zh-cn.md +++ b/docs/content/usage/packages/pub.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-07-31T00:00:00+00:00" title: "Pub 软件包注册表" slug: "pub" -weight: 90 +sidebar_position: 90 draft: false toc: false menu: sidebar: parent: "packages" name: "Pub" - weight: 90 + sidebar_position: 90 identifier: "pub" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Pub](https://dart.dev/guides/packages) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用Pub软件包注册表,您需要使用 [dart](https://dart.dev/tools/dart-tool) 和/或 [flutter](https://docs.flutter.dev/reference/flutter-cli). 工具。 @@ -39,7 +35,7 @@ dart pub token add https://gitea.example.com/api/packages/{owner}/pub | ------- | -------------- | | `owner` | 软件包的所有者 | -您需要提供您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})。 +您需要提供您的[个人访问令牌](development/api-usage.md#通过-api-认证)。 ## 发布软件包 diff --git a/docs/content/doc/usage/packages/pypi.en-us.md b/docs/content/usage/packages/pypi.en-us.md similarity index 92% rename from docs/content/doc/usage/packages/pypi.en-us.md rename to docs/content/usage/packages/pypi.en-us.md index 822e3ab97c48..be59df076279 100644 --- a/docs/content/doc/usage/packages/pypi.en-us.md +++ b/docs/content/usage/packages/pypi.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "PyPI Package Registry" slug: "pypi" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "packages" name: "PyPI" - weight: 100 + sidebar_position: 100 identifier: "pypi" --- @@ -17,10 +17,6 @@ menu: Publish [PyPI](https://pypi.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the PyPI package registry, you need to use the tools [pip](https://pypi.org/project/pip/) to consume and [twine](https://pypi.org/project/twine/) to publish packages. @@ -43,7 +39,7 @@ password = {password} | ------------ | ----------- | | `owner` | The owner of the package. | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | ## Publish a package diff --git a/docs/content/doc/usage/packages/pypi.zh-cn.md b/docs/content/usage/packages/pypi.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/pypi.zh-cn.md rename to docs/content/usage/packages/pypi.zh-cn.md index 555fc4db43a5..80f95141b706 100644 --- a/docs/content/doc/usage/packages/pypi.zh-cn.md +++ b/docs/content/usage/packages/pypi.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "PyPI 软件包注册表" slug: "pypi" -weight: 100 +sidebar_position: 100 draft: false toc: false menu: sidebar: parent: "packages" name: "PyPI" - weight: 100 + sidebar_position: 100 identifier: "pypi" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [PyPI](https://pypi.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 PyPI 软件包注册表,您需要使用 [pip](https://pypi.org/project/pip/) 工具来消费和使用 [twine](https://pypi.org/project/twine/) 工具来发布软件包。 @@ -43,7 +39,7 @@ password = {password} | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者 | | `username` | 您的 Gitea 用户名 | -| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码 | +| `password` | 您的 Gitea 密码。如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码 | ## 发布软件包 diff --git a/docs/content/doc/usage/packages/rpm.en-us.md b/docs/content/usage/packages/rpm.en-us.md similarity index 90% rename from docs/content/doc/usage/packages/rpm.en-us.md rename to docs/content/usage/packages/rpm.en-us.md index 7a258f5c0364..5a4a31ee39df 100644 --- a/docs/content/doc/usage/packages/rpm.en-us.md +++ b/docs/content/usage/packages/rpm.en-us.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "RPM" - weight: 105 + sidebar_position: 105 identifier: "rpm" --- @@ -16,10 +16,6 @@ menu: Publish [RPM](https://rpm.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the RPM registry, you need to use a package manager like `yum`, `dnf` or `zypper` to consume packages. @@ -38,7 +34,7 @@ dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm | ----------- | ----------- | | `owner` | The owner of the package. | -If the registry is private, provide credentials in the url. You can use a password or a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}): +If the registry is private, provide credentials in the url. You can use a password or a [personal access token](development/api-usage.md#authentication): ```shell dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm.repo @@ -66,7 +62,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/rpm/upload ``` -If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. +If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. You cannot publish a file with the same name twice to a package. You must delete the existing package version first. The server responds with the following HTTP Status codes. diff --git a/docs/content/doc/usage/packages/rpm.zh-cn.md b/docs/content/usage/packages/rpm.zh-cn.md similarity index 88% rename from docs/content/doc/usage/packages/rpm.zh-cn.md rename to docs/content/usage/packages/rpm.zh-cn.md index f76273e5a8c1..3cc7dca8ff2c 100644 --- a/docs/content/doc/usage/packages/rpm.zh-cn.md +++ b/docs/content/usage/packages/rpm.zh-cn.md @@ -8,7 +8,7 @@ menu: sidebar: parent: "packages" name: "RPM" - weight: 105 + sidebar_position: 105 identifier: "rpm" --- @@ -16,10 +16,6 @@ menu: 为您的用户或组织发布 [RPM](https://rpm.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用RPM注册表,您需要使用像 `yum`, `dnf` 或 `zypper` 这样的软件包管理器来消费软件包。 @@ -38,7 +34,7 @@ dnf config-manager --add-repo https://gitea.example.com/api/packages/{owner}/rpm | ------- | -------------- | | `owner` | 软件包的所有者 | -如果注册表是私有的,请在URL中提供凭据。您可以使用密码或[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}): +如果注册表是私有的,请在URL中提供凭据。您可以使用密码或[个人访问令牌](development/api-usage.md#通过-api-认证): ```shell dnf config-manager --add-repo https://{username}:{your_password_or_token}@gitea.example.com/api/packages/{owner}/rpm.repo @@ -66,7 +62,7 @@ curl --user your_username:your_password_or_token \ https://gitea.example.com/api/packages/testuser/rpm/upload ``` -如果您使用 2FA 或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})替代密码。您无法将具有相同名称的文件两次发布到软件包中。您必须先删除现有的软件包版本。 +如果您使用 2FA 或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)替代密码。您无法将具有相同名称的文件两次发布到软件包中。您必须先删除现有的软件包版本。 服务器将以以下HTTP状态码响应。 diff --git a/docs/content/doc/usage/packages/rubygems.en-us.md b/docs/content/usage/packages/rubygems.en-us.md similarity index 93% rename from docs/content/doc/usage/packages/rubygems.en-us.md rename to docs/content/usage/packages/rubygems.en-us.md index 5cfebfc84a15..cb1a225bc67f 100644 --- a/docs/content/doc/usage/packages/rubygems.en-us.md +++ b/docs/content/usage/packages/rubygems.en-us.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "RubyGems Package Registry" slug: "rubygems" -weight: 110 +sidebar_position: 110 draft: false toc: false menu: sidebar: parent: "packages" name: "RubyGems" - weight: 110 + sidebar_position: 110 identifier: "rubygems" --- @@ -17,10 +17,6 @@ menu: Publish [RubyGems](https://guides.rubygems.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the RubyGems package registry, you need to use the [gem](https://guides.rubygems.org/command-reference/) command line tool to consume and publish packages. @@ -37,7 +33,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token} | Parameter | Description | | ------------- | ----------- | | `owner` | The owner of the package. | -| `token` | Your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}). | +| `token` | Your [personal access token](development/api-usage.md#authentication). | For example: diff --git a/docs/content/doc/usage/packages/rubygems.zh-cn.md b/docs/content/usage/packages/rubygems.zh-cn.md similarity index 94% rename from docs/content/doc/usage/packages/rubygems.zh-cn.md rename to docs/content/usage/packages/rubygems.zh-cn.md index f3416c239e2a..71db4aaaebaf 100644 --- a/docs/content/doc/usage/packages/rubygems.zh-cn.md +++ b/docs/content/usage/packages/rubygems.zh-cn.md @@ -2,14 +2,14 @@ date: "2021-07-20T00:00:00+00:00" title: "RubyGems 软件包注册表" slug: "rubygems" -weight: 110 +sidebar_position: 110 draft: false toc: false menu: sidebar: parent: "packages" name: "RubyGems" - weight: 110 + sidebar_position: 110 identifier: "rubygems" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [RubyGems](https://guides.rubygems.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用RubyGems软件包注册表,您需要使用 [gem](https://guides.rubygems.org/command-reference/) 命令行工具来消费和发布软件包。 @@ -37,7 +33,7 @@ https://gitea.example.com/api/packages/{owner}/rubygems: Bearer {token} | 参数 | 描述 | | ------- | ------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者 | -| `token` | 您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}}) | +| `token` | 您的[个人访问令牌](development/api-usage.md#通过-api-认证) | 例如: diff --git a/docs/content/doc/usage/packages/storage.en-us.md b/docs/content/usage/packages/storage.en-us.md similarity index 89% rename from docs/content/doc/usage/packages/storage.en-us.md rename to docs/content/usage/packages/storage.en-us.md index bf500f3bc12d..f437412dcc62 100644 --- a/docs/content/doc/usage/packages/storage.en-us.md +++ b/docs/content/usage/packages/storage.en-us.md @@ -2,14 +2,14 @@ date: "2022-11-01T00:00:00+00:00" title: "Storage" slug: "storage" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Storage" - weight: 2 + sidebar_position: 2 identifier: "storage" --- @@ -17,10 +17,6 @@ menu: This document describes the storage of the package registry and how it can be managed. -**Table of Contents** - -{{< toc >}} - ## Deduplication The package registry has a build-in deduplication of uploaded blobs. @@ -32,7 +28,7 @@ Whenever a package gets deleted, only the references to the underlying blobs are The blobs get not removed at this moment, so they still require space on the filesystem. When a new package gets uploaded the existing blobs may get referenced again. -These unreferenced blobs get deleted by a [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}). +These unreferenced blobs get deleted by a [clean up job](administration/config-cheat-sheet.md#cron---cleanup-expired-packages-croncleanup_packages). The config setting `OLDER_THAN` configures how long unreferenced blobs are kept before they get deleted. ## Cleanup Rules @@ -72,7 +68,7 @@ The patterns are case-insensitive which matches the behaviour of the package reg ### How the cleanup rules work -The cleanup rules are part of the [clean up job]({{< relref "doc/administration/config-cheat-sheet.en-us.md#cron---cleanup-expired-packages-croncleanup_packages" >}}) and run periodically. +The cleanup rules are part of the [clean up job](administration/config-cheat-sheet.md#cron---cleanup-expired-packages-croncleanup_packages) and run periodically. The cleanup rule: diff --git a/docs/content/doc/usage/packages/storage.zh-cn.md b/docs/content/usage/packages/storage.zh-cn.md similarity index 99% rename from docs/content/doc/usage/packages/storage.zh-cn.md rename to docs/content/usage/packages/storage.zh-cn.md index 7845f40cf8b3..3832e80c98d3 100644 --- a/docs/content/doc/usage/packages/storage.zh-cn.md +++ b/docs/content/usage/packages/storage.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-11-01T00:00:00+00:00" title: "存储" slug: "storage" -weight: 5 +sidebar_position: 5 draft: false toc: false menu: sidebar: parent: "packages" name: "Storage" - weight: 2 + sidebar_position: 2 identifier: "storage" --- @@ -17,10 +17,6 @@ menu: 本文档描述了软件包注册表的存储方式以及如何管理存储。 -**目录** - -{{< toc >}} - ## 去重 软件包注册表具有内置的去重功能,可以对上传的 Blob 进行去重处理。 diff --git a/docs/content/doc/usage/packages/swift.en-us.md b/docs/content/usage/packages/swift.en-us.md similarity index 89% rename from docs/content/doc/usage/packages/swift.en-us.md rename to docs/content/usage/packages/swift.en-us.md index 6d4d0f24b42a..1bc271ddaef3 100644 --- a/docs/content/doc/usage/packages/swift.en-us.md +++ b/docs/content/usage/packages/swift.en-us.md @@ -2,14 +2,14 @@ date: "2023-01-10T00:00:00+00:00" title: "Swift Package Registry" slug: "swift" -weight: 95 +sidebar_position: 95 draft: false toc: false menu: sidebar: parent: "packages" name: "Swift" - weight: 95 + sidebar_position: 95 identifier: "swift" --- @@ -17,10 +17,6 @@ menu: Publish [Swift](https://www.swift.org/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Swift package registry, you need to use [swift](https://www.swift.org/getting-started/) to consume and a HTTP client (like `curl`) to publish packages. @@ -37,7 +33,7 @@ swift package-registry set https://gitea.example.com/api/packages/{owner}/swift | ------------ | ----------- | | `owner` | The owner of the package. | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | The login is optional and only needed if the package registry is private. @@ -62,7 +58,7 @@ curl -X PUT --user {username}:{password} \ | Placeholder | Description | | ----------- | ----------- | | `username` | Your Gitea username. | -| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) instead of the password. | +| `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | | `owner` | The owner of the package. | | `scope` | The package scope. | | `name` | The package name. | diff --git a/docs/content/doc/usage/packages/swift.zh-cn.md b/docs/content/usage/packages/swift.zh-cn.md similarity index 92% rename from docs/content/doc/usage/packages/swift.zh-cn.md rename to docs/content/usage/packages/swift.zh-cn.md index 9c627416ad06..595a705e7961 100644 --- a/docs/content/doc/usage/packages/swift.zh-cn.md +++ b/docs/content/usage/packages/swift.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-01-10T00:00:00+00:00" title: "Swift 软件包注册表" slug: "swift" -weight: 95 +sidebar_position: 95 draft: false toc: false menu: sidebar: parent: "packages" name: "Swift" - weight: 95 + sidebar_position: 95 identifier: "swift" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Swift](https://www.swift.org/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Swift 软件包注册表,您需要使用 [swift](https://www.swift.org/getting-started/) 消费软件包,并使用 HTTP 客户端(如 `curl`)发布软件包。 @@ -37,7 +33,7 @@ swift package-registry set https://gitea.example.com/api/packages/{owner}/swift | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `owner` | 软件包的所有者。 | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | 登录是可选的,只有在软件包注册表是私有的情况下才需要。 @@ -62,7 +58,7 @@ curl -X PUT --user {username}:{password} \ | 占位符 | 描述 | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `username` | 您的 Gitea 用户名。 | -| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})代替密码。 | +| `password` | 您的 Gitea 密码。如果您使用两步验证或 OAuth,请使用[个人访问令牌](development/api-usage.md#通过-api-认证)代替密码。 | | `owner` | 软件包的所有者。 | | `scope` | 软件包的作用域。 | | `name` | 软件包的名称。 | diff --git a/docs/content/doc/usage/packages/vagrant.en-us.md b/docs/content/usage/packages/vagrant.en-us.md similarity index 91% rename from docs/content/doc/usage/packages/vagrant.en-us.md rename to docs/content/usage/packages/vagrant.en-us.md index 583bbc199bc1..93cf5e3e78a1 100644 --- a/docs/content/doc/usage/packages/vagrant.en-us.md +++ b/docs/content/usage/packages/vagrant.en-us.md @@ -2,14 +2,14 @@ date: "2022-08-23T00:00:00+00:00" title: "Vagrant Package Registry" slug: "vagrant" -weight: 120 +sidebar_position: 120 draft: false toc: false menu: sidebar: parent: "packages" name: "Vagrant" - weight: 120 + sidebar_position: 120 identifier: "vagrant" --- @@ -17,10 +17,6 @@ menu: Publish [Vagrant](https://www.vagrantup.com/) packages for your user or organization. -**Table of Contents** - -{{< toc >}} - ## Requirements To work with the Vagrant package registry, you need [Vagrant](https://www.vagrantup.com/downloads) and a tool to make HTTP requests like `curl`. @@ -70,7 +66,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy ``` This will install the latest version of the package. To add a specific version, use the `--box-version` parameter. -If the registry is private you can pass your [personal access token]({{< relref "doc/development/api-usage.en-us.md#authentication" >}}) in the `VAGRANT_CLOUD_TOKEN` environment variable. +If the registry is private you can pass your [personal access token](development/api-usage.md#authentication) in the `VAGRANT_CLOUD_TOKEN` environment variable. ## Supported commands diff --git a/docs/content/doc/usage/packages/vagrant.zh-cn.md b/docs/content/usage/packages/vagrant.zh-cn.md similarity index 92% rename from docs/content/doc/usage/packages/vagrant.zh-cn.md rename to docs/content/usage/packages/vagrant.zh-cn.md index ddcec9e4c9a4..67d79ad3cc71 100644 --- a/docs/content/doc/usage/packages/vagrant.zh-cn.md +++ b/docs/content/usage/packages/vagrant.zh-cn.md @@ -2,14 +2,14 @@ date: "2022-08-23T00:00:00+00:00" title: "Vagrant 软件包注册表" slug: "vagrant" -weight: 120 +sidebar_position: 120 draft: false toc: false menu: sidebar: parent: "packages" name: "Vagrant" - weight: 120 + sidebar_position: 120 identifier: "vagrant" --- @@ -17,10 +17,6 @@ menu: 为您的用户或组织发布 [Vagrant](https://www.vagrantup.com/) 软件包。 -**目录** - -{{< toc >}} - ## 要求 要使用 Vagrant 软件包注册表,您需要安装 [Vagrant](https://www.vagrantup.com/downloads) 并使用类似于 `curl` 的工具进行 HTTP 请求。 @@ -70,7 +66,7 @@ vagrant box add "https://gitea.example.com/api/packages/testuser/vagrant/test_sy ``` 这将安装软件包的最新版本。要添加特定版本,请使用` --box-version` 参数。 -如果注册表是私有的,您可以将您的[个人访问令牌]({{< relref "doc/development/api-usage.zh-cn.md#通过-api-认证" >}})传递给 `VAGRANT_CLOUD_TOKEN` 环境变量。 +如果注册表是私有的,您可以将您的[个人访问令牌](development/api-usage.md#通过-api-认证)传递给 `VAGRANT_CLOUD_TOKEN` 环境变量。 ## 支持的命令 diff --git a/docs/content/doc/usage/permissions.en-us.md b/docs/content/usage/permissions.en-us.md similarity index 98% rename from docs/content/doc/usage/permissions.en-us.md rename to docs/content/usage/permissions.en-us.md index 655c67de86c1..1e0c6c0bb17c 100644 --- a/docs/content/doc/usage/permissions.en-us.md +++ b/docs/content/usage/permissions.en-us.md @@ -2,7 +2,7 @@ date: "2021-12-13:10:10+08:00" title: "Permissions" slug: "permissions" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Permissions" - weight: 14 + sidebar_position: 14 identifier: "permissions" --- # Permissions -**Table of Contents** - -{{< toc >}} - Gitea supports permissions for repository so that you can give different access for different people. At first, we need to know about `Unit`. ## Unit diff --git a/docs/content/doc/usage/permissions.zh-cn.md b/docs/content/usage/permissions.zh-cn.md similarity index 98% rename from docs/content/doc/usage/permissions.zh-cn.md rename to docs/content/usage/permissions.zh-cn.md index 3163633589b7..5e1688f7ac69 100644 --- a/docs/content/doc/usage/permissions.zh-cn.md +++ b/docs/content/usage/permissions.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "权限" slug: "permissions" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "权限" - weight: 14 + sidebar_position: 14 identifier: "permissions" --- # 权限 -**目录** - -{{< toc >}} - Gitea 支持对仓库进行权限管理,这样您就可以为不同的人员提供不同的访问权限。首先,我们需要了解 `单元(Unit)`。 ## 单元(Unit) diff --git a/docs/content/doc/usage/profile-readme.en-us.md b/docs/content/usage/profile-readme.en-us.md similarity index 94% rename from docs/content/doc/usage/profile-readme.en-us.md rename to docs/content/usage/profile-readme.en-us.md index a290eadbb12f..fbe175eed94d 100644 --- a/docs/content/doc/usage/profile-readme.en-us.md +++ b/docs/content/usage/profile-readme.en-us.md @@ -2,14 +2,14 @@ date: "2023-03-02T21:00:00+05:00" title: "Profile READMEs" slug: "profile-readme" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "usage" name: "Profile READMEs" - weight: 12 + sidebar_position: 12 identifier: "profile-readme" --- diff --git a/docs/content/doc/usage/profile-readme.zh-cn.md b/docs/content/usage/profile-readme.zh-cn.md similarity index 94% rename from docs/content/doc/usage/profile-readme.zh-cn.md rename to docs/content/usage/profile-readme.zh-cn.md index a253fcaf2476..804f69d2e6f1 100644 --- a/docs/content/doc/usage/profile-readme.zh-cn.md +++ b/docs/content/usage/profile-readme.zh-cn.md @@ -2,14 +2,14 @@ date: "2023-05-23T09:00:00+08:00" title: "个人资料 README" slug: "profile-readme" -weight: 12 +sidebar_position: 12 toc: false draft: false menu: sidebar: parent: "usage" name: "个人资料 README" - weight: 12 + sidebar_position: 12 identifier: "profile-readme" --- diff --git a/docs/content/doc/usage/protected-tags.en-us.md b/docs/content/usage/protected-tags.en-us.md similarity index 97% rename from docs/content/doc/usage/protected-tags.en-us.md rename to docs/content/usage/protected-tags.en-us.md index c5e763659dd2..b25cbdbb2ea7 100644 --- a/docs/content/doc/usage/protected-tags.en-us.md +++ b/docs/content/usage/protected-tags.en-us.md @@ -2,7 +2,7 @@ date: "2021-05-14T00:00:00-00:00" title: "Protected tags" slug: "protected-tags" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Protected tags" - weight: 45 + sidebar_position: 45 identifier: "protected-tags" --- @@ -19,10 +19,6 @@ menu: Protected tags allow control over who has permission to create or update Git tags. Each rule allows you to match either an individual tag name, or use an appropriate pattern to control multiple tags at once. -**Table of Contents** - -{{< toc >}} - ## Setting up protected tags To protect a tag, you need to follow these steps: diff --git a/docs/content/doc/usage/protected-tags.zh-cn.md b/docs/content/usage/protected-tags.zh-cn.md similarity index 98% rename from docs/content/doc/usage/protected-tags.zh-cn.md rename to docs/content/usage/protected-tags.zh-cn.md index 7d43462d32a2..0529bf7932d1 100644 --- a/docs/content/doc/usage/protected-tags.zh-cn.md +++ b/docs/content/usage/protected-tags.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "受保护的标签" slug: "protected-tags" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "受保护的标签" - weight: 45 + sidebar_position: 45 identifier: "protected-tags" --- @@ -19,10 +19,6 @@ menu: 受保护的标签允许控制谁有权限创建或更新 Git 标签。每个规则可以匹配单个标签名称,或者使用适当的模式来同时控制多个标签。 -**目录** - -{{< toc >}} - ## 设置受保护的标签 要保护一个标签,你需要按照以下步骤进行操作: diff --git a/docs/content/doc/usage/pull-request.en-us.md b/docs/content/usage/pull-request.en-us.md similarity index 98% rename from docs/content/doc/usage/pull-request.en-us.md rename to docs/content/usage/pull-request.en-us.md index f9f4b3855581..8c94ee68c8c6 100644 --- a/docs/content/doc/usage/pull-request.en-us.md +++ b/docs/content/usage/pull-request.en-us.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "Pull Request" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Pull Request" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/docs/content/doc/usage/pull-request.zh-cn.md b/docs/content/usage/pull-request.zh-cn.md similarity index 94% rename from docs/content/doc/usage/pull-request.zh-cn.md rename to docs/content/usage/pull-request.zh-cn.md index baf57787c8cb..db5646f378c5 100644 --- a/docs/content/doc/usage/pull-request.zh-cn.md +++ b/docs/content/usage/pull-request.zh-cn.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "合并请求" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Pull Request" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/docs/content/doc/usage/pull-request.zh-tw.md b/docs/content/usage/pull-request.zh-tw.md similarity index 94% rename from docs/content/doc/usage/pull-request.zh-tw.md rename to docs/content/usage/pull-request.zh-tw.md index 9bbfa87863f3..14d1b4950114 100644 --- a/docs/content/doc/usage/pull-request.zh-tw.md +++ b/docs/content/usage/pull-request.zh-tw.md @@ -2,7 +2,7 @@ date: "2018-06-01T19:00:00+02:00" title: "合併請求" slug: "pull-request" -weight: 13 +sidebar_position: 13 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "合併請求" - weight: 13 + sidebar_position: 13 identifier: "pull-request" --- diff --git a/docs/content/doc/usage/push.en-us.md b/docs/content/usage/push.en-us.md similarity index 92% rename from docs/content/doc/usage/push.en-us.md rename to docs/content/usage/push.en-us.md index 45190d88ca80..d88dc1a2a98e 100644 --- a/docs/content/doc/usage/push.en-us.md +++ b/docs/content/usage/push.en-us.md @@ -2,7 +2,7 @@ date: "2020-07-06T16:00:00+02:00" title: "Push" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -12,14 +12,10 @@ menu: sidebar: parent: "usage" name: "Push" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**Table of Contents** - -{{< toc >}} - There are some additional features when pushing commits to Gitea server. # Open PR through Push @@ -55,7 +51,7 @@ Push to create is a feature that allows you to push to a repository that does no ## Enabling Push To Create -In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.en-us.md#repository-repository" >}}). +In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#repository-repository). ## Using Push To Create diff --git a/docs/content/doc/usage/push.zh-cn.md b/docs/content/usage/push.zh-cn.md similarity index 90% rename from docs/content/doc/usage/push.zh-cn.md rename to docs/content/usage/push.zh-cn.md index a12e1b534971..f9fd687cc13a 100644 --- a/docs/content/doc/usage/push.zh-cn.md +++ b/docs/content/usage/push.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "推送" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -12,14 +12,10 @@ menu: sidebar: parent: "usage" name: "推送" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**目录** - -{{< toc >}} - 在将提交推送到 Gitea 服务器时,还有一些额外的功能。 # 通过推送打开 PR @@ -53,7 +49,7 @@ git push -o repo.private=false -u origin main ## 启用推送创建 -在 `app.ini` 文件中,将 `ENABLE_PUSH_CREATE_USER` 设置为 `true`,如果您希望允许用户在自己的用户帐户和所属的组织中创建仓库,将 `ENABLE_PUSH_CREATE_ORG` 设置为 `true`。重新启动 Gitea 以使更改生效。您可以在 [配置速查表]({{< relref "doc/administration/config-cheat-sheet.zh-cn.md#repository-repository" >}}) 中了解有关这两个选项的更多信息。 +在 `app.ini` 文件中,将 `ENABLE_PUSH_CREATE_USER` 设置为 `true`,如果您希望允许用户在自己的用户帐户和所属的组织中创建仓库,将 `ENABLE_PUSH_CREATE_ORG` 设置为 `true`。重新启动 Gitea 以使更改生效。您可以在 [配置速查表](administration/config-cheat-sheet.md#repository-repository) 中了解有关这两个选项的更多信息。 ## 使用推送创建 diff --git a/docs/content/doc/usage/push.zh-tw.md b/docs/content/usage/push.zh-tw.md similarity index 91% rename from docs/content/doc/usage/push.zh-tw.md rename to docs/content/usage/push.zh-tw.md index 5fe5052c113d..ccecbf6284f8 100644 --- a/docs/content/doc/usage/push.zh-tw.md +++ b/docs/content/usage/push.zh-tw.md @@ -2,7 +2,7 @@ date: "2020-07-06T16:00:00+02:00" title: "使用: Push" slug: "push" -weight: 15 +sidebar_position: 15 toc: false draft: false aliases: @@ -11,14 +11,10 @@ menu: sidebar: parent: "usage" name: "Push" - weight: 15 + sidebar_position: 15 identifier: "push" --- -**Table of Contents** - -{{< toc >}} - There are some additional features when pushing commits to Gitea server. # Push Merge Hint @@ -54,7 +50,7 @@ Push to create is a feature that allows you to push to a repository that does no ## Enabling Push To Create -In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet]({{< relref "doc/administration/config-cheat-sheet.zh-tw.md#repository-repository" >}}). +In the `app.ini` file, set `ENABLE_PUSH_CREATE_USER` to `true` and `ENABLE_PUSH_CREATE_ORG` to `true` if you want to allow users to create repositories in their own user account and in organizations they are a member of respectively. Restart Gitea for the changes to take effect. You can read more about these two options in the [Configuration Cheat Sheet](administration/config-cheat-sheet.md#repository-repository). ## Using Push To Create diff --git a/docs/content/doc/usage/repo-mirror.en-us.md b/docs/content/usage/repo-mirror.en-us.md similarity index 98% rename from docs/content/doc/usage/repo-mirror.en-us.md rename to docs/content/usage/repo-mirror.en-us.md index 157b6c124e5d..4a6571031b3c 100644 --- a/docs/content/doc/usage/repo-mirror.en-us.md +++ b/docs/content/usage/repo-mirror.en-us.md @@ -2,7 +2,7 @@ date: "2021-05-13T00:00:00-00:00" title: "Repository Mirror" slug: "repo-mirror" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Repository Mirror" - weight: 45 + sidebar_position: 45 identifier: "repo-mirror" --- @@ -19,10 +19,6 @@ menu: Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories. -**Table of Contents** - -{{< toc >}} - ## Use cases The following are some possible use cases for repository mirroring: diff --git a/docs/content/doc/usage/repo-mirror.zh-cn.md b/docs/content/usage/repo-mirror.zh-cn.md similarity index 98% rename from docs/content/doc/usage/repo-mirror.zh-cn.md rename to docs/content/usage/repo-mirror.zh-cn.md index d327338bad56..3723b81ee4d7 100644 --- a/docs/content/doc/usage/repo-mirror.zh-cn.md +++ b/docs/content/usage/repo-mirror.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "仓库镜像" slug: "repo-mirror" -weight: 45 +sidebar_position: 45 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "仓库镜像" - weight: 45 + sidebar_position: 45 identifier: "repo-mirror" --- @@ -19,10 +19,6 @@ menu: 仓库镜像允许将仓库与外部源之间进行镜像。您可以使用它在仓库之间镜像分支、标签和提交。 -**目录** - -{{< toc >}} - ## 使用场景 以下是一些仓库镜像的可能使用场景: diff --git a/docs/content/doc/usage/secrets.en-us.md b/docs/content/usage/secrets.en-us.md similarity index 96% rename from docs/content/doc/usage/secrets.en-us.md rename to docs/content/usage/secrets.en-us.md index c82628f50cf8..8ad67466140b 100644 --- a/docs/content/doc/usage/secrets.en-us.md +++ b/docs/content/usage/secrets.en-us.md @@ -2,7 +2,7 @@ date: "2022-12-19T21:26:00+08:00" title: "Secrets" slug: "secrets" -weight: 50 +sidebar_position: 50 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Secrets" - weight: 50 + sidebar_position: 50 identifier: "usage-secrets" --- diff --git a/docs/content/doc/usage/secrets.zh-cn.md b/docs/content/usage/secrets.zh-cn.md similarity index 96% rename from docs/content/doc/usage/secrets.zh-cn.md rename to docs/content/usage/secrets.zh-cn.md index 534fc52eeb2e..40e80dc7859d 100644 --- a/docs/content/doc/usage/secrets.zh-cn.md +++ b/docs/content/usage/secrets.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "密钥管理" slug: "secrets" -weight: 50 +sidebar_position: 50 draft: false toc: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "密钥管理" - weight: 50 + sidebar_position: 50 identifier: "usage-secrets" --- diff --git a/docs/content/doc/usage/template-repositories.en-us.md b/docs/content/usage/template-repositories.en-us.md similarity index 98% rename from docs/content/doc/usage/template-repositories.en-us.md rename to docs/content/usage/template-repositories.en-us.md index 5687861b8ca4..4618d10f3199 100644 --- a/docs/content/doc/usage/template-repositories.en-us.md +++ b/docs/content/usage/template-repositories.en-us.md @@ -2,7 +2,7 @@ date: "2019-11-28:00:00+02:00" title: "Template Repositories" slug: "template-repositories" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "Template Repositories" - weight: 14 + sidebar_position: 14 identifier: "template-repositories" --- # Template Repositories -**Table of Contents** - -{{< toc >}} - Gitea `1.11.0` and above includes template repositories, and one feature implemented with them is auto-expansion of specific variables within your template files. To tell Gitea which files to expand, you must include a `template` file inside the `.gitea` directory of the template repository. diff --git a/docs/content/doc/usage/template-repositories.zh-cn.md b/docs/content/usage/template-repositories.zh-cn.md similarity index 98% rename from docs/content/doc/usage/template-repositories.zh-cn.md rename to docs/content/usage/template-repositories.zh-cn.md index f8dfe1064d3c..68881e023b2c 100644 --- a/docs/content/doc/usage/template-repositories.zh-cn.md +++ b/docs/content/usage/template-repositories.zh-cn.md @@ -2,7 +2,7 @@ date: "2023-05-23T09:00:00+08:00" title: "模板仓库" slug: "template-repositories" -weight: 14 +sidebar_position: 14 toc: false draft: false aliases: @@ -11,16 +11,12 @@ menu: sidebar: parent: "usage" name: "模板仓库" - weight: 14 + sidebar_position: 14 identifier: "template-repositories" --- # 模板仓库 -**目录** - -{{< toc >}} - Gitea `1.11.0` 及以上版本引入了模板仓库,并且其中一个实现的功能是自动展开模板文件中的特定变量。 要告诉 Gitea 哪些文件需要展开,您必须在模板仓库的 `.gitea` 目录中包含一个 `template` 文件。 diff --git a/docs/content/doc/usage/webhooks.en-us.md b/docs/content/usage/webhooks.en-us.md similarity index 99% rename from docs/content/doc/usage/webhooks.en-us.md rename to docs/content/usage/webhooks.en-us.md index 24cd48c9193d..684911f83a6b 100644 --- a/docs/content/doc/usage/webhooks.en-us.md +++ b/docs/content/usage/webhooks.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhooks" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhooks" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- diff --git a/docs/content/doc/usage/webhooks.zh-cn.md b/docs/content/usage/webhooks.zh-cn.md similarity index 99% rename from docs/content/doc/usage/webhooks.zh-cn.md rename to docs/content/usage/webhooks.zh-cn.md index 412dad251b0b..dfc709940e95 100644 --- a/docs/content/doc/usage/webhooks.zh-cn.md +++ b/docs/content/usage/webhooks.zh-cn.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhooks" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhooks" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- diff --git a/docs/content/doc/usage/webhooks.zh-tw.md b/docs/content/usage/webhooks.zh-tw.md similarity index 99% rename from docs/content/doc/usage/webhooks.zh-tw.md rename to docs/content/usage/webhooks.zh-tw.md index ca5991354a16..666dcee83c54 100644 --- a/docs/content/doc/usage/webhooks.zh-tw.md +++ b/docs/content/usage/webhooks.zh-tw.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Webhook" slug: "webhooks" -weight: 30 +sidebar_position: 30 toc: false draft: false aliases: @@ -11,7 +11,7 @@ menu: sidebar: parent: "usage" name: "Webhook" - weight: 30 + sidebar_position: 30 identifier: "webhooks" --- diff --git a/docs/layouts/_default/index.json b/docs/layouts/_default/index.json deleted file mode 100644 index ae08324d8e7a..000000000000 --- a/docs/layouts/_default/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} -{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} diff --git a/docs/layouts/alias.html b/docs/layouts/alias.html deleted file mode 100644 index 69d895b1fd72..000000000000 --- a/docs/layouts/alias.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - {{ .Permalink }} - - - - - - diff --git a/docs/layouts/doc/search.html b/docs/layouts/doc/search.html deleted file mode 100644 index 90fe96fe5d9c..000000000000 --- a/docs/layouts/doc/search.html +++ /dev/null @@ -1,38 +0,0 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} - -
-
-
-
- {{ partial "menu" . }} -
-
-
-
-
-
-
-
- - -
-
-
-
-
- - - - -{{ $script := resources.Get "js/search.js" | minify | fingerprint -}} - -{{ partial "footer.html" . }} diff --git a/docs/layouts/index.html b/docs/layouts/index.html deleted file mode 100644 index 3e871ab023ab..000000000000 --- a/docs/layouts/index.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ partial "header.html" . }} -{{ partial "navbar.html" . }} - -
-
-
- {{ partial "menu" . }} -
-
- {{ range where .Site.Pages "Type" "page" }} - {{ .Content }} - {{ end }} - - {{ if .Site.DisqusShortname }} -
- {{ partial "disqus.html" . }} -
- {{ end }} -
-
-
- -{{ partial "footer.html" . }} diff --git a/docs/layouts/shortcodes/go-version.html b/docs/layouts/shortcodes/go-version.html deleted file mode 100644 index 7f846683d84f..000000000000 --- a/docs/layouts/shortcodes/go-version.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Site.Params.goVersion }} diff --git a/docs/layouts/shortcodes/min-go-version.html b/docs/layouts/shortcodes/min-go-version.html deleted file mode 100644 index 50b880d1d563..000000000000 --- a/docs/layouts/shortcodes/min-go-version.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Site.Params.minGoVersion }} diff --git a/docs/layouts/shortcodes/min-node-version.html b/docs/layouts/shortcodes/min-node-version.html deleted file mode 100644 index 7885f4ea19d6..000000000000 --- a/docs/layouts/shortcodes/min-node-version.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Site.Params.minNodeVersion }} diff --git a/docs/layouts/shortcodes/version.html b/docs/layouts/shortcodes/version.html deleted file mode 100644 index 2fd81d651c37..000000000000 --- a/docs/layouts/shortcodes/version.html +++ /dev/null @@ -1 +0,0 @@ -{{ .Site.Params.version }} \ No newline at end of file diff --git a/docs/static/_headers b/docs/static/_headers deleted file mode 100644 index 7bf593b76999..000000000000 --- a/docs/static/_headers +++ /dev/null @@ -1,6 +0,0 @@ -/* - Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdnjs.cloudflare.com; font-src 'self' data: https://cdnjs.cloudflare.com https://fonts.gstatic.com - X-Frame-Options: DENY - X-Xss-Protection: 1; mode=block - X-Content-Type-Options: nosniff - Referrer-Policy: strict-origin-when-cross-origin diff --git a/docs/static/_redirects b/docs/static/_redirects deleted file mode 100644 index 39bd09f9ba51..000000000000 --- a/docs/static/_redirects +++ /dev/null @@ -1,19 +0,0 @@ -https://gitea-docs.netlify.com/* https://docs.gitea.io/:splat 302! - -/ /fr-fr/ 302! Language=fr -/ /nl-nl/ 302! Language=nl -/ /pt-br/ 302! Language=pt-br -/ /zh-cn/ 302! Language=zh-cn -/ /zh-tw/ 302! Language=zh-tw -/ /en-us/ 302! - -/en-us/ci-cd/ /en-us/integrations/ 302! -/en-us/third-party-tools/ /en-us/integrations/ 302! -/zh-cn/third-party-tools/ /zh-cn/integrations/ 302! -/en-us/make/ /en-us/hacking-on-gitea/ 302! -/zh-cn/make/ /zh-cn/hacking-on-gitea/ 302! -/fr-fr/make/ /fr-fr/hacking-on-gitea/ 302! -/en-us/upgrade/ /en-us/upgrade-from-gitea/ 302! -/fr-fr/upgrade/ /fr-fr/upgrade-from-gitea/ 302! -/zh-cn/upgrade/ /zh-cn/upgrade-from-gitea/ 302! -/zh-tw/upgrade/ /zh-tw/upgrade-from-gitea/ 302! diff --git a/docs/static/authorize.png b/docs/static/authorize.png deleted file mode 100644 index 7556b1220cd2..000000000000 Binary files a/docs/static/authorize.png and /dev/null differ diff --git a/docs/static/cloudron.svg b/docs/static/cloudron.svg deleted file mode 100644 index 716f67a165ea..000000000000 --- a/docs/static/cloudron.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/static/gitea-push-hint.png b/docs/static/gitea-push-hint.png deleted file mode 100644 index 6f3ab3c60682..000000000000 Binary files a/docs/static/gitea-push-hint.png and /dev/null differ diff --git a/docs/static/open-in-gitpod.svg b/docs/static/open-in-gitpod.svg deleted file mode 100644 index b97cd2948794..000000000000 --- a/docs/static/open-in-gitpod.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file