Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 33656d4

Browse files
committed
Add HTML to modules folder and parse module html
This adds better docs to the static page builder and therefore targets (#118). It’s part of #123 (v2.0) though and closes #129 when merged.
1 parent 4d97d24 commit 33656d4

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Changelog
22

33
### HEAD
4+
* Add HTML to modules folder and parse module html (#129)
45
* Update npm dependencies to latest versions
56
* Include better tracking via Google Analytics in a separate file
67
* Fetch the `.htaccess` file via `npm`
78
* Add a modules folder for all components on a page
8-
99
* Re-add .htaccess: server-configs-apache in version 2.11.0
1010
* Remove conditional comments for old IE
1111
* Drop IE8 support: update jQuery to v2.1.1

docs/TOC.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
* [Toolchain](toolchain.md) — The tools we use: GruntJS, RequireJS and more.
1111
* [HTML5 Boilerplate](html5-boilerplate.md) — More about the famous front-end template.
12+
* [HTML Pages](pages.md) – How to build your HTML markup with INIT.
1213
* [CSS](css.md) — How to use CSS in INIT.
1314
* [JavaScript](js.md) — A guide to the default JavaScript with RequireJS.
1415
* [Build process](grunt.md) - A detailed guide to the GruntJS configs.

docs/html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The HTML structure is mainly based on the famous [HTML5 Boilerplate](http://html5boilerplate.com/). While we use this as a base for our markup we add several things including a default markup for your page layout. This is very simple and it is strongly recommended to adapt this markup to your fits.
66

7-
## Legazy Internet Explorer
7+
## Legacy Internet Explorer
88

99
To inform users of older Internet Explorers for which the project has not been optimized anymore we provide a Conditional Comment (by default targeting users of IE8 and lower) with a nice little toolbar appearing on top of your website. You are free to adapt this element via changing the text in the markup or adjusting the style via the [`.browsehappy` CSS class](../src/css/layout/base.css#L:85).
1010

docs/pages.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[« back to Table of Contents](TOC.md)
2+
3+
# Build HTML pages with INIT
4+
5+
We use [the concat task](concat.md) to stack pages together. In the `src`
6+
folder we have the `templates` and the `modules` folder which can contain
7+
markup that you want to use for a page.
8+
9+
The `template` folder usually contains the frame of the page which stacks
10+
modules together. All modular code (i.e. a navigation, footer, sidebar or
11+
teaser) should be in the `modules`' own folder as HTML partial.
12+
13+
To build a proper structure you need to configure your page file (usually
14+
known) as ‘template’. In INIT this configuration is done in the
15+
[`pages.json`](../pages.json) file. Add the partials you want to use in the
16+
proper order and comma-separated into the `src` array.
17+
18+
For multiple pages extend the JSON by adding another object (which means page)
19+
to it.

pages.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"src": [
44
"src/templates/header.html",
55
"src/templates/index.html",
6+
"src/modules/module/module.html",
67
"src/templates/footer.html"
78
],
89
"dest": "temp/index.html"

src/modules/module/module.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!-- Place the markup of your module here -->

0 commit comments

Comments
 (0)