3 ms·
They 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 st
by JorgeGT 9y ago
They 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.