I am a newbie webdeveloper. Though, I understand what html5 boiler-plate brings to the table, I would like to know how can I extend/customize it to use it in all my html files?
As of now, it provides an index.html.
In the beginning there is no real rhyme or reason to where you store your html files, because usually its just that plus some css file, or whatever.
However, when you get into real development, as in with a framework for front end + back end code, you will find that there is a need to separate things out as server side and public for the benefit of file access control and naming conventions.
When that is the case, you end up with an "Assets" folder, or "public" or something like that. Boilerplate tends to follow that convention.
In order to make boilerplate be automatically extended to all of your html files, you must develop your view files to be modular.
Main template file
|
----header (contains all the references / includes to boilerplate)
----content
----footer
Also, please note that at that point, your html will no longer be stored as .html file type; you must use a language that is capable of combining files as chunks. PHP does this nicely, and as you know, django can handle that as well. Ruby on rails, etc. you're gonna need to decide what language you want to work in for that. OTHERWISE, the old method of combining html chunks is server side includes (aka SSI or .shtml)
The issue of a base url is solved by having your server side language of choice work with the directives of your web server. For apache, you use mod_rewrite, and then you can pass an arg in the url that targets some classes / models / views, etc. MVC frameworks actually have already solved that problem for you, if you dont mind using one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With