Docusaurus-ify 1.20 (#26052)
See https://github.com/go-gitea/gitea/pull/26051 --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: JonRB <4564448+eeyrjmr@users.noreply.github.com>
This commit is contained in:
19
Makefile
19
Makefile
@ -203,7 +203,6 @@ help:
|
|||||||
@echo " - clean delete backend and integration files"
|
@echo " - clean delete backend and integration files"
|
||||||
@echo " - clean-all delete backend, frontend and integration files"
|
@echo " - clean-all delete backend, frontend and integration files"
|
||||||
@echo " - deps install dependencies"
|
@echo " - deps install dependencies"
|
||||||
@echo " - deps-docs install docs dependencies"
|
|
||||||
@echo " - deps-frontend install frontend dependencies"
|
@echo " - deps-frontend install frontend dependencies"
|
||||||
@echo " - deps-backend install backend dependencies"
|
@echo " - deps-backend install backend dependencies"
|
||||||
@echo " - deps-tools install tool dependencies"
|
@echo " - deps-tools install tool dependencies"
|
||||||
@ -375,11 +374,11 @@ lint-backend-fix: lint-go-fix lint-go-vet lint-editorconfig
|
|||||||
|
|
||||||
.PHONY: lint-js
|
.PHONY: lint-js
|
||||||
lint-js: node_modules
|
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
|
.PHONY: lint-js-fix
|
||||||
lint-js-fix: node_modules
|
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
|
.PHONY: lint-css
|
||||||
lint-css: node_modules
|
lint-css: node_modules
|
||||||
@ -889,20 +888,14 @@ release-sources: | $(DIST_DIRS)
|
|||||||
|
|
||||||
.PHONY: release-docs
|
.PHONY: release-docs
|
||||||
release-docs: | $(DIST_DIRS) 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
|
.PHONY: docs
|
||||||
docs: deps-docs
|
docs:
|
||||||
cd docs; make trans-copy clean build-offline;
|
cd docs; bash scripts/trans-copy.sh;
|
||||||
|
|
||||||
.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
|
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps: deps-frontend deps-backend deps-tools deps-docs
|
deps: deps-frontend deps-backend deps-tools
|
||||||
|
|
||||||
.PHONY: deps-frontend
|
.PHONY: deps-frontend
|
||||||
deps-frontend: node_modules
|
deps-frontend: node_modules
|
||||||
|
@ -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 $@)
|
|
@ -3,36 +3,7 @@
|
|||||||
[](https://discord.gg/Gitea)
|
[](https://discord.gg/Gitea)
|
||||||
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
## Hosting
|
These docs are ingested by our [docs repo](https://gitea.com/gitea/gitea-docusaurus).
|
||||||
|
|
||||||
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/overview/installing/) 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
|
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
|
@ -4,27 +4,7 @@
|
|||||||
[](https://discord.gg/Gitea)
|
[](https://discord.gg/Gitea)
|
||||||
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
[](http://microbadger.com/images/gitea/docs "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
## 关于托管方式
|
https://gitea.com/gitea/gitea-docusaurus
|
||||||
|
|
||||||
本页面托管在我们 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
|
|
||||||
|
|
||||||
## 关于我们
|
## 关于我们
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
369
docs/config.yaml
369
docs/config.yaml
File diff suppressed because it is too large
Load Diff
@ -2,12 +2,12 @@
|
|||||||
date: "2023-04-27T14:00:00+08:00"
|
date: "2023-04-27T14:00:00+08:00"
|
||||||
title: "Actions"
|
title: "Actions"
|
||||||
slug: "actions"
|
slug: "actions"
|
||||||
weight: 36
|
sidebar_position: 36
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Usage - Actions"
|
name: "Usage - Actions"
|
||||||
weight: 31
|
sidebar_position: 31
|
||||||
identifier: "actions"
|
identifier: "actions"
|
||||||
---
|
---
|
@ -2,13 +2,13 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "Administration"
|
title: "Administration"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Administration"
|
name: "Administration"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
collapse: true
|
collapse: true
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
@ -2,12 +2,12 @@
|
|||||||
date: "2017-08-23T09:00:00+02:00"
|
date: "2017-08-23T09:00:00+02:00"
|
||||||
title: "Avancé"
|
title: "Avancé"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "Avancé"
|
name: "Avancé"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "运维"
|
title: "运维"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "运维"
|
name: "运维"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
@ -2,12 +2,12 @@
|
|||||||
date: "2016-12-01T16:00:00+02:00"
|
date: "2016-12-01T16:00:00+02:00"
|
||||||
title: "運維"
|
title: "運維"
|
||||||
slug: "administration"
|
slug: "administration"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
menu:
|
menu:
|
||||||
sidebar:
|
sidebar:
|
||||||
name: "運維"
|
name: "運維"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "administration"
|
identifier: "administration"
|
||||||
---
|
---
|
@ -2,7 +2,7 @@
|
|||||||
date: "2019-12-28"
|
date: "2019-12-28"
|
||||||
title: "Adding Legal Pages"
|
title: "Adding Legal Pages"
|
||||||
slug: adding-legal-pages
|
slug: adding-legal-pages
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Adding Legal Pages"
|
name: "Adding Legal Pages"
|
||||||
identifier: "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.
|
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.
|
@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "添加法律页面"
|
title: "添加法律页面"
|
||||||
slug: adding-legal-pages
|
slug: adding-legal-pages
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "添加法律页面"
|
name: "添加法律页面"
|
||||||
identifier: "adding-legal-pages"
|
identifier: "adding-legal-pages"
|
||||||
weight: 110
|
sidebar_position: 110
|
||||||
---
|
---
|
||||||
|
|
||||||
一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。
|
一些法域(例如欧盟)要求在网站上添加特定的法律页面(例如隐私政策)。按照以下步骤将它们添加到你的 Gitea 实例中。
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "Backup and Restore"
|
title: "Backup and Restore"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Backup and Restore"
|
name: "Backup and Restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
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
|
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.
|
file can be unpacked and used to restore an instance.
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Backup Consistency
|
## Backup Consistency
|
||||||
|
|
||||||
To ensure the consistency of the Gitea instance, it must be shutdown during backup.
|
To ensure the consistency of the Gitea instance, it must be shutdown during backup.
|
@ -2,7 +2,7 @@
|
|||||||
date: "2018-06-06T09:33:00+08:00"
|
date: "2018-06-06T09:33:00+08:00"
|
||||||
title: "备份与恢复"
|
title: "备份与恢复"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "备份与恢复"
|
name: "备份与恢复"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
identifier: "backup-and-restore"
|
||||||
---
|
---
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "用法: 備份與還原"
|
title: "用法: 備份與還原"
|
||||||
slug: "backup-and-restore"
|
slug: "backup-and-restore"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "備份與還原"
|
name: "備份與還原"
|
||||||
weight: 11
|
sidebar_position: 11
|
||||||
identifier: "backup-and-restore"
|
identifier: "backup-and-restore"
|
||||||
---
|
---
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2020-01-25T21:00:00-03:00"
|
date: "2020-01-25T21:00:00-03:00"
|
||||||
title: "Embedded data extraction tool"
|
title: "Embedded data extraction tool"
|
||||||
slug: "cmd-embedded"
|
slug: "cmd-embedded"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,19 +11,15 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Embedded data extraction tool"
|
name: "Embedded data extraction tool"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "cmd-embedded"
|
identifier: "cmd-embedded"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Embedded data extraction tool
|
# Embedded data extraction tool
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea's executable contains all the resources required to run: templates, images, style-sheets
|
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
|
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
|
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.
|
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.
|
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
|
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
|
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.
|
The `--overwrite` flag allows any existing files in the destination directory to be overwritten.
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "嵌入资源提取工具"
|
title: "嵌入资源提取工具"
|
||||||
slug: "cmd-embedded"
|
slug: "cmd-embedded"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,17 +11,13 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "嵌入资源提取工具"
|
name: "嵌入资源提取工具"
|
||||||
weight: 20
|
sidebar_position: 20
|
||||||
identifier: "cmd-embedded"
|
identifier: "cmd-embedded"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 嵌入资源提取工具
|
# 嵌入资源提取工具
|
||||||
|
|
||||||
**目录**
|
Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置](administration/customizing-gitea.md))。
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 的可执行文件包含了运行所需的所有资源:模板、图片、样式表和翻译文件。你可以通过在 `custom` 目录下的相应路径中放置替换文件来覆盖其中的任何资源(详见 [自定义 Gitea 配置]({{< relref "doc/administration/customizing-gitea.zh-cn.md" >}}))。
|
|
||||||
|
|
||||||
要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。
|
要获取嵌入资源的副本以进行编辑,可以使用 CLI 中的 `embedded` 命令,通过操作系统的 shell 执行。
|
||||||
|
|
||||||
@ -75,7 +71,7 @@ gitea [--config {file}] embedded extract [--destination {dir}|--custom] [--overw
|
|||||||
|
|
||||||
`--destination` 选项用于指定提取文件的目标目录。默认为当前目录。
|
`--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` 标志允许覆盖目标目录中的任何现有文件。
|
`--overwrite` 标志允许覆盖目标目录中的任何现有文件。
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-01-01T16:00:00+02:00"
|
date: "2017-01-01T16:00:00+02:00"
|
||||||
title: "Gitea Command Line"
|
title: "Gitea Command Line"
|
||||||
slug: "command-line"
|
slug: "command-line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Command Line"
|
name: "Command Line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
identifier: "command-line"
|
identifier: "command-line"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Command Line
|
# Command Line
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
`gitea [global options] command [command or global options] [arguments...]`
|
`gitea [global options] command [command or global options] [arguments...]`
|
@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "Gitea 命令行"
|
title: "Gitea 命令行"
|
||||||
slug: "command-line"
|
slug: "command-line"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Gitea 命令行"
|
name: "Gitea 命令行"
|
||||||
weight: 1
|
sidebar_position: 1
|
||||||
identifier: "command-line"
|
identifier: "command-line"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 命令行
|
# 命令行
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## 用法
|
## 用法
|
||||||
|
|
||||||
`gitea [全局选项] 命令 [命令或全局选项] [参数...]`
|
`gitea [全局选项] 命令 [命令或全局选项] [参数...]`
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
date: "2016-12-26T16:00:00+02:00"
|
date: "2016-12-26T16:00:00+02:00"
|
||||||
title: "配置说明"
|
title: "配置说明"
|
||||||
slug: "config-cheat-sheet"
|
slug: "config-cheat-sheet"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "配置说明"
|
name: "配置说明"
|
||||||
weight: 30
|
sidebar_position: 30
|
||||||
identifier: "config-cheat-sheet"
|
identifier: "config-cheat-sheet"
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -26,8 +26,6 @@ menu:
|
|||||||
|
|
||||||
此文档的内容可能过于陈旧或者错误,请参考英文文档。
|
此文档的内容可能过于陈旧或者错误,请参考英文文档。
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Overall (`DEFAULT`)
|
## Overall (`DEFAULT`)
|
||||||
|
|
||||||
- `APP_NAME`: 应用名称,改成你希望的名字。
|
- `APP_NAME`: 应用名称,改成你希望的名字。
|
||||||
@ -46,7 +44,7 @@ menu:
|
|||||||
|
|
||||||
### Repository - Release (`repository.release`)
|
### Repository - Release (`repository.release`)
|
||||||
|
|
||||||
- `ALLOWED_TYPES`: **\<empty\>**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
|
- `ALLOWED_TYPES`: **_empty_**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。
|
||||||
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
|
- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。
|
||||||
|
|
||||||
## UI (`ui`)
|
## UI (`ui`)
|
||||||
@ -187,7 +185,7 @@ menu:
|
|||||||
- `ENABLED`: **true**: 是否启用。
|
- `ENABLED`: **true**: 是否启用。
|
||||||
- `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。
|
- `ADAPTER`: **memory**: 缓存引擎,可以为 `memory`, `redis` 或 `memcache`。
|
||||||
- `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。
|
- `INTERVAL`: **60**: 只对内存缓存有效,GC间隔,单位秒。
|
||||||
- `HOST`: **\<empty\>**: 针对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`
|
- 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`
|
- Memache: `127.0.0.1:9090;127.0.0.1:9091`
|
||||||
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
|
- `ITEM_TTL`: **16h**: 缓存项目失效时间,设置为 -1 则禁用缓存。
|
||||||
@ -392,8 +390,8 @@ ALLOW_DATA_URI_IMAGES = true
|
|||||||
|
|
||||||
- `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。
|
- `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。
|
||||||
- `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。
|
- `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。
|
||||||
- `ALLOWED_DOMAINS`: **\<empty\>**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。
|
- `ALLOWED_DOMAINS`: **_empty_**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。
|
||||||
- `BLOCKED_DOMAINS`: **\<empty\>**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。
|
- `BLOCKED_DOMAINS`: **_empty_**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项有更高的优先级拒绝这里的域名。
|
||||||
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918
|
- `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918
|
||||||
- `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证
|
- `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证
|
||||||
|
|
||||||
@ -515,8 +513,8 @@ Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配
|
|||||||
## Proxy (`proxy`)
|
## Proxy (`proxy`)
|
||||||
|
|
||||||
- `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用
|
- `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用
|
||||||
- `PROXY_URL`: **\<empty\>**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy
|
- `PROXY_URL`: **_empty_**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy
|
||||||
- `PROXY_HOSTS`: **\<empty\>**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
- `PROXY_HOSTS`: **_empty_**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站
|
||||||
|
|
||||||
i.e.
|
i.e.
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-15T14:56:00+02:00"
|
date: "2017-04-15T14:56:00+02:00"
|
||||||
title: "Customizing Gitea"
|
title: "Customizing Gitea"
|
||||||
slug: "customizing-gitea"
|
slug: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -12,7 +12,7 @@ menu:
|
|||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Customizing Gitea"
|
name: "Customizing Gitea"
|
||||||
identifier: "customizing-gitea"
|
identifier: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
---
|
---
|
||||||
|
|
||||||
# Customizing Gitea
|
# 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.
|
**Note:** Gitea must perform a full restart to see configuration changes.
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
## Serving custom public files
|
## Serving custom public files
|
||||||
|
|
||||||
To make Gitea serve custom public files (like pages and images), use the folder
|
To make Gitea serve custom public files (like pages and images), use the folder
|
||||||
@ -86,7 +82,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/),
|
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.
|
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
|
Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and
|
||||||
shouldn't be touched without fully understanding these components.
|
shouldn't be touched without fully understanding these components.
|
||||||
@ -314,7 +310,7 @@ The [legacy file format](https://github.com/go-gitea/gitea/blob/main/options/lab
|
|||||||
|
|
||||||
`#hex-color label name ; label description`
|
`#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
|
### Licenses
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-15T14:56:00+02:00"
|
date: "2017-04-15T14:56:00+02:00"
|
||||||
title: "自定义 Gitea 配置"
|
title: "自定义 Gitea 配置"
|
||||||
slug: "customizing-gitea"
|
slug: "customizing-gitea"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,7 +11,7 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "自定义 Gitea 配置"
|
name: "自定义 Gitea 配置"
|
||||||
weight: 100
|
sidebar_position: 100
|
||||||
identifier: "customizing-gitea"
|
identifier: "customizing-gitea"
|
||||||
---
|
---
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2019-10-15T10:10:00+05:00"
|
date: "2019-10-15T10:10:00+05:00"
|
||||||
title: "Email setup"
|
title: "Email setup"
|
||||||
slug: "email-setup"
|
slug: "email-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Email setup"
|
name: "Email setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "email-setup"
|
identifier: "email-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# 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.
|
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
|
## 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.
|
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:
|
Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through:
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
date: "2023-05-23T09:00:00+08:00"
|
date: "2023-05-23T09:00:00+08:00"
|
||||||
title: "Email 设置"
|
title: "Email 设置"
|
||||||
slug: "email-setup"
|
slug: "email-setup"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Email 设置"
|
name: "Email 设置"
|
||||||
weight: 12
|
sidebar_position: 12
|
||||||
identifier: "email-setup"
|
identifier: "email-setup"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Email 设置
|
# Email 设置
|
||||||
|
|
||||||
**目录**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。
|
Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮件)。它可以配置为使用 Sendmail(或兼容的 MTA,例如 Postfix 和 msmtp)或直接使用 SMTP 服务器。
|
||||||
|
|
||||||
## 使用 Sendmail
|
## 使用 Sendmail
|
@ -2,7 +2,7 @@
|
|||||||
date: "2017-04-08T11:34:00+02:00"
|
date: "2017-04-08T11:34:00+02:00"
|
||||||
title: "Environment variables"
|
title: "Environment variables"
|
||||||
slug: "environment-variables"
|
slug: "environment-variables"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
toc: false
|
toc: false
|
||||||
draft: false
|
draft: false
|
||||||
aliases:
|
aliases:
|
||||||
@ -11,16 +11,12 @@ menu:
|
|||||||
sidebar:
|
sidebar:
|
||||||
parent: "administration"
|
parent: "administration"
|
||||||
name: "Environment variables"
|
name: "Environment variables"
|
||||||
weight: 10
|
sidebar_position: 10
|
||||||
identifier: "environment-variables"
|
identifier: "environment-variables"
|
||||||
---
|
---
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
|
|
||||||
**Table of Contents**
|
|
||||||
|
|
||||||
{{< toc >}}
|
|
||||||
|
|
||||||
This is an inventory of Gitea environment variables. They change Gitea behaviour.
|
This is an inventory of Gitea environment variables. They change Gitea behaviour.
|
||||||
|
|
||||||
Initialize them before Gitea command to be effective, for example:
|
Initialize them before Gitea command to be effective, for example:
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user