3 ms·
Yes it's funny when he writes "If you find the previous step too much work, write a shell script that copies the directory and removes the old content for you."
by laurent123456 7y ago
Yes it's funny when he writes "If you find the previous step too much work, write a shell script that copies the directory and removes the old content for you.". I can already see the next thought: "Well I have this script processing all my directories... may as well use it to do simple string replacement too, that way I can insert a link to the latest blog post", etc. Basically just PHP but with a more complicated custom setup.
- john-aj 7y ago> Well I have this script processing all my directories... I didn’t suggest that; I suggested something like the following: cp -r "$1" "$2" sed -i '...' "$2/index.html" # remove old text Not at all like PHP.
- laurent123456 7y agoIt's still a script though. If there's a need for a script at all, one may as well do `php index.php > index.html` or use a static site builder as that will give a lot more flexibility. Simplifying the process of creating static sites and avoiding existing tools has been tried many times and none of the solutions is really satisfying. In the end, most require "just a small script", but which is likely to grow in complexity over time. I guess creating static sites is not that straightforward so it makes sense to use existing tools to keep things simple.
- john-aj 7y agoWell, I guess we’ll see if my script (that doesn’t even exist) grows.
- laurent123456 7y agoI don't mean to criticize. Your idea is an interesting approach but I'm simply not convinced.