When retrieving a file via WebDav, is there any way to activate Nextcloud’s Markdown rendering of .md files to HTML (I’m guessing the answer is “no” since it probably doesn’t go through any core process for content)?
Is Markdown rendering part of Nextcloud core, if so, where is it located?
If Markdown rendering is not part of Nextcloud core, which app has to be installed or activated for it to work?
What I want to do is to run .md through the renderer and have .html returned.
Thanks for the suggestion. But what I want to accomplish (if possible) is to render .md to .html “on-the-fly”, either by using an existing PHP class (core or app) or by supplying a request argument when retrieving the file, like ?format=html or ?render=true …
Sorry. Perhaps you find a MD-to-HTML-Converter. There are some online-tools like https://markdowntohtml.com/ . Perhaps you also find a windows-software you can open all .md-files and look them in html-mode.
Actually, the reason I was asking was for NCweb. Now that I put code in NCweb to render Markdown internally, it’s really no issue. But it would have been nice to have it rendered on the Nextcloud side. Thanks for trying though.
NCweb is a reasonably small (ish) PHP “application” that will allow you to expose a given folder of a Nextcloud instance and serve documents from it as if it would have been a regular website.
If you only want serve one document as a normal website you can use “SharingPath”. In an extern HTML you can combine multiple nextcloud documents shared with “SharingPath”. Nextcloud works as a CDN. Because the username is in the path perhaps you an own HTML-User in Nextcloud.
Yes. I think for you @joho68 do my link is no solution. But if someone wants implements a html-website with only a few nextcloud elements “SharingPath” is a nice feature.
example insert an image from nextcloud in external website. <img src="https://cloud.server.tld/apps/sharingpath/admin/Nextcloud.png>
you must public share the object in nextcloud
you must activate the object for SharingPath
the user is in the path, perhaps use another user like “html” to not show the real user e.g. “admin”
Die App Sharing Path wird schon seit vielen Versionen nicht mehr unterstĂĽtzt.
Vorabinfo:
FĂĽr alle drei unten aufgefĂĽhrten Freigaben kannst du den Download verbergen. Denn die Berechtigung zeigt nur den Download-Button. Der verwendete Download /download wird von Nextcloud nie verhindert.
Alternative 1:
Du kannst die Datei normal freizugeben und an dem Link /download anhängen also z. B. https://cloud.server.tld/s/abcdefghijklmno/download verwenden. Sieht leider nicht so schön aus, spart dir aber eine zusätzliche App.
Alternative 2:
Es gibt mittlerweile die App Configurable Share Links. In dem Fall kannst du den Share einfach umbenennen und dann z. B. https://cloud.server.tld/s/name/download verwenden.
Alternative 3:
Zusätzlich gibt es noch die App ShareRenamer. Diese aktuell aber nur bis Nextcloud 29. Auch dort kannst du Namen wie https://cloud.server.tld/s/name/download verwenden.
Ohne das Anhängen von /download landet man beim normalen Download-Link. Das kannst du somit nicht mehr wie bei Sharing Path verstecken. Auch kann es sein, dass z. B. ein verwendetes Content Management System falsch reagiert und den Download anbietet und nicht wie bei Sharing Path z. B. ein Bild direkt einbindet, da die Dateiendung (Suffix) wie z. B. jpg fehlt. Das musst du mal ausprobieren.
Bei normalem HTML funktioniert die Einbindung problemlos. Der Link verweist in diesem Fall auf ein JPG-Bild. Verwendet habe ich die Alternative 1 also die Standard-Links von Nextcloud.