summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-11-17 20:37:00 +0000
committerGitHub <noreply@github.com>2021-11-17 20:37:00 +0000
commit3c4724d70e4ac7bfc06b97f6fad8936f97479b6b (patch)
tree754286def789b823e020d3ccfafae148d0017b62 /docs
parent81a4fc752833101dd7d6b4f612bccc4b29c98dff (diff)
downloadgitea-3c4724d70e4ac7bfc06b97f6fad8936f97479b6b.tar.gz
gitea-3c4724d70e4ac7bfc06b97f6fad8936f97479b6b.zip
Add .gitattribute assisted language detection to blame, diff and render (#17590)
Use check attribute code to check the assigned language of a file and send that in to chroma as a hint for the language of the file. Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'docs')
-rw-r--r--docs/content/doc/advanced/config-cheat-sheet.en-us.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
index 3b5d9213df..a087b253e9 100644
--- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md
+++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md
@@ -982,6 +982,14 @@ Multiple sanitisation rules can be defined by adding unique subsections, e.g. `[
To apply a sanitisation rules only for a specify external renderer they must use the renderer name, e.g. `[markup.sanitizer.asciidoc.rule-1]`.
If the rule is defined above the renderer ini section or the name does not match a renderer it is applied to every renderer.
+## Highlight Mappings (`highlight.mapping`)
+
+- `file_extension e.g. .toml`: **language e.g. ini**. File extension to language mapping overrides.
+
+- Gitea will highlight files using the `linguist-language` or `gitlab-language` attribute from the `.gitattributes` file
+if available. If this is not set or the language is unavailable, the file extension will be looked up
+in this mapping or the filetype using heuristics.
+
## Time (`time`)
- `FORMAT`: Time format to display on UI. i.e. RFC1123 or 2006-01-02 15:04:05