Create documentation website

This commit is contained in:
n 2020-06-27 19:31:59 +09:00
parent 241300bd54
commit d701f07932
73 changed files with 11801 additions and 27 deletions

202
LICENSE Normal file
View file

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

30
Makefile Normal file
View file

@ -0,0 +1,30 @@
THEME := themes/gitea
PUBLIC := public
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
.PHONY: all
all: build
.PHONY: clean
clean:
rm -rf $(PUBLIC) $(THEME)
.PHONY: trans-copy
trans-copy:
@bash scripts/trans-copy
.PHONY: server
server: $(THEME)
hugo server
.PHONY: build
build: $(THEME)
hugo --cleanDestinationDir
.PHONY: update
update: $(THEME)
$(THEME): $(THEME)/theme.toml
$(THEME)/theme.toml:
mkdir -p $$(dirname $@)
curl -s $(ARCHIVE) | tar xz -C $$(dirname $@)

View file

@ -1,22 +0,0 @@
# Basic topics
## Start with Codeberg...
[Create a repository](https://codeberg.org/Codeberg/Documentation/wiki/Create-repository)
[SSH key for Codeberg](https://codeberg.org/Codeberg/Documentation/wiki/SSH-key-for-Codeberg)
## Work with Codeberg...
[Clone & commit via HTTP (username & password)](https://codeberg.org/Codeberg/Documentation/wiki/Clone-%26-commit-via-HTTP-%28username-%26-password%29)
[Clone & commit via SSH (key file)](https://codeberg.org/Codeberg/Documentation/wiki/Clone-%26-commit-via-SSH)
# Advanced topics
[Pull requests and GIT flow](https://codeberg.org/Codeberg/Documentation/wiki/Pull-requests-and-GIT-flow)
[Merge multiple commits into one](https://codeberg.org/Codeberg/Documentation/wiki/Merge-multiple-commits-into-one)
# Wiki related topics
[Including images in wiki pages](https://codeberg.org/Codeberg/Documentation/wiki/Including-images-in-wiki-pages)
# Other Codeberg related topics
[Terms of use](https://codeberg.org/codeberg/org/src/branch/master/TermsOfUse.md)
[All Codeberg Wiki Pages](https://codeberg.org/Codeberg/Documentation/wiki/_pages)

View file

@ -1,2 +1,55 @@
Please have a look into and consider to help writing documentation. This is still very much work-in-progress, the more useful material we collect, the better we can later present it! All contributions very welcome!
#### Please have a look into and consider to help writing the Documentation Wiki. This is still very much work-in-progress, the more useful material we collect, the better we can later present it! All contributions very welcome!
---
# Codeberg: Documentation
## Hosting
TBD
## 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
* [Maintainers](https://github.com/orgs/go-gitea/people)
* [Contributors](https://codeberg.org/Codeberg/Documentation/activity/yearly)
Forked from [go-gitea/docs](https://github.com/go-gitea/docs/)
* [Maintainers](https://github.com/orgs/go-gitea/people)
* [Contributors](https://github.com/go-gitea/docs/graphs/contributors)
## License
This project is under the Apache-2.0 License. See the [LICENSE](LICENSE) file
for the full license text.
## Copyright
```
Copyright (c) 2016 The Gitea Authors <https://gitea.io>
```

174
assets/js/search.js Normal file
View file

@ -0,0 +1,174 @@
/* 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.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.innerText = 'Please enter a word or phrase above';
document.getElementById('search-results').appendChild(para);
}
}
function getJSON(url, fn) {
const request = new XMLHttpRequest();
request.open('GET', url, true);
request.onload = function () {
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.onerror = function () {
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.innerText = 'No matches found';
document.getElementById('search-results').appendChild(para);
}
});
}
function populateResults(result) {
result.forEach((value, key) => {
const content = value.item.contents;
let snippet = '';
const snippetHighlights = [];
if (fuseOptions.tokenize) {
snippetHighlights.push(searchQuery);
value.matches.forEach((mvalue) => {
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').appendChild(htmlToElement(output));
snippetHighlights.forEach((snipvalue) => {
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.lastInxdex, 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;
}

55
config.yaml Normal file
View file

@ -0,0 +1,55 @@
baseurl: https://docs.codeberg.org/
languageCode: en-us
title: Docs
theme: gitea
defaultContentLanguage: en-us
defaultContentLanguageInSubdir: true
enableMissingTranslationPlaceholders: true
enableEmoji: true
permalinks:
post: /:year/:month/:title/
doc: /:slug/
page: /:slug/
default: /:slug/
params:
description: Git with a cup of tea
author: The Codeberg Authors
website: https://docs.codeberg.org
version: 1.12.1
minGoVersion: 1.12
goVersion: 1.14
minNodeVersion: 10.13
outputs:
home:
- HTML
- RSS
- JSON
menu:
page:
- name: Codeberg
url: https://codeberg.org/
weight: 10
pre: home
- name: Docs
url: /
weight: 20
pre: question
post: active
- name: Blog
url: https://blog.codeberg.org/
weight: 30
pre: feed
- name: Our Code
url: https://codeberg.org/Codeberg/
weight: 60
pre: git
languages:
en-us:
weight: 0
languageName: English

View file

@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Advanced"
slug: "advanced"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Advanced"
weight: 40
identifier: "advanced"
---

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -0,0 +1,37 @@
---
date: "2019-08-27:00:00+02:00"
title: "CI/CD Usage"
slug: "ci-cd"
weight: 40
toc: true
draft: false
menu:
sidebar:
parent: "advanced"
name: "CI/CD Usage"
weight: 40
identifier: "ci-cd"
---
# Gitea and CI/CD
**NOTE:** These tools are not endorsed by Gitea. They are listed here for convenience only.
## Hey! This page may be out of date or even removed in the future! :scream:
Instead, check out [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md#user-content-devops)!
## Listing
CI/CD solutions that have integration with Gitea. Following list is not complete,
the purpose is to give a starting point to integrate a CI/CD process with your Gitea instance.
- [Drone](https://drone.io) with [Gitea documentation](https://docs.drone.io/installation/providers/gitea/)
- [Jenkins](https://jenkins.io/) with [Gitea plugin](https://plugins.jenkins.io/gitea)
- [Agola](https://agola.io)
- [Buildkite](https://buildkite.com) with [Gitea connector](https://github.com/techknowlogick/gitea-buildkite-connector)
- [AppVeyor](https://www.appveyor.com) with [built-in Gitea support](https://www.appveyor.com/blog/2019/09/05/gitea-receives-first-class-support-in-appveyor/)
- [Buildbot](https://www.buildbot.net/) with [Gitea plugin](https://github.com/lab132/buildbot-gitea)
Others CI/CD solutions that can partially be integrated with Gitea:
- [Concourse](https://www.concourse-ci.org), see more information at [Concourse community forum](https://discuss.concourse-ci.org/t/concourse-ci-and-gitea-oauth/1475)

View file

@ -1,3 +1,19 @@
---
date: "2020-05-27T14:15:39+02:00"
title: "Advanced: Merge multiple commits into one"
slug: "merge-multiple-commits-into-one"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "advanced"
name: "Merge multiple commits into one"
weight: 50
identifier: "merge-multiple-commits-into-one"
---
# Merge multiple commits into one
Sometimes you will merge multiple commits into one. Maybe the commits are "dirty" full with not working code or embarrasing commit messages. This solution is only one of mutliple possible solutions. See this [stackoverflow question](https://stackoverflow.com/q/2563632/4865723) for more details and variants.
Here is an example.

View file

@ -1,3 +1,20 @@
---
date: "2019-09-17T10:53:29+02:00"
title: "Advanced: Pull requests and Git flow"
slug: "pull-requests-and-git-flow"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "advanced"
name: "Pull requests and Git flow"
weight: 50
identifier: "pull-requests-and-git-flow"
---
# Pull requests and Git flow
## Benefits of a pull-request based workflow
> ***&TLDR;*** *Keep an eye on your repository and org permissions. Don't take sweets from strangers. Use pull requests. Easy to review, easy to manage, and only the project maintainers/owners need full access to the repo to merge them.*

View file

@ -0,0 +1,42 @@
---
date: "2018-05-22T11:00:00+00:00"
title: "Advanced: Third Party Tools"
slug: "third-party-tools"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "advanced"
name: "Third Party Tools"
weight: 50
identifier: "third-party-tools"
---
# List of third-party tools
**NOTE:** These tools are not endorsed by Gitea. They are listed here for convenience only.
## Hey! This page may be out of date or even removed in the future! :scream:
Instead, check out [awesome-gitea](https://gitea.com/gitea/awesome-gitea/src/branch/master/README.md)!
### Continuous Integration
Check our [CI/CD page]({{< relref "doc/advanced/ci-cd.en-us.md" >}})
### Internationalization
- [Weblate](https://docs.weblate.org/en/latest/admin/continuous.html#gitea-setup)
### Migrating
- [Installation script for Gitea](https://git.coolaj86.com/coolaj86/gitea-installer.sh)
- [GitHub Migrator](https://gitea.com/gitea/migrator)
### Mobile
- [GitNex for Android](https://gitlab.com/mmarif4u/gitnex)
### Editor Extensions
- [Gitea Extension for Visual Studio](https://github.com/maikebing/Gitea.VisualStudio)
- Download from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=MysticBoy.GiteaExtensionforVisualStudio)
### Project Management
- [YouTrack by JetBrains](https://blog.jetbrains.com/youtrack/2019/12/whats-new-in-youtrack-2019-3/)

View file

@ -0,0 +1,13 @@
---
date: "2020-06-27"
title: "Authentication"
slug: "authentication"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Authentication"
weight: 40
identifier: "authentication"
---

View file

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View file

@ -1,3 +1,18 @@
---
date: "2020-05-27T14:15:39+02:00"
title: "Authentication: Clone & commit via HTTP (username & password)"
slug: "clone-commit-via-http"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "authentication"
name: "Clone & commit via HTTP"
weight: 50
identifier: "clone-commit-via-http"
---
# Clone & commit via HTTP (username & password)
The user in this examples is `JohnDoe` and it's repository is `foobar`. The repository was created via the Codeberg.org website including a `README.md` file.

View file

@ -1,4 +1,19 @@
# Clone
---
date: "2020-05-27T13:55:00+02:00"
title: "Authentication: Clone & commit via SSH"
slug: "clone-commit-via-ssh"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "authentication"
name: "Clone & commit via SSH"
weight: 50
identifier: "clone-commit-via-ssh"
---
# Clone & commit via SSH
The user in this examples is `JohnDoe` and it's repository is `foobar`. The repository was [created](https://codeberg.org/Codeberg/Documentation/wiki/Create-repository---Local-and-on-Codeberg) via the Codeberg.org website including a `README.md` file.
```bash

View file

@ -1,5 +1,20 @@
---
date: "2020-05-13T14:08:56+02:00"
title: "Authentication: SSH key for Codeberg"
slug: "ssh-key"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "authentication"
name: "SSH key for Codeberg"
weight: 50
identifier: "ssh-key"
---
# Introduction
It is recommanded to use one key per client. It means if you access your Codeberg repository from your home PC, your laptop and your office PC you should generate spearate keys for each machine.
It is reccomended to use one key per client. It means if you access your Codeberg repository from your home PC, your laptop and your office PC you should generate spearate keys for each machine.
In the context of Codeberg you should decide yourself if you add a pasphrase to your SSH key or not. Read the on-going discussion about that topic in this [Codeberg-Issue](https://codeberg.org/Codeberg/Documentation/issues/2).

View file

@ -0,0 +1,13 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Features"
slug: "features"
weight: 20
toc: false
draft: false
menu:
sidebar:
name: "Features"
weight: 30
identifier: "features"
---

View file

@ -0,0 +1,186 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Webhooks"
slug: "webhooks"
weight: 10
toc: true
draft: false
menu:
sidebar:
parent: "features"
name: "Webhooks"
weight: 30
identifier: "webhooks"
---
# Webhooks
Gitea supports web hooks for repository events. This can be configured in the settings
page `/:username/:reponame/settings/hooks` by a repository admin. Webhooks can also be configured on a per-organization and whole system basis.
All event pushes are POST requests. The methods currently supported are:
- Gitea (can also be a GET request)
- Gogs
- Slack
- Discord
- Dingtalk
- Telegram
- Microsoft Teams
- Feishu
### Event information
The following is an example of event information that will be sent by Gitea to
a Payload URL:
```
X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-GitHub-Event: push
X-Gogs-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-Gogs-Event: push
X-Gitea-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473
X-Gitea-Event: push
```
```json
{
"secret": "3gEsCfjlV2ugRwgpU#w1*WaW*wa4NXgGmpCfkbG3",
"ref": "refs/heads/develop",
"before": "28e1879d029cb852e4844d9c718537df08844e03",
"after": "bffeb74224043ba2feb48d137756c8a9331c449a",
"compare_url": "http://localhost:3000/gitea/webhooks/compare/28e1879d029cb852e4844d9c718537df08844e03...bffeb74224043ba2feb48d137756c8a9331c449a",
"commits": [
{
"id": "bffeb74224043ba2feb48d137756c8a9331c449a",
"message": "Webhooks Yay!",
"url": "http://localhost:3000/gitea/webhooks/commit/bffeb74224043ba2feb48d137756c8a9331c449a",
"author": {
"name": "Gitea",
"email": "someone@gitea.io",
"username": "gitea"
},
"committer": {
"name": "Gitea",
"email": "someone@gitea.io",
"username": "gitea"
},
"timestamp": "2017-03-13T13:52:11-04:00"
}
],
"repository": {
"id": 140,
"owner": {
"id": 1,
"login": "gitea",
"full_name": "Gitea",
"email": "someone@gitea.io",
"avatar_url": "https://localhost:3000/avatars/1",
"username": "gitea"
},
"name": "webhooks",
"full_name": "gitea/webhooks",
"description": "",
"private": false,
"fork": false,
"html_url": "http://localhost:3000/gitea/webhooks",
"ssh_url": "ssh://gitea@localhost:2222/gitea/webhooks.git",
"clone_url": "http://localhost:3000/gitea/webhooks.git",
"website": "",
"stars_count": 0,
"forks_count": 1,
"watchers_count": 1,
"open_issues_count": 7,
"default_branch": "master",
"created_at": "2017-02-26T04:29:06-05:00",
"updated_at": "2017-03-13T13:51:58-04:00"
},
"pusher": {
"id": 1,
"login": "gitea",
"full_name": "Gitea",
"email": "someone@gitea.io",
"avatar_url": "https://localhost:3000/avatars/1",
"username": "gitea"
},
"sender": {
"id": 1,
"login": "gitea",
"full_name": "Gitea",
"email": "someone@gitea.io",
"avatar_url": "https://localhost:3000/avatars/1",
"username": "gitea"
}
}
```
### Example
This is an example of how to use webhooks to run a php script upon push requests to the repository.
In your repository Settings, under Webhooks, Setup a Gitea webhook as follows:
- Target URL: http://mydomain.com/webhook.php
- HTTP Method: POST
- POST Content Type: application/json
- Secret: 123
- Trigger On: Push Events
- Active: Checked
Now on your server create the php file webhook.php
```
<?php
$secret_key = '123';
// check for POST request
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
error_log('FAILED - not POST - '. $_SERVER['REQUEST_METHOD']);
exit();
}
// get content type
$content_type = isset($_SERVER['CONTENT_TYPE']) ? strtolower(trim($_SERVER['CONTENT_TYPE'])) : '';
if ($content_type != 'application/json') {
error_log('FAILED - not application/json - '. $content_type);
exit();
}
// get payload
$payload = trim(file_get_contents("php://input"));
if (empty($payload)) {
error_log('FAILED - no payload');
exit();
}
// get header signature
$header_signature = isset($_SERVER['HTTP_X_GITEA_SIGNATURE']) ? $_SERVER['HTTP_X_GITEA_SIGNATURE'] : '';
if (empty($header_signature)) {
error_log('FAILED - header signature missing');
exit();
}
// calculate payload signature
$payload_signature = hash_hmac('sha256', $payload, $secret_key, false);
// check payload signature against header signature
if ($header_signature != $payload_signature) {
error_log('FAILED - payload signature');
exit();
}
// convert json to array
$decoded = json_decode($payload, true);
// check for json decode errors
if (json_last_error() !== JSON_ERROR_NONE) {
error_log('FAILED - json decode - '. json_last_error());
exit();
}
// success, do something
```
There is a Test Delivery button in the webhook settings that allows to test the configuration as well as a list of the most Recent Deliveries.

View file

@ -0,0 +1,13 @@
---
date: "2020-06-27"
title: "Getting Started"
slug: "getting-started"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Getting Started"
weight: 40
identifier: "getting-started"
---

View file

@ -1,3 +1,18 @@
---
date: "2020-05-27T13:53:42+02:00"
title: "Getting Started: Create a repository"
slug: "create-repository"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "getting-started"
name: "Create a repository"
weight: 50
identifier: "create-repository"
---
# Create a Codeberg repository
To create a new repository you need to login into your account on Codeberg.org.

View file

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View file

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

13
content/doc/help.en-us.md Normal file
View file

@ -0,0 +1,13 @@
---
date: "2017-01-20T15:00:00+08:00"
title: "Help"
slug: "help"
weight: 5
toc: false
draft: false
menu:
sidebar:
name: "Help"
weight: 5
identifier: "help"
---

View file

@ -0,0 +1,48 @@
---
date: "2019-04-05T16:00:00+02:00"
title: "FAQ"
slug: "faq"
weight: 5
toc: true
draft: false
menu:
sidebar:
parent: "help"
name: "FAQ"
weight: 5
identifier: "faq"
---
# Frequently Asked Questions
This page contains some common questions and answers.
Also see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}})
* [How to migrate from GitHub/etc. to Codeberg](#how-to-migrate-from-gogs-github-etc-to-codeberg)
* [Translation is incorrect/how to add more translations](#translation-is-incorrect-how-to-add-more-translations)
* [Hooks aren't running](#hooks-aren-t-running)
* [Why is my markdown broken](#why-is-my-markdown-broken)
## How to migrate from GitHub/etc. to Codeberg
To migrate to Codeberg:
To migrate from GitHub to Codeberg, you can use Gitea's built-in migration form.
In order to migrate items such as issues, pull requests, etc. you will need to input at least your username.
[Example (requires login)](https://try.gitea.io/repo/migrate)
To migrate from Gitlab to Codeberg, you can use this non-affiliated tool:
https://github.com/loganinak/MigrateGitlabToGogs
## Translation is incorrect/how to add more translations
Our translations are currently crowd-sourced from the Gitea [Crowdin project](https://crowdin.com/project/gitea)
Whether you want to change a translation or add a new one, it will need to be there as all translations are overwritten in our CI via the Crowdin integration.
## Hooks aren't running
If Codeberg is not running hooks, a common cause is incorrect setup of SSH keys.
You can also try logging into the administration panel and running the `Resynchronize pre-receive, update and post-receive hooks of all repositories.` option.
## Why is my markdown broken
In Gitea version `1.11` we moved to [goldmark](https://github.com/yuin/goldmark) for markdown rendering, which is [CommonMark](https://commonmark.org/) compliant.
If you have markdown that worked as you expected prior to version `1.11` and after upgrading it's not working anymore, please look through the CommonMark spec to see whether the problem is due to a bug or non-compliant syntax.
If it is the latter, _usually_ there is a compliant alternative listed in the spec.

View file

@ -0,0 +1,25 @@
---
date: "2019-11-12T16:00:00+02:00"
title: "Search"
slug: "search"
weight: 4
toc: true
draft: false
menu:
sidebar:
parent: "help"
name: "Search"
weight: 4
identifier: "search"
sitemap:
priority : 0.1
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
Setting a very low sitemap priority will tell search engines this is not important content.

View file

@ -0,0 +1,20 @@
---
date: "2018-05-21T15:00:00+00:00"
title: "Support Options"
slug: "seek-help"
weight: 10
toc: true
draft: false
menu:
sidebar:
parent: "help"
name: "Support Options"
weight: 20
identifier: "seek-help"
---
# Support Options
## Bugs
If you found a bug, please create an [issue on Codeberg/Community](https://codeberg.org/Codeberg/Community/issues).

View file

@ -0,0 +1,44 @@
---
date: "2018-05-10T16:00:00+02:00"
title: "Usage: Issue and Pull Request templates"
slug: "issue-pull-request-templates"
weight: 15
toc: true
draft: false
menu:
sidebar:
parent: "usage"
name: "Issue and Pull Request templates"
weight: 15
identifier: "issue-pull-request-templates"
---
# Issue and Pull Request Templates
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
creating issues and pull requests. This will cut down on the initial back and forth
of getting some clarifying details.
Possible file names for issue templates:
* ISSUE_TEMPLATE.md
* issue_template.md
* .gitea/ISSUE_TEMPLATE.md
* .gitea/issue_template.md
* .github/ISSUE_TEMPLATE.md
* .github/issue_template.md
Possible file names for PR templates:
* PULL_REQUEST_TEMPLATE.md
* pull_request_template.md
* .gitea/PULL_REQUEST_TEMPLATE.md
* .gitea/pull_request_template.md
* .github/PULL_REQUEST_TEMPLATE.md
* .github/pull_request_template.md
Additionally, the New Issue page URL can be suffixed with `?body=Issue+Text` and the form will be populated with that string. This string will be used instead of the template if there is one.

View file

@ -0,0 +1,173 @@
---
date: "2019-11-21T17:00:00-03:00"
title: "Usage: Automatically Linked References"
slug: "automatically-linked-references"
weight: 15
toc: true
draft: false
menu:
sidebar:
parent: "usage"
name: "Automatically Linked References"
weight: 15
identifier: "automatically-linked-references"
---
# Automatically Linked References in Issues, Pull Requests and Commit Messages
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_.
Likewise, commit messages are parsed when they are listed, and _actions_
are can be triggered when they are pushed to the main branch.
To prevent the creation of unintended references, there are certain rules
for them to be recognized. For example, they should not be included inside code
text. They should also be reasonably cleared from their surrounding text
(for example, using spaces).
## User, Team and Organization Mentions
When a text in the form `@username` is found and `username` matches the name
of an existing user, a _mention_ reference is created. This will be shown
by changing the text into a link to said user's profile, and possibly create
a notification for the mentioned user depending on whether they have
the necessary permission to access the contents.
Example:
> [@John](#), can you give this a look?
This is also valid for teams and organizations:
> [@Documenters](#), we need to plan for this.
> [@CoolCompanyInc](#), this issue concerns us all!
Teams will receive mail notifications when appropriate, but whole organizations won't.
Commit messages do not produce user notifications.
## Commits
Commits can be referenced using their SHA1 hash, or a portion of it of
at least seven characters. They will be shown as a link to the corresponding
commit.
Example:
> This bug was introduced in [e59ff077](#)
## Issues and Pull Requests
A reference to another issue or pull request can be created using the simple
notation `#1234`, where _1234_ is the number of an issue or pull request
in the same repository. These references will be shown as links to the
referenced content.
The effect of creating this type of reference is that a _notice_ will be
created in the referenced document, provided the creator of the reference
has reading permissions on it.
Example:
> This seems related to [#1234](#)
Issues and pull requests in other repositories can be referred to as well
using the form `owner/repository#1234`:
> This seems related to [mike/compiler#1234](#)
Alternatively, the `!1234` notation can be used as well. Even when in Gitea
a pull request is a form of issue, the `#1234` form will always link to
an issue; if the linked entry happens to be a pull request instead, Gitea
will redirect as appropriate. With the `!1234` notation, a pull request
link will be created, which will be redirected to an issue if required.
However, this distinction could be important if an external tracker is
used, where links to issues and pull requests are not interchangeable.
## Actionable References in Pull Requests and Commit Messages
Sometimes a commit or pull request may fix or bring back a problem documented
in a particular issue. Gitea supports closing and reopening the referenced
issues by preceding the reference with a particular _keyword_. Common keywords
include "closes", "fixes", "reopens", etc. This list can be customized by the
site administrator.
Example:
> This PR _closes_ [#1234](#)
If the actionable reference is accepted, this will create a notice on the
referenced issue announcing that it will be closed when the referencing PR
is merged.
For an actionable reference to be accepted, _at least one_ of the following
conditions must be met:
* The commenter has permissions to close or reopen the issue at the moment
of creating the reference.
* The reference is inside a commit message.
* The reference is posted as part of the pull request description.
In the last case, the issue will be closed or reopened only if the merger
of the pull request has permissions to do so.
Additionally, only pull requests and commit messages can create an action,
and only issues can be closed or reopened this way.
The default _keywords_ are:
* **Closing**: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved
* **Reopening**: reopen, reopens, reopened
## External Trackers
Gitea supports the use of external issue trackers, and references to issues
hosted externally can be created in pull requests. However, if the external
tracker uses numbers to identify issues, they will be indistinguishable from
the pull requests hosted in Gitea. To address this, Gitea allows the use of
the `!` marker to identify pull requests. For example:
> This is issue [#1234](#), and links to the external tracker.
> This is pull request [!1234](#), and links to a pull request in Gitea.
The `!` and `#` can be used interchangeably for issues and pull request _except_
for this case, where a distinction is required. If the repository uses external
tracker, commit message for squash merge will use `!` as reference by default.
## Issues and Pull Requests References Summary
This table illustrates the different kinds of cross-reference for issues and pull requests.
In the examples, `User1/Repo1` refers to the repository where the reference is used, while
`UserZ/RepoZ` indicates a different repository.
| Reference in User1/Repo1 | Repo1 issues are external | RepoZ issues are external | Should render |
|---------------------------|:-------------------------:|:-------------------------:|----------------------------------|
| `#1234` | no | N/A | A link to issue/pull 1234 in `User1/Repo1` |
| `!1234` | no | N/A | A link to issue/pull 1234 in `User1/Repo1` |
| `#1234` | yes | N/A | A link to _external issue_ 1234 for `User1/Repo1` |
| `!1234` | yes | N/A | A link to _PR_ 1234 for `User1/Repo1` |
| `User1/Repo1#1234` | no | N/A | A link to issue/pull 1234 in `User1/Repo1` |
| `User1/Repo1!1234` | no | N/A | A link to issue/pull 1234 in `User1/Repo1` |
| `User1/Repo1#1234` | yes | N/A | A link to _external issue_ 1234 for `User1/Repo1` |
| `User1/Repo1!1234` | yes | N/A | A link to _PR_ 1234 for `User1/Repo1` |
| `UserZ/RepoZ#1234` | N/A | no | A link to issue/pull 1234 in `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | N/A | no | A link to issue/pull 1234 in `UserZ/RepoZ` |
| `UserZ/RepoZ#1234` | N/A | yes | A link to _external issue_ 1234 for `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | N/A | yes | A link to _PR_ 1234 for `UserZ/RepoZ` |
| **Alphanumeric issue IDs:** | - | - | - |
| `AAA-1234` | yes | N/A | A link to _external issue_ `AAA-1234` for `User1/Repo1` |
| `!1234` | yes | N/A | A link to _PR_ 1234 for `User1/Repo1` |
| `User1/Repo1!1234` | yes | N/A | A link to _PR_ 1234 for `User1/Repo1` |
| _Not supported_ | N/A | yes | A link to _external issue_ `AAA-1234` for `UserZ/RepoZ` |
| `UserZ/RepoZ!1234` | N/A | yes | A link to _PR_ 1234 in `UserZ/RepoZ` |
_The last section is for repositories with external issue trackers that use alphanumeric format._
_**N/A**: not applicable._
Note: automatic references between repositories with different types of issues (external vs. internal) are not fully supported
and may render invalid links.

View file

@ -0,0 +1,31 @@
---
date: "2018-06-01T19:00:00+02:00"
title: "Usage: Pull Request"
slug: "pull-request"
weight: 13
toc: true
draft: false
menu:
sidebar:
parent: "usage"
name: "Pull Request"
weight: 13
identifier: "pull-request"
---
# Pull Request
## "Work In Progress" pull requests
Marking a pull request as being a work in progress will prevent that pull request from being accidentally merged. To mark a pull request as being a work in progress, you must prefix its title by `WIP:` or `[WIP]` (case insensitive). Those values are configurable in your `app.ini` file :
```
[repository.pull-request]
WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP]
```
The first value of the list will be used in helpers.
## Pull Request Templates
You can find more information about pull request templates at the page [Issue and Pull Request templates](../issue-pull-request-templates).

View file

@ -0,0 +1,72 @@
---
date: "2019-11-28:00:00+02:00"
title: "Template Repositories"
slug: "template-repositories"
weight: 14
toc: true
draft: false
menu:
sidebar:
parent: "usage"
name: "Template Repositories"
weight: 14
identifier: "template-repositories"
---
## Template Repositories
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.
Gitea uses [gobwas/glob](https://github.com/gobwas/glob) for its glob syntax. It closely resembles a traditional `.gitignore`, however there may be slight differences.
### Example `.gitea/template` file
All paths are relative to the base of the repository
```gitignore
# All .go files, anywhere in the repository
**.go
# All text files in the text directory
text/*.txt
# A specific file
a/b/c/d.json
# Batch files in both upper or lower case can be matched
**.[bB][aA][tT]
```
**NOTE:** The `template` file will be removed from the `.gitea` directory when a repository is generated from the template.
### Variable Expansion
In any file matched by the above globs, certain variables will be expanded.
All variables must be of the form `$VAR` or `${VAR}`. To escape an expansion, use a double `$$`, such as `$$VAR` or `$${VAR}`
| Variable | Expands To | Transformable |
|----------------------|-----------------------------------------------------|---------------|
| REPO_NAME | The name of the generated repository | ✓ |
| TEMPLATE_NAME | The name of the template repository | ✓ |
| REPO_DESCRIPTION | The description of the generated repository | ✘ |
| TEMPLATE_DESCRIPTION | The description of the template repository | ✘ |
| REPO_OWNER | The owner of the generated repository | ✓ |
| TEMPLATE_OWNER | The owner of the template repository | ✓ |
| REPO_LINK | The URL to the generated repository | ✘ |
| TEMPLATE_LINK | The URL to the template repository | ✘ |
| REPO_HTTPS_URL | The HTTP(S) clone link for the generated repository | ✘ |
| TEMPLATE_HTTPS_URL | The HTTP(S) clone link for the template repository | ✘ |
| REPO_SSH_URL | The SSH clone link for the generated repository | ✘ |
| TEMPLATE_SSH_URL | The SSH clone link for the template repository | ✘ |
### Transformers :robot:
Gitea `1.12.0` adds a few transformers to some of the applicable variables above.
For example, to get `REPO_NAME` in `PASCAL`-case, your template would use `${REPO_NAME_PASCAL}`
Feeding `go-sdk` to the available transformers yields...
| Transformer | Effect |
|-------------|------------|
| SNAKE | go_sdk |
| KEBAB | go-sdk |
| CAMEL | goSdk |
| PASCAL | GoSdk |
| LOWER | go-sdk |
| UPPER | GO-SDK |
| TITLE | Go-Sdk |

13
content/doc/wiki.en-us.md Normal file
View file

@ -0,0 +1,13 @@
---
date: "2020-06-27"
title: "Wiki"
slug: "wiki"
weight: 30
toc: false
draft: false
menu:
sidebar:
name: "Wiki"
weight: 40
identifier: "wiki"
---

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -1,3 +1,20 @@
---
date: "2020-05-16T13:11:19+02:00"
title: "Wiki: Including images in wiki pages"
slug: "including-images-in-wiki-pages"
weight: 50
toc: true
draft: false
menu:
sidebar:
parent: "wiki"
name: "Including images in wiki pages"
weight: 50
identifier: "including-images-in-wiki-pages"
---
# Including images in wiki pages
### Upload images via git
Currently, gitea supports only images in the base directory of the wiki git. (Gitea wiki pages are stored in a separate wiki right beside the project, wiki pages themselves are markdown files).
@ -21,6 +38,6 @@ Now, you can reference the image in markdown, like this:
After saving your changes, the image should be visible like this:
*NOTE: In contrast to embedding external images, images in git are only rendered after saving the wiki or markdown file changes.*
![image alt text](codeberg.png "image title")
*NOTE: In contrast to embedding external images, images in git are only rendered after saving the wiki or markdown file changes.*

View file

@ -0,0 +1,26 @@
---
date: "2016-11-08T16:00:00+02:00"
title: "Documentation"
slug: "documentation"
url: "/"
url: "/en-us"
weight: 10
toc: true
draft: false
---
# What is Codeberg?
Codeberg is founded as a non-profit and non-government organization, with the objective to give the Open-Source code that is running our world a safe and friendly home, and to ensure that free code remains free and secure forever. [⇢Our mission statement](https://blog.codeberg.org/codebergorg-launched.html).
All services run on servers under our control. No dependencies on external services. No third party cookies, no tracking.
Hosted in the EU, we welcome the world.
## Supported Browsers
- Last 2 versions of Chrome, Firefox, Safari, Edge (EdgeHTML) and Edge (Chromium)
- Firefox ESR
## Legal
* [Terms of use](https://codeberg.org/codeberg/org/src/branch/master/TermsOfUse.md)
* [Privacy Policy](https://codeberg.org/codeberg/org/src/branch/master/PrivacyPolicy.md)

View file

@ -0,0 +1,5 @@
{{- $.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 -}}

44
layouts/doc/search.html Normal file
View file

@ -0,0 +1,44 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<section class="section">
<div class="container is-centered page">
<div class="columns">
<div class="column is-one-quarter">
{{ partial "menu" . }}
</div>
<div class="column">
<div class=" content">
<section class="resume-section p-3 p-lg-5 d-flex flex-column">
<div class="my-auto" >
<form action="{{ "search" | absLangURL }}">
<label>Search:
<input id="search-query" name="s"/>
</label>
</form>
<br/>
<div id="search-results"></div>
</div>
</section>
<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
<script id="search-result-template" type="text/x-js-template">
<div id="summary-${key}">
<h4><a href="${link}">${title}</a></h4>
<p>${snippet}</p>
${ isset tags }<p>Tags: ${tags}</p>${ end }
${ isset categories }<p>Categories: ${categories}</p>${ end }
<hr/>
</div>
</script>
</div>
</div>
</div>
</div>
</section>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.4.5/fuse.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js"></script>
<script>document.LANG = "{{ .Language.Lang }}";</script>
{{ $script := resources.Get "js/search.js" | minify | fingerprint -}}
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
{{ partial "footer.html" . }}

23
layouts/index.html Normal file
View file

@ -0,0 +1,23 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<div class="container content">
<div class="row">
<div class="col-md-3">
{{ partial "menu" . }}
</div>
<div class="col-md-9">
{{ range where .Site.Pages "Type" "page" }}
{{ .Content }}
{{ end }}
{{ if .Site.DisqusShortname }}
<div class="col-xs-12">
{{ partial "disqus.html" . }}
</div>
{{ end }}
</div>
</div>
</div>
{{ partial "footer.html" . }}

View file

@ -0,0 +1 @@
{{ .Site.Params.goVersion }}

View file

@ -0,0 +1 @@
{{ .Site.Params.minGoVersion }}

View file

@ -0,0 +1 @@
{{ .Site.Params.minNodeVersion }}

View file

@ -0,0 +1 @@
{{ .Site.Params.version }}

35
scripts/trans-copy Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -e
#
# This script is used to copy the en-US content to our available locales as a
# fallback to always show all pages when displaying a specific locale that is
# missing some documents to be translated.
#
# Just execute the script without any argument and you will get the missing
# files copied into the content folder. We are calling this script within the CI
# server simply by `make trans-copy`.
#
declare -a LOCALES=(
"fr-fr"
"nl-nl"
"pt-br"
"zh-cn"
"zh-tw"
)
ROOT=$(realpath $(dirname $0)/..)
for SOURCE in $(find ${ROOT}/content -type f -iname *.en-us.md); do
for LOCALE in "${LOCALES[@]}"; do
DEST="${SOURCE%.en-us.md}.${LOCALE}.md"
if [[ ! -f ${DEST} ]]; then
echo "Creating fallback for ${DEST#${ROOT}/content/}"
cp ${SOURCE} ${DEST}
sed -i.bak "s/en\-us/${LOCALE}/g" ${DEST}
rm ${DEST}.bak
fi
done
done

6
static/_headers Normal file
View file

@ -0,0 +1,6 @@
/*
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

8
static/_redirects Normal file
View file

@ -0,0 +1,8 @@
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!

BIN
static/authorize.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

36
themes/gitea/DCO Normal file
View file

@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

202
themes/gitea/LICENSE Normal file
View file

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

66
themes/gitea/README.md Normal file
View file

@ -0,0 +1,66 @@
# Codeberg: Theme
This is a Hugo theme that is used for our documentation.
## Install
You need an existing [Hugo](https://github.com/spf13/hugo) website, than you can
just download our prebuilt [theme](), put
it into your `themes/gitea` folder and enable the theme with the
`theme = "gitea"` option of your website.
## Development
We choose [npm](https://npmjs.org) to fetch our dependencies and
[gulp](https://gulpjs.com/) for the pipeline. We won't cover the installation of
nodejs or npm, for that you can find enough guides depending on your operating
system. First of all you have to install the required dependencies:
```
npm install
```
After you have successfully installed the required dependencies you should be
able to use these commands to just clean and build generated sources of the
theme:
```
npm run clean
npm run build
npm run release
```
If you want to do more development on the theme we suggest to use the `watch`
task we have defined to get the changes directly built after saving changes to
a file:
```
npm run watch
```
When you are done with your changes just create a pull request, after merging
the pull request the theme will be published to our [download page](https://dl.gitea.io/theme) automatically.
## Contributing
Fork -> Patch -> Push -> Pull Request
## Authors
* [Maintainers](https://github.com/orgs/go-gitea/people)
* [Contributors](https://codeberg.org/Codeberg/Documentation/activity/yearly)
Forked from [go-gitea/theme](https://github.com/go-gitea/theme/)
* [Maintainers](https://github.com/orgs/go-gitea/people)
* [Contributors](https://github.com/go-gitea/theme/graphs/contributors)
## License
This project is under the Apache-2.0 License. See the [LICENSE](LICENSE) file
for the full license text.
## Copyright
```
Copyright (c) 2019 The Gitea Authors <https://gitea.io>
```

View file

@ -0,0 +1,6 @@
---
date: "2016-11-08T16:00:00+02:00"
title: "Title"
weight: 10
draft: false
---

View file

@ -0,0 +1,7 @@
---
date: "2016-11-08T16:00:00+02:00"
title: "Title"
weight: 10
toc: true
draft: false
---

View file

@ -0,0 +1,7 @@
---
date: "2016-11-08T16:00:00+02:00"
title: "Title"
weight: 10
toc: true
draft: false
---

View file

@ -0,0 +1,14 @@
- id: navbar_menu
translation: "Menu"
- id: read_more
translation: "More..."
- id: authored_by
translation: "by"
- id: page_prev
translation: "Previous"
- id: page_next
translation: "Next"

View file

View file

@ -0,0 +1,12 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<section class="section">
<div class="container is-centered page">
<div class=" content">
{{ .Content }}
</div>
</div>
</section>
{{ partial "footer.html" . }}

View file

View file

@ -0,0 +1,19 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<section class="section">
<div class="container is-centered page">
<div class="columns">
<div class="column is-one-quarter">
{{ partial "menu" . }}
</div>
<div class="column is-three-quarters">
<div class="content">
{{ .Content }}
</div>
</div>
</div>
</div>
</section>
{{ partial "footer.html" . }}

View file

View file

@ -0,0 +1,19 @@
{{ partial "header.html" . }}
{{ partial "navbar.html" . }}
<section class="section">
<div class="container is-centered page">
<div class="columns">
<div class="column is-one-quarter">
{{ partial "menu" . }}
</div>
<div class="column">
<div class=" content">
{{ .Content }}
</div>
</div>
</div>
</div>
</section>
{{ partial "footer.html" . }}

View file

@ -0,0 +1,81 @@
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<p>
Copyright &copy; {{ now.Year }} <a href="{{ .Site.Params.website }}">{{ .Site.Params.author }}</a>. All rights reserved. Made with <i class="fa fa-heart" aria-hidden="true"></i> and <a href="https://gohugo.io">Hugo</a>.
</p>
<p>
Funded by <a href="https://join.codeberg.org/">our members</a> and all of our patrons on <a href="https://liberapay.com/codeberg/">Liberapay</a>.
</p>
<!-- <p>
{{ $lang := .Lang }}{{ $base := .Site.BaseURL }}{{ range .Site.Languages }}
<a class="nav-link" href="{{ $base }}{{ .Lang }}" hreflang="{{ .Lang }}">{{ .LanguageName }}</a>
{{ end }}
</p> -->
</div>
</div>
</footer>
<!-- <script>
document.addEventListener('DOMContentLoaded', function () {
// Get all "navbar-burger" elements
var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(function ($el) {
$el.addEventListener('click', function () {
// Get the target from the "data-target" attribute
var target = $el.dataset.target;
var $target = document.getElementById(target);
// Toggle the class on both the "navbar-burger" and the "navbar-menu"
$el.classList.toggle('is-active');
$target.classList.toggle('is-active');
document.getElementById('navbar-background').classList.toggle('is-active');
});
});
}
// Add anchors to headers
// Gitea SVG from https://github.com/coreui/coreui-icons
let svg = ' <svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="fill: currentColor; vertical-align: middle" width="24" height="24" viewBox="0 0 32 32"><title>gitea</title><path d="M5.583 7.229c-2.464-0.005-5.755 1.557-5.573 5.479 0.281 6.125 6.557 6.693 9.068 6.745 0.271 1.146 3.224 5.109 5.411 5.318h9.573c5.74-0.38 10.036-17.365 6.854-17.427-5.271 0.25-8.396 0.375-11.073 0.396v5.297l-0.839-0.365-0.005-4.932c-3.073 0-5.781-0.141-10.917-0.396-0.646-0.005-1.542-0.115-2.5-0.115zM5.927 9.396h0.297c0.349 3.141 0.917 4.974 2.068 7.781-2.938-0.349-5.432-1.198-5.891-4.38-0.24-1.646 0.563-3.365 3.526-3.401zM17.339 12.479c0.198 0.005 0.406 0.042 0.594 0.13l1 0.432-0.714 1.302c-0.109 0-0.219 0.016-0.323 0.052-0.464 0.151-0.708 0.604-0.542 1.021 0.036 0.083 0.089 0.161 0.151 0.229l-1.234 2.25c-0.099 0-0.203 0.016-0.297 0.052-0.464 0.146-0.708 0.604-0.542 1.016 0.172 0.417 0.682 0.63 1.151 0.479 0.464-0.146 0.703-0.604 0.536-1.021-0.047-0.109-0.115-0.208-0.208-0.292l1.203-2.188c0.13 0.010 0.26 0 0.391-0.042 0.104-0.031 0.198-0.083 0.281-0.151 0.464 0.198 0.844 0.354 1.12 0.49 0.406 0.203 0.552 0.339 0.599 0.49 0.042 0.146-0.005 0.427-0.24 0.922-0.172 0.37-0.458 0.896-0.797 1.51-0.115 0-0.229 0.016-0.333 0.052-0.469 0.151-0.708 0.604-0.542 1.021 0.167 0.411 0.682 0.625 1.146 0.479 0.469-0.151 0.708-0.604 0.542-1.021-0.042-0.099-0.104-0.193-0.182-0.271 0.333-0.609 0.62-1.135 0.807-1.526 0.25-0.536 0.38-0.938 0.266-1.323s-0.469-0.635-0.932-0.865c-0.307-0.151-0.693-0.313-1.146-0.505 0.005-0.109-0.010-0.214-0.052-0.318s-0.109-0.198-0.193-0.281l0.703-1.281 3.901 1.682c0.703 0.307 0.995 1.057 0.651 1.682l-2.682 4.906c-0.339 0.625-1.182 0.885-1.885 0.578l-5.516-2.38c-0.703-0.307-0.995-1.057-0.656-1.682l2.682-4.906c0.234-0.432 0.708-0.688 1.208-0.708h0.083z"></path></svg>';
let contents = document.getElementsByClassName("content");
if (contents.length > 0) {
let content = contents[0];
for (let level = 1; level <= 4; level++) {
let elems = content.getElementsByTagName("h" + level);
for (let i = 0; i < elems.length; i++) {
let elem = elems[i];
if (elem.id !== "undefined" && elem.id !== "") {
let anchorId = elem.id + "-anchor";
elem.addEventListener("mouseover", () => {
document.getElementById(anchorId).style.display = "initial";
});
elem.addEventListener("mouseout", () => {
document.getElementById(anchorId).style.display = "none";
});
let anchor = document.createElement("a");
anchor.id = anchorId;
anchor.href = "#" + elem.id;
anchor.innerHTML = svg;
anchor.style.display = "none";
elem.appendChild(anchor);
}
}
}
}
});
</script> -->
</body>
</html>

View file

@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}"></meta>
{{ if .IsPage }}
<meta property="og:description" content="{{ if .IsPage }}{{ .Description }}{{end}}" />
{{ end }}
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"></meta>
<meta property="og:url" content="{{ .Permalink }}"></meta>
<meta property="og:image" content="https://docs.gitea.io/images/gitea.png"></meta>
{{ hugo.Generator }}
<title>{{ if and (not .IsHome) .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
{{ with .Params.goimport }}<meta name="go-import" content="{{ . }}">{{ end }}
{{ with .Params.gosource }}<meta name="go-source" content="{{ . }}">{{ end }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}styles/main.css">
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}images/favicon.png">
<link rel="icon" type="image/x-icon" href="{{ .Site.BaseURL }}images/favicon.png">
</head>
<body>

View file

@ -0,0 +1,2 @@
{{ partial "pages.html" . }}
{{ partial "toc.html" . }}

View file

@ -0,0 +1,20 @@
<nav class="navbar">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="{{ .Site.BaseURL }}">
<img src="{{ .Site.BaseURL }}images/gitea.png" alt="{{ .Site.Title }}">
</a>
<span class="navbar-burger burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
<span></span>
<span></span>
<span></span>
</span>
</div>
<div class="navbar-menu" id="navMenu">
<div class="navbar-end">
{{ partial "toplinks.html" . }}
</div>
</div>
<div class="navbar-background" id="navbar-background"></div>
</div>
</nav>

View file

@ -0,0 +1,28 @@
<aside class="menu">
{{ $currentNode := . }}{{ range .Site.Menus.sidebar }}
{{ if .HasChildren }}
<p class="menu-label">
{{ .Pre }}
{{ .Name }}
</p>
<ul class="menu-list">
{{ range .Children }}
<li>
<a href="{{ .URL | relLangURL }}" {{ if $currentNode.IsMenuCurrent "sidebar" . }}class="is-active"{{ end }}>
{{ .Pre }}
{{ .Name }}
</a>
</li>
{{ end }}
</ul>
{{ else }}
<li>
<a href="{{ .URL | relLangURL }}">
{{ .Pre }}
{{ .Name }}
</a>
</li>
{{ end }}
{{ end }}
</ul>
</aside>

View file

@ -0,0 +1,5 @@
{{ if .Params.toc }}
<!-- <aside>
{{ .TableOfContents }}
</aside> -->
{{ end }}

View file

@ -0,0 +1,7 @@
<span class="navbar-item logo"><img src="{{ .Site.BaseURL }}images/gitea.png" alt="{{ .Site.Title }}"></span>
{{ $currentNode := . }}{{ range .Site.Menus.page }}
<a class="navbar-item" href="{{ .URL }}">
<i class="fa fa-{{ .Pre }}"></i>&nbsp;
{{ .Name }}
</a>
{{ end }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="457px" height="60px" viewBox="0 0 457 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>open collective logo</title>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="opencollective-logo">
<g id="icon" transform="translate(0.000000, 10.000000)">
<path d="M34.6194245,8.17880011 C36.7508489,11.2495266 38,14.9788859 38,19 C38,23.0211141 36.7508489,26.7504734 34.6194245,29.8211999 L29.6976779,24.8994533 C30.6641742,23.1506053 31.2142857,21.1395454 31.2142857,19 C31.2142857,16.8604546 30.6641742,14.8493947 29.6976779,13.1005467 L34.6194245,8.17880011 Z M29.8211999,3.38057552 L24.8994533,8.30232215 C23.1506053,7.33582578 21.1395454,6.78571429 19,6.78571429 C12.2542363,6.78571429 6.78571429,12.2542363 6.78571429,19 C6.78571429,25.7457637 12.2542363,31.2142857 19,31.2142857 C21.1395454,31.2142857 23.1506053,30.6641742 24.8994533,29.6976779 L29.8211999,34.6194245 C26.7504734,36.7508489 23.0211141,38 19,38 C8.50658975,38 0,29.4934102 0,19 C0,8.50658975 8.50658975,0 19,0 C23.0211141,0 26.7504734,1.24915112 29.8211999,3.38057552 Z" id="Combined-Shape-Copy-2" fill="#7FADF2"/>
<path d="M34.6194245,8.17880011 C36.7508489,11.2495266 38,14.9788859 38,19 C38,23.0211141 36.7508489,26.7504734 34.6194245,29.8211999 L29.6976779,24.8994533 C30.6641742,23.1506053 31.2142857,21.1395454 31.2142857,19 C31.2142857,16.8604546 30.6641742,14.8493947 29.6976779,13.1005467 L34.6194245,8.17880011 Z" id="closing-o" fill="#B8D3F4"/>
</g>
<g id="logotype" transform="translate(62.000000, 0.000000)" fill="#7a7b82">
<path d="M48.7,13.6 C45,13.6 41.5,15 38.9,17.2 L38.9,14.9 C38.9,14.3 38.4,13.9 37.9,13.9 L34.5,13.9 C33.9,13.9 33.5,14.4 33.5,14.9 L33.5,58.6 C33.5,59.1 33.9,59.6 34.5,59.6 L38,59.6 C38.5,59.6 39,59.2 39,58.6 L39,40.3 C41.6,42.5 45.1,43.9 48.8,43.9 C57.2,43.9 64,37.1 64,28.7 C63.8,20.3 57,13.6 48.7,13.6 L48.7,13.6 Z M48.7,38.4 C43.3,38.4 39,34 39,28.7 C39,23.3 43.4,19 48.7,19 C54.1,19 58.4,23.4 58.4,28.7 C58.4,34.1 54,38.4 48.7,38.4 L48.7,38.4 Z" id="Shape"/>
<path d="M114.6,13.6 C110.9,13.6 107.5,14.9 104.9,17.1 L104.9,15.8 C104.9,14.7 104,13.8 102.9,13.8 L101.4,13.8 C100.3,13.8 99.4,14.7 99.4,15.8 L99.4,42.1 C99.4,42.9 100.1,43.6 100.9,43.6 L103.4,43.6 C104.2,43.6 104.9,42.9 104.9,42.1 L104.9,29.6 C104.9,24.2 109.3,19 114.6,19 C118.1,19 124.3,20.9 124.3,29.6 L124.3,42.1 C124.3,42.9 125,43.6 125.8,43.6 L128.3,43.6 C129.1,43.6 129.8,42.9 129.8,42.1 L129.8,29.5 C129.8,16.3 119.4,13.6 114.6,13.6 L114.6,13.6 Z" id="Shape"/>
<path d="M96.2,25.5 L96.2,25.5 C94.7,18.4 88.2,13.2 80.6,13.6 C73,14 66.8,20 66.3,27.6 C65.7,36.5 72.7,43.9 81.4,43.9 C87.3,43.9 92.4,40.6 94.9,35.7 C95.3,35 94.8,34.1 94,33.9 L91,33.3 C90.5,33.2 90,33.4 89.7,33.9 C88,36.6 84.9,38.5 81.5,38.5 C78.5,38.5 75.8,37.1 74,35 L91.2,27.8 L96.2,25.5 L96.2,25.5 Z M71.8,29.9 C71.8,29.5 71.7,29.1 71.7,28.7 C71.7,23.3 76.1,19 81.4,19 C84.4,19 87.2,20.4 88.9,22.6 L71.8,29.9 L71.8,29.9 Z" id="Shape"/>
<path d="M15.3,13.4 C6.9,13.4 0.1,20.2 0.1,28.6 C0.1,37 6.9,43.8 15.3,43.8 C23.7,43.8 30.5,37 30.5,28.6 C30.5,20.2 23.7,13.4 15.3,13.4 L15.3,13.4 Z M15.3,38.3 C9.9,38.3 5.6,33.9 5.6,28.6 C5.6,23.2 10,18.9 15.3,18.9 C20.7,18.9 25,23.3 25,28.6 C25.1,33.9 20.7,38.3 15.3,38.3 L15.3,38.3 Z" id="Shape"/>
<path d="M196.7,13.3 C188.3,13.3 181.5,20.1 181.5,28.5 C181.5,36.9 188.3,43.7 196.7,43.7 C205.1,43.7 211.9,36.9 211.9,28.5 C211.9,20.1 205.1,13.3 196.7,13.3 L196.7,13.3 Z M196.7,38.2 C191.3,38.2 187,33.8 187,28.5 C187,23.1 191.4,18.8 196.7,18.8 C202.1,18.8 206.4,23.2 206.4,28.5 C206.4,33.8 202.1,38.2 196.7,38.2 L196.7,38.2 Z" id="Shape"/>
<path d="M328.6,4.3 L325.5,4.3 C324.8,4.3 324.3,4.8 324.3,5.5 L324.3,8.6 C324.3,9.3 324.8,9.8 325.5,9.8 L328.6,9.8 C329.3,9.8 329.8,9.3 329.8,8.6 L329.8,5.5 C329.8,4.8 329.2,4.3 328.6,4.3 L328.6,4.3 Z" id="Shape"/>
<path d="M392.5,33.7 L388.9,33 C388.5,32.9 388.1,33.1 387.9,33.5 C386.2,36.3 383.1,38.2 379.6,38.2 C376.6,38.2 373.9,36.8 372.1,34.7 L389.3,27.5 L394.5,25.3 L394.5,25.3 C393,18.2 386.5,13 378.9,13.4 C371.3,13.8 365.1,19.9 364.6,27.5 C364,36.4 371,43.8 379.7,43.8 C385.7,43.8 390.9,40.3 393.3,35.3 C393.5,34.5 393.1,33.8 392.5,33.7 L392.5,33.7 Z M369.8,28.4 C369.8,23 374.2,18.7 379.5,18.7 C382.5,18.7 385.3,20.1 387,22.3 L369.8,29.6 L369.8,28.4 L369.8,28.4 Z" id="Shape"/>
<path d="M270,25.2 L270,25.2 C268.5,18.1 262,12.9 254.4,13.3 C246.8,13.7 240.6,19.8 240.1,27.4 C239.5,36.3 246.5,43.7 255.2,43.7 C261.2,43.7 266.4,40.2 268.9,35.1 C269.2,34.5 268.8,33.8 268.2,33.7 L264.6,33 C264.2,32.9 263.8,33.1 263.6,33.5 C261.9,36.3 258.8,38.2 255.3,38.2 C252.3,38.2 249.6,36.8 247.8,34.7 L265,27.5 L270,25.2 L270,25.2 Z M245.5,29.6 C245.5,29.2 245.4,28.8 245.4,28.4 C245.4,23 249.8,18.7 255.1,18.7 C258.1,18.7 260.9,20.1 262.6,22.3 L245.5,29.6 L245.5,29.6 Z" id="Shape"/>
<path d="M221.2,0.7 L217.6,0.7 C217.1,0.7 216.7,1.1 216.7,1.6 L216.7,42.3 C216.7,42.8 217.1,43.3 217.7,43.3 L221.2,43.3 C221.7,43.3 222.2,42.9 222.2,42.3 L222.2,1.6 C222.2,1.1 221.7,0.7 221.2,0.7 L221.2,0.7 Z" id="Shape"/>
<path d="M233.5,0.7 L229.9,0.7 C229.4,0.7 229,1.1 229,1.6 L229,42.3 C229,42.8 229.4,43.3 230,43.3 L233.5,43.3 C234,43.3 234.5,42.9 234.5,42.3 L234.5,1.6 C234.4,1.1 234,0.7 233.5,0.7 L233.5,0.7 Z" id="Shape"/>
<path d="M328.6,13.4 L325.5,13.4 C324.8,13.4 324.3,13.9 324.3,14.6 L324.3,42.2 C324.3,42.9 324.8,43.4 325.5,43.4 L328.6,43.4 C329.3,43.4 329.8,42.9 329.8,42.2 L329.8,14.5 C329.8,13.9 329.2,13.4 328.6,13.4 L328.6,13.4 Z" id="Shape"/>
<path d="M318.4,13.4 L314.5,13.4 C314.1,13.4 313.7,13 313.7,12.6 L313.7,1.5 C313.7,1.1 313.3,0.7 312.9,0.7 L309,0.7 C308.6,0.7 308.2,1.1 308.2,1.5 L308.2,12.6 C308.2,13 307.8,13.4 307.4,13.4 L303.5,13.4 C303.1,13.4 302.7,13.8 302.7,14.2 L302.7,18 C302.7,18.4 303.1,18.8 303.5,18.8 L307.4,18.8 C307.8,18.8 308.2,19.2 308.2,19.6 L308.2,42.3 C308.2,42.9 308.7,43.3 309.2,43.3 L312.6,43.3 C313.2,43.3 313.6,42.8 313.6,42.3 L313.6,19.6 C313.6,19.2 314,18.8 314.4,18.8 L318.3,18.8 C318.7,18.8 319.1,18.4 319.1,18 L319.1,14.1 C319.2,13.7 318.9,13.4 318.4,13.4 L318.4,13.4 Z" id="Shape"/>
<path d="M296.8,35.5 C296.4,35.1 295.7,35.1 295.3,35.5 C293.5,37.2 291.2,38.2 288.5,38.2 C282.8,38.2 278.2,33.2 278.8,27.4 C279.3,22.9 283,19.3 287.5,18.8 C290.3,18.5 293,19.5 294.9,21.2 C295.5,21.7 296.4,21.7 297,21.1 L298.7,19.4 C299.3,18.8 299.3,17.8 298.7,17.2 C295.8,14.5 291.8,13 287.5,13.3 C279.8,13.8 273.6,20.2 273.3,28 C273,36.6 279.9,43.6 288.5,43.6 C292.6,43.6 296.4,42 299.1,39.3 C299.5,38.9 299.5,38.2 299.1,37.8 L296.8,35.5 L296.8,35.5 Z" id="Shape"/>
<path d="M177.1,35.5 C176.7,35.1 176,35.1 175.6,35.5 C173.8,37.2 171.5,38.2 168.8,38.2 C163.1,38.2 158.5,33.2 159.1,27.4 C159.6,22.9 163.3,19.3 167.8,18.8 C170.6,18.5 173.3,19.5 175.2,21.2 C175.8,21.7 176.7,21.7 177.3,21.1 L179,19.4 C179.6,18.8 179.6,17.8 179,17.2 C176.1,14.5 172.1,13 167.8,13.3 C160.1,13.8 153.9,20.2 153.6,28 C153.3,36.6 160.2,43.6 168.8,43.6 C172.9,43.6 176.7,42 179.4,39.3 C179.8,38.9 179.8,38.2 179.4,37.8 L177.1,35.5 L177.1,35.5 Z" id="Shape"/>
<path d="M362,13.7 L357.1,13.7 C357,13.7 356.9,13.8 356.9,13.9 L348.9,37.4 C348.8,37.6 348.5,37.6 348.5,37.4 L340.5,13.9 C340.5,13.8 340.4,13.7 340.3,13.7 L335.4,13.7 C335.2,13.7 335.1,13.9 335.2,14 L345.1,43.1 C345.1,43.2 345.2,43.3 345.3,43.3 L352.1,43.3 C352.2,43.3 352.3,43.2 352.3,43.1 L362.2,14 C362.3,13.9 362.2,13.7 362,13.7 L362,13.7 Z" id="Shape"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.6 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

10
themes/gitea/theme.toml Normal file
View file

@ -0,0 +1,10 @@
name = "Gitea"
license = "Apache-2.0"
licenselink = "https://github.com/go-gitea/theme/blob/master/LICENSE"
description = "Theme for Codeberg documentation."
homepage = "https://codeberg.org/Codeberg/Documentation/themes"
min_version = 0.17
[author]
name = "The Codeberg Authors"
homepage = "https://codeberg.org/"