4 ms·
and footer and sidebar and other 'components'.
by antigirl 9y ago
and footer and sidebar and other 'components'.
- JorgeGT 9y agoThey do much more: primarily, they translate from markdown to HTML. This is, you don't write your content in HTML, you write it in a markup language that the static generator converts in an HTML document. Then, they can manage tags, paginating, menu structures, etc. For instance, you can write > {% note %} Something I want to emphasize {% endnote %} And this will be converted by the generator into a properly-styled <div> according to your theme. If you change the theme, another run of the generator will convert the note to a different style, without you needing to change your content.
- enriquto 9y agobut that's exactly the purpose of HTML and CSS an <em> emphasized </em> word and then you style the tag however you want. You just change the .css file, no need to rerun anything.
- JorgeGT 9y agoIn that example yes, but if I put {% author %} Name {% author %}, a static build system can put the author name centered in the top of the page, or in a signature at the bottom, or in a floating div on the sidebar, or... In your HTML document, you would need to change the structure manually for each content file, of which you can have thousands.
- enriquto 9y agoI understand. However, in the rare cases I have to make global changes, I prefer to write a throwaway awk program that does the job automatically.
- tasuki 9y ago...and then update the sidebar in 15 places when adding a new entry...
- koverda 9y agoA static site generator lets you only update it in once place, rather than 15, when you make a change.
- BeetleB 9y agoNot to mention creating pages for all my tags.