Import into git
This commit is contained in:
parent
114fc33588
commit
c49bf06e1b
3
Containerfile
Normal file
3
Containerfile
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
FROM gitea/gitea:1.21
|
||||||
|
RUN apk --no-cache add asciidoctor ruby-rouge
|
||||||
|
COPY extended_rouge.rb /opt/extended_rouge.rb
|
5
README.asciidoc
Normal file
5
README.asciidoc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
= Gitea modifications
|
||||||
|
|
||||||
|
My modifications on Gitea for use on my https://gitea.adaedra.eu/[instance].
|
||||||
|
|
||||||
|
Currently only adds support for Asciidoc documents with syntax highlighting.
|
12
app.ini
Normal file
12
app.ini
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
; Append to your own app.ini
|
||||||
|
|
||||||
|
[markup.sanitizer.chroma]
|
||||||
|
ELEMENT = pre
|
||||||
|
ALLOW_ATTR = class
|
||||||
|
REGEXP = ^chroma$
|
||||||
|
|
||||||
|
[markup.asciidoc]
|
||||||
|
ENABLED = true
|
||||||
|
FILE_EXTENSIONS = .adoc,.asciidoc
|
||||||
|
RENDER_COMMAND = "asciidoctor -r /opt/extended_rouge -s -a showtitle -a source-highlighter=rouge --out-file=- -"
|
||||||
|
IS_INPUT_FILE = false
|
11
extended_rouge.rb
Normal file
11
extended_rouge.rb
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
class ExtendedRougeSyntaxHighlighter < (Asciidoctor::SyntaxHighlighter.for 'rouge')
|
||||||
|
register_for 'rouge'
|
||||||
|
|
||||||
|
def format(_node, _lang, opts)
|
||||||
|
opts[:transform] = proc do |pre, code|
|
||||||
|
pre['class'] = 'chroma'
|
||||||
|
end
|
||||||
|
|
||||||
|
super
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user