Commit 0c071d21 authored by epsi sayidina's avatar epsi sayidina

Restructure All Steps

parent 425450cd
......@@ -68,15 +68,15 @@ Comparation with other static site generator
## Chapter Step by Step
### Tutor 00
### Tutor 01
> Running Eleventy at The First Time
* Configuration: Minimal
![Eleventy Bulma MD: Tutor 00][11ty-bulma-md-preview-00]
![Eleventy Bulma MD: Tutor 01][11ty-bulma-md-preview-01]
### Tutor 01
### Tutor 02
> Generate Only Pure HTML
......@@ -92,11 +92,11 @@ Comparation with other static site generator
* Nunjucks: Basic Loop
![Eleventy Bulma MD: Tutor 01][11ty-bulma-md-preview-01]
![Eleventy Bulma MD: Tutor 02][11ty-bulma-md-preview-02]
-- -- --
### Tutor 02
### Tutor 03
> Common Layout (without stylesheet)
......@@ -112,11 +112,11 @@ Comparation with other static site generator
* Nunjucks: Tag Loop
![Eleventy Bulma MD: Tutor 02][11ty-bulma-md-preview-02]
![Eleventy Bulma MD: Tutor 03][11ty-bulma-md-preview-03]
-- -- --
### Tutor 03
### Tutor 04
> Add Pure Bulma CSS Framework
......@@ -130,11 +130,11 @@ Comparation with other static site generator
* Nunjucks: More Blocks
![Eleventy Bulma MD: Tutor 03][11ty-bulma-md-preview-03]
![Eleventy Bulma MD: Tutor 04][11ty-bulma-md-preview-04]
-- -- --
### Tutor 04
### Tutor 05
> Add Custom SASS (Custom Design)
......@@ -154,11 +154,11 @@ Comparation with other static site generator
* Nunjucks: Nice post index using bulma inside loop
![Eleventy Bulma MD: Tutor 04][11ty-bulma-md-preview-04]
![Eleventy Bulma MD: Tutor 05][11ty-bulma-md-preview-05]
-- -- --
### Tutor 05
### Tutor 06
> Refactoring with Nunjucks
......@@ -192,11 +192,11 @@ Comparation with other static site generator
* Content: Excerpt (<!--more-->): Read More Separator
![Eleventy Bulma MD: Tutor 05][11ty-bulma-md-preview-05]
![Eleventy Bulma MD: Tutor 06][11ty-bulma-md-preview-06]
-- -- --
### Tutor 06
### Tutor 07
> Features
......@@ -220,11 +220,11 @@ Comparation with other static site generator
* Collection: postsPrevNext
![Eleventy Bulma MD: Tutor 06][11ty-bulma-md-preview-06]
![Eleventy Bulma MD: Tutor 07][11ty-bulma-md-preview-07]
-- -- --
### Tutor 07
### Tutor 08
> Optional Feature
......@@ -266,14 +266,13 @@ Comparation with other static site generator
* Metadata: Complete Author Info
![Eleventy Bulma MD: Tutor 07][11ty-bulma-md-preview-07]
![Eleventy Bulma MD: Tutor 08][11ty-bulma-md-preview-08]
-- -- --
What do you think ?
[11ty-bulma-md-preview]: https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-00]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-00/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-01]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-01/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-02]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-02/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-03]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-03/11ty-bulma-md-preview.png
......@@ -281,3 +280,4 @@ What do you think ?
[11ty-bulma-md-preview-05]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-05/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-06]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-06/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-07]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-07/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-08]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-08/11ty-bulma-md-preview.png
module.exports = function(eleventyConfig) {
// Return your Config object
return {
// Templating Engine
templateFormats: [
"njk",
"html"
],
// Directory Management
dir: {
// default
input: "views",
output: "_site",
// ⚠️ This value is relative to your input directory.
includes: "_includes",
}
};
};
### Tutor 00
> Running Eleventy at The First Time
* Configuration: Minimal
![Eleventy Bulma MD: Tutor 00][11ty-bulma-md-preview-00]
-- -- --
What do you think ?
[11ty-bulma-md-preview-00]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-00/11ty-bulma-md-preview.png
---
layout : layouts/home
---
<p>To have, to hold, to love,
cherish, honor, and protect?</p>
<p>To shield from terrors known and unknown?
To lie, to deceive?</p>
<p>To live a double life,
to fail to prevent her abduction,
erase her identity,
force her into hiding,
take away all she has known.</p>
......@@ -2,22 +2,13 @@ module.exports = function(eleventyConfig) {
// Return your Config object
return {
// URL Related
pathPrefix: "/",
// Templating Engine
templateFormats: [
"md",
"njk",
"html"
],
markdownTemplateEngine: false,
htmlTemplateEngine: false,
dataTemplateEngine: false,
// Directory Management
passthroughFileCopy: true,
dir: {
// default
input: "views",
......
tutor-01/11ty-bulma-md-preview.png

149 KB | W: | H:

tutor-01/11ty-bulma-md-preview.png

94 KB | W: | H:

tutor-01/11ty-bulma-md-preview.png
tutor-01/11ty-bulma-md-preview.png
tutor-01/11ty-bulma-md-preview.png
tutor-01/11ty-bulma-md-preview.png
  • 2-up
  • Swipe
  • Onion skin
### Tutor 01
> Generate Only Pure HTML
> Running Eleventy at The First Time
* Configuration: Basic
* Configuration: Minimal
* Setup Directory for Minimal Eleventy
* Basic Layout: Base, Page, Post
* Partials: Site Wide: HTML Head, Header, Footer
* Basic Content: Page and Post
* Nunjucks: Basic Loop
![Eleventy Bulma MD: Tutor 01][11ty-bulma-md-preview-01]
![Eleventy Bulma MD: Tutor 00][11ty-bulma-md-preview-00]
-- -- --
What do you think ?
[11ty-bulma-md-preview-01]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-01/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-00]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-00/11ty-bulma-md-preview.png
{% extends "layouts/base.njk" %}
{% block main %}
<h2>{{ renderData.title or title }}</h2>
<strong>This is a page kind layout.</strong>
<br/>
{{ content | safe }}
{% endblock %}
{% extends "layouts/base.njk" %}
{% block main %}
<h2>{{ title }}</h2>
<pre>{{ page.date }}</pre>
<br/>
<strong>This is a post kind layout.</strong>
<br/>
{{ content | safe }}
{% endblock %}
<blockquote><i>As always, should you be caught or killed,
any knowledge of your actions will be disavowed.</i></blockquote>
<title>Your mission. Good Luck!</title>
<link href="/assets/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<blockquote><i>Your mission, should you decide to accept it.</i></blockquote>
---
layout : layouts/page
eleventyExcludeFromCollections: true
layout : layouts/home
---
<p>To have, to hold, to love,
......
---
layout : layouts/page
title : Archives
eleventyExcludeFromCollections: true
---
<ul>
{%- for post in collections.all | reverse -%}
<li>
<a href="{{ post.url | url }}">
{{ post.data.title }}</a>
</li>
{%- endfor -%}
</ul>
const moment = require("moment");
module.exports = function(eleventyConfig) {
// Directory Management
eleventyConfig.addPassthroughCopy("assets");
// Layout Alias
eleventyConfig.addLayoutAlias("home", "layouts/home.njk");
eleventyConfig.addLayoutAlias("page", "layouts/page.njk");
eleventyConfig.addLayoutAlias("post", "layouts/post.njk");
eleventyConfig.addLayoutAlias("archives", "layouts/archives.njk");
eleventyConfig.addLayoutAlias("tags", "layouts/tags.njk");
eleventyConfig.addLayoutAlias("tag-name", "layouts/tag-name.njk");
// Miscellanous Filters
// Copy paste from Jérôme Coupé
eleventyConfig.addNunjucksFilter("date", function(date, format) {
return moment(date).format(format);
});
// Miscellanous Collection
// Copy paste from Zach
eleventyConfig.addCollection("tagList",
require("./views/_11ty/getTagList"));
// Return your Config object
return {
// URL Related
......@@ -38,18 +12,18 @@ module.exports = function(eleventyConfig) {
"html"
],
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dataTemplateEngine: "njk",
markdownTemplateEngine: false,
htmlTemplateEngine: false,
dataTemplateEngine: false,
// Directory Management
passthroughFileCopy: true,
dir: {
// default
input: "views",
output: "dist",
// ⚠️ These values are both relative to your input directory.
output: "_site",
// ⚠️ This value is relative to your input directory.
includes: "_includes",
data: "_data"
}
};
};
tutor-02/11ty-bulma-md-preview.png

105 KB | W: | H:

tutor-02/11ty-bulma-md-preview.png

149 KB | W: | H:

tutor-02/11ty-bulma-md-preview.png
tutor-02/11ty-bulma-md-preview.png
tutor-02/11ty-bulma-md-preview.png
tutor-02/11ty-bulma-md-preview.png
  • 2-up
  • Swipe
  • Onion skin
### Tutor 02
> Common Layout (without stylesheet)
> Generate Only Pure HTML
* Configuration: Alias, Filter, Collection
* Configuration: Basic
* Additional Layout: Home, Archives, Index
* Setup Directory for Minimal Eleventy
* Additional Layout: Tags List and Generate Each Tag Name
* Basic Layout: Base, Page, Post
* Basic View: Index, about
* Partials: Site Wide: HTML Head, Header, Footer
* Metadata
* Basic Content: Page and Post
* Nunjucks: Tag Loop
* Nunjucks: Basic Loop
![Eleventy Bulma MD: Tutor 02][11ty-bulma-md-preview-02]
![Eleventy Bulma MD: Tutor 01][11ty-bulma-md-preview-01]
-- -- --
What do you think ?
[11ty-bulma-md-preview-02]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-02/11ty-bulma-md-preview.png
[11ty-bulma-md-preview-01]:https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/raw/master/tutor-01/11ty-bulma-md-preview.png
{
"name": "tutor-11ty-bulma-md",
"description": "Eleventy Bulma MD Test Drive: Chapter 02",
"description": "Eleventy Bulma MD Test Drive: Chapter 01",
"author": "Epsiarto Rizqi Nurwijayadi",
"homepage": "https://gitlab.com/epsi-rns/tutor-11ty-bulma-md#readme",
"version": "0.2.0",
"version": "0.1.0",
"scripts": {
"build": "npx eleventy",
"watch": "npx eleventy --watch",
......@@ -18,7 +18,6 @@
"url": "https://gitlab.com/epsi-rns/tutor-11ty-bulma-md/issues"
},
"devDependencies": {
"@11ty/eleventy": "^0.10.0",
"moment": "^2.24.0"
"@11ty/eleventy": "^0.11.0"
}
}