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.
Did anyone make the decision yet?
I would like to see at least something working for my org files.
I mentioned my opinion in the previous comment.
No, currently waiting. Please let us know if the text-only (no-images) version deployed on codeberg-test.org seems preferable to the status quo.
The deployed one no longer seems to work. I personally would go for the gitea parser. It is not perfect, but it might get better in the future.
@rmw : Can you please have another look and update the gitea-related issue if necessary?
I can’t seem to run the VM. Libvirt is installed, but I get the following error.
@rmw : I meant to ask you to test on the live server https://codeberg.org, or https://codeberg-test.org/.
(does for example https://codeberg.org/rmw/devuan-debootstrap-scripts/src/branch/master/README.org look as intended? The comment section for example seems a bit off, whereas pictures, tables etc seem to look ok?)
@rmw : The python module for libvirt is part of your distribution (python-libvirt or python3-libvirt on debian-like systems).
Ha, this is about the org issue. Yeah that looks much better.
The first few lines don’t display correctly and some *’s which shouldn’t be visible are visible, but the rest is perfect.
I am happy with the current result. The first lines are in a comment section so should be hidden technically.
It is neat that the image displays nicely, which does not happen on Gitlab.
closing for now. Please feel free to re-open or open a new ticket if you encounter related issues.
No due date set.
This issue currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?