PeterPierinakos / vanilla-rustlang-server

Simple, minimal and open source static web server that uses no dependencies.
Apache License 2.0
38 stars 1 forks source link

Built-in interpreter for markdown syntax to HTML #11

Closed PeterPierinakos closed 2 years ago

PeterPierinakos commented 2 years ago

What is the feature you want to improve or implement?

It would be nice to implement a way for the host to just be able to write their documents in markdown syntax and when an end user tries to access that document it gets interpreted into HTML before being sent to the browser.

Additional information:

I want to implement this because it's more convenient for some people to write documents in markdown than in HTML.

The way this would work is, for example, the server host creates a helloworld.md file in /var/www/static and when a user tries to access http://localhost:80/helloworld.html the server finds a file with the same name but in the markdown extension (.md), it interprets it to HTML and then it sends back the HTML it generated.

This could add some overhead on the server-side because in the worst case scenario the markdown document could be very large and hundreds of lines, so parsing and interpreting the document before sending it back could take a long time. In the future this could be improved by implementing caching for the documents, but this is only going to be considered if I decide that this idea is worth implementing into the final product.

Would love to hear feedback for this idea from anyone passing by. This is probably going to be considered for v1.2.0.

PeterPierinakos commented 2 years ago

After some reconsideration it seems that this feature is not appropriate due to being unrelated to what the project is aiming to achieve.