ZeroIntensity / view.py

The Batteries-Detachable Web Framework
https://view.zintensity.dev
MIT License
206 stars 15 forks source link

Markdown Content #98

Closed ZeroIntensity closed 5 months ago

ZeroIntensity commented 7 months ago

Feature description

A lot of people (especially me) like writing their content in Markdown. This isn't ideal for large sites, but blogs could definitely benefit from this feature. Will wait on #92, as it will likely go hand in hand with templating (i.e. markdown is stored in the same area as the HTML).

I'm not entirely sure how modifying the content could work, my first though is to pass some sort of class to markdown() that handles parsing. I think this part of the feature should wait until #12, though.

Feature example API

from view import new_app, markdown

app = new_app()

@app.get("/")
async def index():
    return markdown("test")  # or test.md, same system as the template API

Anything else?

No response

ZeroIntensity commented 5 months ago

This may be implemented now that #92 is done.