# Page structure \blurb{Pages are assembled like lego blocks.} ## Overview At a high level, the process to go from a markdown file `file.md` to the corresponding html page is quite simple: ```plaintext result = head * body * page_foot * foot ``` where * `head` corresponds to `_layout/head.html`, * `page_foot` and `foot` correspond respectively to `_layout/page_foot.html` and `_layout/foot.html`, * `body` correspond to Franklin's conversion of input markdown. One additional step processes the resulting HTML to resolve any html function (`{{ ... }}`) that may be left. The final HTML for a page will essentially look like: ```html
... ... ``` Of course it will depend of what you have in your `_layout/head.html` etc, you can tweak this at will. You can also make this as modular as you want by using conditional blocks in your `head.html` and insert specific sub layouts depending on the page. For instance the `head.html` file could include something like ```html {{ispage blog/*}} {{insert head_blog}}{{end}} ``` for more on this, see the section on [page variables](/syntax/page-variables/). \note{This also means that it is required to have a `_layout/head.html`, `_layout/foot.html` and `_layout/page_foot.html`, you **must** have these files but they can be empty (in practice it wouldn't make sense to have all of them be empty but you could have `page_foot` empty).} ### Resolved body The resolved body is plugged in a "container" div ```html