How to turn a markdown (.md) file into a fancy home page?

When you make a nice formatted markdown file and you use a sharing link to open it in private/incognito view, it almost looks like a website. Could this be a feature in NextCloud?

There is already an online app where you can do something similar, but it doesn’t look open source and it’s not on NextCloud. https://hosted.md/
I made this in 5 minutes https://woonhuis-duurzaam.hosted.md/

Nice to have would be:

  • fancy internet address: mysite.en or mysite.en/home instead of cloud.mysite.en/s/NoJBjgom9?dir=/&editing=false&openfile=true
  • permanent tabel of contents to navigate within the page
  • some templates so you do not have to experiment too much
  • possibility of background color, character color. Choosing a diffent font/type face.

Hi @daaniel

There used to be an integration for PicoCMS that could do something similar, but unfortunately PicoCMS is no longer being developed:

https://github.com/nextcloud/cms_pico

https://github.com/picocms/Pico

I can’t speak for the Nextcloud developers, so I could be wrong, but I don’t think this feature is at the top of their priority list. Therefore, I think effort from the community would be needed to either resume development of PicoCMS or develop apps/integrations for other solutions.

However, feel free to open a feature request on GitHub. If it gets enough upvotes, who knows, maybe someone will actually start working on it… GitHub - nextcloud/server: ā˜ļø Nextcloud server, a safe home for all your data

2 Likes

Thanks @bb77 This is a complete and useful answer!
Shall i mark my question as #Answered, or is there more chance that somebody with more tips finds this question, if i wait some days?

Just for your information: threads are not closed when a post is marked as a solution, which means people can still post replies. Also, if someone comes up with a better answer, this answer can then be marked as the solution instead, and as far as I know, any user can mark any posts as as a solution. So there are no restrictions in this regard.

But I’ll leave it up to you. Maybe in this case it makes sense not to mark it as a solution just yet. :slight_smile:

1 Like

Hey,

PicoCMS is what I had in mind as well.

However, let me give you another point of view, maybe this might be also a consideration:
All solutions so far use MD as a basis and use the PHP interpreter to transform them into HTML (for viewing in the browser). This is accompanied with some CSS (and potentially JS) to make it look appearing. There are 2 points to consider:

  1. The transformation needs to be done each time, a user visits your site. You could as well hand out the pure MD and render using JS but still the complete NC core needs to be loaded which puts load on your server.
  2. You start pushing out the NC server URL and promote it. While NC per se is trying to prevent bugs and fix issues, non-patched issue might be present and sleeping as a time-bomb. As long as you use the machine only for personal stuff and do not share links on public locations etc., probably not many will take notice of the server. Once, you have a website that gets crawled and contains valuable information, your traffic rises and more bot will know your NC domain.

I personally favor to use static website generators in the meantime. Low power needed to serve static files and no security issues related to PHP code. I like this approach very much in the meantime. There are a few out there, depending on your background, like Hugo, Jekyll, Sphinx, and more.
You can even host these kind of sites e.g. using GitHub Pages for no cost.

Chris

1 Like

I’ve tried PicoCMS with about all these considerations. But outcome of all my tests was that it wasn’t very good. It’s a ā€œneither norā€ tool. Neither it’s simple, for anyone who does not want to code, neither it’s good enough for someone who wants something fancy.

Knowing Netxcloud for about 10 years, it seems that:

  • customing the design is not the priority
  • building ā€œweb site likeā€ apps or pages based on stored content is clearly not a target

Yes, I have a similar impression, although I don’t necessarily think it’s a bad thing. While I understand the appeal of having everything in one place, a separate solution is probably better in this case, particularly for security reasons, as @christianlupus already mentioned.

I’m not a developer, but I imagine one could still create an integration that would enable content to be published from Nextcloud to the other system. Personally, I think that would be a better approach than serving public pages directly from a Nextcloud instance that is also used as a groupware and file sharing platform and likely contains all kinds of sensitive data.

If we are talking about an intranet-only solution, the situation may be different. In that case, depending on the environment, security concerns may be less of an issue.

1 Like

Security is (hopefully) the top criteria. Allowing people to modify HTML or CSS (or worse : javascript) is a too important risk.

Also, I’ve handle a Nextcloud reported bug these days that was generated by ā€œCustom CSSā€ app user manipulation :confused:

An alternative would be to get by backend API the content of the Nextcloud markdown, and present it in an independant web site generator. If this is truly the need.

2 Likes