diff options
author | Nelson/Roberto <dewittn@gmail.com> | 2020-05-11 21:52:30 +0300 |
---|---|---|
committer | Nelson/Roberto <dewittn@gmail.com> | 2020-05-11 21:52:30 +0300 |
commit | f1d5ac57049c859e1bef07320672dee5fdb9058f (patch) | |
tree | 14c46c21d296f238bbef13154c749049e97c5ff9 | |
parent | 9ffc755a2ead78d5950b85d598c39dd7d965b221 (diff) |
Got Blog page working.
- Renamed layout for elements pag
- Create layout for sections called “list.html”
- Add /blog to the menu
-rw-r--r-- | exampleSite/config/_default/config.toml | 15 | ||||
-rw-r--r-- | exampleSite/content/blog/_index.md | 3 | ||||
-rw-r--r-- | exampleSite/content/blog/post.1.md (renamed from exampleSite/content/posts/post.1.md) | 0 | ||||
-rw-r--r-- | exampleSite/content/blog/post.10/index.md (renamed from exampleSite/content/posts/post.10/index.md) | 0 | ||||
-rw-r--r-- | exampleSite/content/blog/post.10/pic04.jpg (renamed from exampleSite/content/posts/post.10/pic04.jpg) | bin | 20737 -> 20737 bytes | |||
-rw-r--r-- | exampleSite/content/blog/post.2.md (renamed from exampleSite/content/posts/post.2.md) | 0 | ||||
-rw-r--r-- | exampleSite/content/blog/post.3.md (renamed from exampleSite/content/posts/post.3.md) | 0 | ||||
-rw-r--r-- | exampleSite/content/blog/post.4.md (renamed from exampleSite/content/posts/post.4.md) | 0 | ||||
-rw-r--r-- | exampleSite/content/blog/post.md (renamed from exampleSite/content/posts/post.md) | 0 | ||||
-rw-r--r-- | layouts/_default/list.html | 25 | ||||
-rw-r--r-- | layouts/section/elements.html (renamed from layouts/_default/section.html) | 0 |
11 files changed, 38 insertions, 5 deletions
diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index dd2574b..8021872 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -31,34 +31,39 @@ disqusShortname = "" url = "/elements/" weight = 30 [[menu.main]] + identifier = "blog" + name = "Blog" + url = "/blog/" + weight = 40 + [[menu.main]] identifier = "submenu" name = "Submenu" url = "#" - weight = 40 + weight = 50 [[menu.main]] parent = "submenu" identifier = "one" name = "Option One" url = "#" - weight = 41 + weight = 51 [[menu.main]] parent = "submenu" identifier = "two" name = "Option Two" url = "#" - weight = 42 + weight = 52 [[menu.main]] parent = "submenu" identifier = "three" name = "Option Three" url = "#" - weight = 43 + weight = 53 [[menu.main]] parent = "submenu" identifier = "four" name = "Option Four" url = "#" - weight = 44 + weight = 54 ### Social Media Links ### [[params.share]] diff --git a/exampleSite/content/blog/_index.md b/exampleSite/content/blog/_index.md new file mode 100644 index 0000000..8ab47bd --- /dev/null +++ b/exampleSite/content/blog/_index.md @@ -0,0 +1,3 @@ ++++ +Title = "My Blog" ++++
\ No newline at end of file diff --git a/exampleSite/content/posts/post.1.md b/exampleSite/content/blog/post.1.md index 6e966e1..6e966e1 100644 --- a/exampleSite/content/posts/post.1.md +++ b/exampleSite/content/blog/post.1.md diff --git a/exampleSite/content/posts/post.10/index.md b/exampleSite/content/blog/post.10/index.md index 55fa2eb..55fa2eb 100644 --- a/exampleSite/content/posts/post.10/index.md +++ b/exampleSite/content/blog/post.10/index.md diff --git a/exampleSite/content/posts/post.10/pic04.jpg b/exampleSite/content/blog/post.10/pic04.jpg Binary files differindex b0206cb..b0206cb 100644 --- a/exampleSite/content/posts/post.10/pic04.jpg +++ b/exampleSite/content/blog/post.10/pic04.jpg diff --git a/exampleSite/content/posts/post.2.md b/exampleSite/content/blog/post.2.md index c8380b8..c8380b8 100644 --- a/exampleSite/content/posts/post.2.md +++ b/exampleSite/content/blog/post.2.md diff --git a/exampleSite/content/posts/post.3.md b/exampleSite/content/blog/post.3.md index f0c5012..f0c5012 100644 --- a/exampleSite/content/posts/post.3.md +++ b/exampleSite/content/blog/post.3.md diff --git a/exampleSite/content/posts/post.4.md b/exampleSite/content/blog/post.4.md index 9101391..9101391 100644 --- a/exampleSite/content/posts/post.4.md +++ b/exampleSite/content/blog/post.4.md diff --git a/exampleSite/content/posts/post.md b/exampleSite/content/blog/post.md index 08b51ba..08b51ba 100644 --- a/exampleSite/content/posts/post.md +++ b/exampleSite/content/blog/post.md diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..ff096a0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,25 @@ +{{ define "main" }} +{{ $blogSettings := .Site.Data.homepage.blog }} + <header> + <h2>{{ .Title }}</h2> + </header> + <div class="row"> + {{ range .Pages }} + <div class="col-6 col-12-narrower"> + <section class="box special"> + <span class="image featured"><img src="{{ .Params.image }}" alt="" /></span> + <h3>{{ .Title }}</h3> + {{ with .Date }}<p>{{ .Format "Jan 2, 2006" }}</p>{{ end }} + {{ with .Description }} + <p>{{ . }}</p> + {{ else }} + <p>{{ .Summary }}</p> + {{ end }} + <ul class="actions special"> + <li><a href="{{ .Permalink }}" class="button alt">{{ $blogSettings.buttonText }} </a></li> + </ul> + </section> + </div> + {{ end }} + </div> +{{ end }}
\ No newline at end of file diff --git a/layouts/_default/section.html b/layouts/section/elements.html index 3151171..3151171 100644 --- a/layouts/_default/section.html +++ b/layouts/section/elements.html |