willkg / douglas

DEAD PROJECT: File based static rendering blog system
Other
2 stars 3 forks source link

rework url translation in "douglas-cmd serve" #29

Closed willkg closed 10 years ago

willkg commented 10 years ago

The current url translation which re-situates a site so it serves correctly with static files is just doing a string replace which has a variety of bad edge cases.

It should parse the HTML and intelligently replace links.

Should base it on this:

https://github.com/willkg/dennis/blob/master/dennis/translator.py#L568

It should catch the following attributes:

That doesn't handle urls manipulated in JavaScript, urls in the CSS and probably some other things. But it's better than what we have now.