agora-org / agora

File server that accepts Lightning Network payments for downloads

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Render *.md files as Markdown

yzernik opened this issue · comments

I noticed that the .index.md file gets rendered as Markdown on the directory page.

Is there any reason why we don't render all .md files as Markdown?

We wouldn't want to make it impossible to sell raw markdown files. I.e. if we rendered markdown server-side, clients wouldn't be able to get the markdown source. Another thing is that you can always create more pages with .index.md files in them, if you want to create a tree of rendered pages.

Do you have a use-case in mind?

I was thinking about using Agora as a blog engine. Have a folder called "blog" with a bunch of .md files in it. Then anyone could read them directly right after payment.

I'm not sure if that fits with the intended purpose of Agora, but just an idea.

Your explanation makes sense. I wonder if there is any way to render Markdown on the client side. Then people could get the source file and also read the file in a user-friendly format.

I was thinking about using Agora as a blog engine. Have a folder called "blog" with a bunch of .md files in it. Then anyone could read them directly right after payment.

Ah, okay, so the idea is that you want to write pages in markdown, and allow people to pay to access the rendered content?

One way to do this would be to render the markdown once, i.e. with a static site generator, and then charge to access the rendered HTML.

That makes sense. HTML is what I will use.

Okay, sweet.