How to use html5 boiler stove?

I am new to webdeveloper. Although, I understand that the html5 boiler plate brings to the table, I would like to know how I can expand / configure it to use it in all my html files?

It currently provides index.html.

  • So what is the convention / method for creating a new html file?
  • Should I create a separate html folder?
  • How do I inherit the properties of the index.html file? (Copy-paste?) Could there be something like Django, where can I inherit baseurl?
  • Although, I have some understanding of working with javascript and css, is there anything else I should take care of when dealing with the html5 boiler plate and browser compatibility?
+6
source share
3 answers

In the beginning there is no real rhyme or reason why you store your html files, because usually it's just a plus css file or something else.

However, when you go into real development, as is the case with the framework for the front-end + back-end code, you will find that there is a need to separate it on the server side and the public in the interests of controlling access to files and naming conventions.

If so, you are in the โ€œAssetsโ€ folder, or โ€œpublicโ€ or something like that. The boiler tends to follow this convention.

In order for the template template to automatically expand to all of your html files, you must develop your view files in order to be modular.

Main template file | ----header (contains all the references / includes to boilerplate) ----content ----footer 

Also note that at this point your html will no longer be stored as a .html file type; you must use a language capable of combining files as chunks. PHP does it beautifully, and as you know, django can handle this as well. Ruby on rails, etc. You will need to decide what language you want to work in. OTHERWISE, the old html chunks concatenation method is the back end (aka SSI or .shtml)

The issue of the base URL is resolved if your server side language works with your web server directives. For apache, you use mod_rewrite, and then you can pass arg in a url that targets some classes / models / views, etc. MVC frameworks have actually solved this problem for you if you don't mind using it.

+7
source

"You can override which folders and files you want to use in project.properties. All default settings are default.properties." http://html5boilerplate.com/docs/Build-script/

default.properties is in / build / config

You need to add the pages to the line starting with "file.pages", for example:

file.pages = new-page.html "

0
source

HTML Core Boilerplate

  • HTML is the default HTML guide.
  • CSS is the default CSS guide.
  • JavaScript is the default JavaScript guide.
  • .htaccess - All about Apache web server configuration (also see our alternative server configurations).
  • crossdomain.xml - an introduction to using crossdomain queries.
  • All the rest.
-1
source

Source: https://habr.com/ru/post/913456/


All Articles