3 ms·
i like the sound of how its done on GitHub alright... if you ever change your URL structure, you dont have to rewrite all your pages to point at the new locatio
by tiernano 6y ago
i like the sound of how its done on GitHub alright... if you ever change your URL structure, you dont have to rewrite all your pages to point at the new location, plus if you did, you could write redirects in there too... it would also allow for checking of links; if you link to newpgae.md, not newpage.md, it should throw a "compile" error... what language are you writing this in?
- tomcam 6y agoThanks for the feedback. Don't understand what file extension has with URL structure? It's relative no matter what, or am I missing something? Writing it in Go.
- tiernano 6y agonot necessarily the extension that would link to the url, but the file might be, in my case with Hugo, in posts/2020-01-01-title.md. but when that gets built, it will be in posts/2020/01/01/title.html... you could, in theory, not have the date in the file name, and just use the date from the md file, which then will still generate that way...
- tomcam 6y agoI think that’s due to the way Hugo converts the date portion of the source file, which has a whole bunch of rules about weighting and things, but I’m not smart enough to understand how they work.