Org-file on codeberg: https://codeberg.org/rmw/devuan-debootstrap-scripts/src/branch/master/README.org
Org-file on gitlab (has image issues): https://gitlab.com/RobinWils/devuan-debootstrap-scripts/blob/master/README.org
Org-file on github (works like it should): https://github.com/Robin-Wils/Devuan-Debootstrap-Scripts/blob/master/README.org
What file format is this? Plain markdown?
No, org. It is something even more powerful (in my opinion). Some people use GNU Emacs only for that mode. It is extremely useful to manage stuff. I am even planning on using it to generate my website. It just works fast and great.
GNU Emacs is not required for org. Anyway, you can convert the text-file to almost anything (a couple of the export options are: powerpoint, PDF, LaTeX, HTML, Markdown,…). The point is it is powerful and there are enough people who use it. I prefer it over Markdown in most cases.
We can register custom markup renderers in Gitea’s app.ini config section [markup.*]. If you like to contribute an example config, we are happy to enable it!
For an example, please see https://codeberg.org/Codeberg/gitea/src/branch/master/custom/conf/app.ini.sample
I have no experience with that, and wouldn’t know how to make such a file.
I will mention it on the Fediverse (free software social media). Someone there has a gitea and it looks like that person has some org support, not all, but it would be a start.
This would be the relevant section, … the most tricky part probably figuring out the command line tool to convert orgmode files to html stdout (possibly via pandoc instead of the asciidoc example below, or do other tools produce better output?):
ENABLED = false
; List of file extensions that should be rendered by an external command
FILE_EXTENSIONS = .adoc,.asciidoc
; External command to render all matching extensions
RENDER_COMMAND = "asciidoc --out-file=- -"
; Don't pass the file on STDIN, pass the filename as argument instead.
IS_INPUT_FILE = false
There are libraries which can parse it, pandoc is indeed one of them.
pandoc -f org -t markdown or pandoc -f org -t html should work.
pandoc -f org -t markdown
pandoc -f org -t html
Did anyone try to implement that command?
The problem is not solved yet.
The codeberg-test is configured with the above command, images are not properly rendered (relative path not working?), and style could need some improvement. (Would you like to contribute?)
Also we’d like to have learn more about the orgmode format, in order to have a proper understanding of security implications. It’s work-in-progress at this point in time: https://codeberg-test.org/hw/devuan-debootstrap-scripts
What might be the best way to achieve this?
As this might be useful as general interface to Gitea-renderers, cc: @kolaente , do you know if there is some ‘proper’ way to implement this?
One more note:
The main question now is where to head for the future -- we could override the built-in parser via pandoc (and get easy support for other formats as side-effect), but then we need to resolve the local/absolute path issue. Alternatively, for an orgmode-only fix, we might just wait for the fix in gitea+go-org.
Depends on what is preferred.
I don’t mind waiting a little for that update. I would, however go for the own implementation if more people need it. Most people probably use markdown and the most important things seem to work (headers and code).
Image support would be cool, but I think that waiting on the update might make it easier to maintain in the future, other users might have a different opinion.
No due date set.
This issue currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?