Settings

Theme

Ask HN: In what format do you write your website?

1 points by Un1corn 3 years ago · 3 comments · 1 min read


Up until now, I've used Markdown for my blog posts but recently I've wanted to make more complicated pages. I'm not sure yet what to do, should I write partly in Markdown and partly in HTML? Should I migrate everything to HTML? Or maybe there is something else in the middle?

I was also thinking of having some dynamic pages in my static website so maybe HTML is the only solution?

timonoko 3 years ago

In Python. of course. I use good old web.py, because I am lazy and stupid.

"Django lets you write web apps in Django. TurboGears lets you write web apps in TurboGears. Web.py lets you write web apps in Python."

I have (tiny) improvement to the web.py architecture. Using global variable you can add stuff into webpage with "+=".

    class bucket: urls=()
    
    bucket.urls=('/','index')
    class index:
        def GET(self):
    
    bucket.urls+=('/goto:(.*)','goto')
    class goto:
        def GET(self,s):

    bucket.urls+=('/kartta_(.*)','kartta')
    class kartta:
        def GET(self,s):
alwillis 3 years ago

Here you go: https://htmx.org/

beardyw 3 years ago

I think most flavours of markdown support html just by putting it in there.

If you want dynamic pages do those in html. No problem.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection