Commit Graph

751 Commits

Author SHA1 Message Date
Kazuhiro MUSASHI da156b535f Introduce the pagination to the Labs's section list page:
```
--- a/layouts/labs/list.html
+++ b/layouts/labs/list.html
@@ -6,14 +6,34 @@
     <div class="article-header light-gray"><h1>{{ .Title }}</h1></div>
     {{.Content}}
     <br>
-    {{ range .Data.Pages }}
+    {{ $paginator := .Paginate (where .Data.Pages  "Type" "labs") }}
+    {{ range $paginator.Pages }}
     <div class="summary">
       <h2><a href="{{ .Permalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a></h2>
       <div class="meta">
-        {{ .Date.Format "Jan 2, 2006" }}: {{.Description}}
+        {{ .Date.Format "Jan 2, 2006" }} &nbsp;
+        {{ range .Params.categories }}
+          #<a href="/categories/{{ . | urlize }}">{{ . }}</a>&nbsp;
+        {{ end }}
+        {{ range .Params.tags }}
+          #<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
+        {{ end }}: {{ .Description }}
       </div>
     </div>
     {{ end }}
   </main>

+<!-- Paginator Section Layout
+–––––––––––––––––––––––––––––––––––––––––––––––––– -->
+<nav>
+  {{ $paginator := .Paginate (where .Data.Pages "Type" "labs") }}
+  {{ if .Paginator.HasPrev }}
+  <a href="{{ .Paginator.Prev.URL }}">Prev</a>
+  {{ end }}
+  <span class="">Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
+  {{ if .Paginator.HasNext }}
+  <a href="{{ .Paginator.Next.URL }}">Next</a>
+  {{ end }}
+</nav>
+
 {{ partial "footer.html" . }}
```
2019-04-15 00:02:06 +08:00
Kazuhiro MUSASHI 6a6660144f [WIP] Improve the Labs' seciton list page's pagination.
Introduce the pagination to the Labs' section list page.
2019-04-14 23:55:37 +08:00
Kazuhiro MUSASHI 90d8a30ae4
Merge pull request #12 from kazu634/sort-the-articles-out
Sort the articles out
2019-04-14 22:53:03 +07:00
Kazuhiro MUSASHI bdfc1d260c Discard the unnecessary articles & change the category of some posts. 2019-04-14 23:51:03 +08:00
Kazuhiro MUSASHI c4564f1f07 [WIP] Discard the unnecessary articles.
Since there are so many articles, I decide to discard the unnecessary
articles.
2019-04-14 18:59:36 +08:00
Kazuhiro MUSASHI 939d713be7
Merge pull request #11 from kazu634/modify-labs-section-pagination
Modify labs section pagination
2019-04-14 17:58:11 +07:00
Kazuhiro MUSASHI 746c5079d0 Change the Labs section's pagination to be within the section:
```
--- a/layouts/labs/single.html
+++ b/layouts/labs/single.html
@@ -21,11 +21,11 @@
   </main>

   <nav class="pagination">
-    {{ if .Next }}
-      <span class="previous">&larr; <a href="{{ .Next.Permalink }}" rel="prev">{{ .Next.Title }}</a></span>
+    {{ with .PrevInSection }}
+    <span class="previous">&larr; <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></span>
     {{ end }}
-    {{ if .Prev }}
-      <span class="next"><a href="{{ .Prev.Permalink }}" rel="next">{{ .Prev.Title }}</a> &rarr;</span>
+    {{ with .NextInSection }}
+    <span class="next"><a href="{{ .Permalink }}" rel="next">{{ .Title }}</a> &rarr;</span>
     {{ end }}
   </nav>
```
2019-04-14 18:56:42 +08:00
Kazuhiro MUSASHI e7f7fa7efd [WIP] Modify the Labs section pagination. 2019-04-14 18:46:19 +08:00
Kazuhiro MUSASHI fb17034375
Merge pull request #10 from kazu634/create-travel-section
Create travel section
2019-04-14 15:52:01 +07:00
Kazuhiro MUSASHI b26a764425 Move some articles under the travel section. 2019-04-14 16:50:53 +08:00
Kazuhiro MUSASHI 306627f732 Add the travel section to the section definition.
```
--- a/layouts/partials/sections-definition.html
+++ b/layouts/partials/sections-definition.html
@@ -1,2 +1,3 @@
           <li><a href="https://blog.kazu634.com/labs/">Labs</a></li>
           <li><a href="https://blog.kazu634.com/quotes/">Quotes</a></li>
+          <li><a href="https://blog.kazu634.com/travel/">Travel</a></li>
```
2019-04-14 16:50:23 +08:00
Kazuhiro MUSASHI 0982980ea5 Display the travel section explanation. 2019-04-14 16:49:56 +08:00
Kazuhiro MUSASHI cfcf7e5f0a Add explanation for the travel section.
```
--- /dev/null
+++ b/content/travel/_index.md
@@ -0,0 +1,7 @@
+---
+title: Travel Page
+date: 2019-04-14
+publishdate: 2019-04-14
+---
+
+旅行関係の記事をここに集めてみました。
```
2019-04-14 16:48:49 +08:00
Kazuhiro MUSASHI 2c1c89d9f6 [WIP] Create the travel section.
This is to create the travel section.
2019-04-14 16:04:17 +08:00
Kazuhiro MUSASHI 9073f99314
Merge pull request #9 from kazu634/separate-section-definitions-to-partial
Separate section definitions to partial
2019-04-14 15:03:27 +07:00
Kazuhiro MUSASHI 545c096087 Modify the header templates to refer to the section partial html. 2019-04-14 16:02:03 +08:00
Kazuhiro MUSASHI 0984e402a4 Add the partial definition for the section definition. 2019-04-14 16:01:23 +08:00
Kazuhiro MUSASHI ac38ed01cc [WIP] Consolidate/separate the section definitions to the partial definition.
This is to consolidate/separate the section definitions on each list.html to the
partial definition.
2019-04-14 15:32:15 +08:00
Kazuhiro MUSASHI 8d0069af4c
Merge pull request #8 from kazu634/create-quote-section
Create quote section
2019-04-14 14:30:27 +07:00
Kazuhiro MUSASHI aa2986d0ce Move some articles under the Quotes category. 2019-04-14 15:28:33 +08:00
Kazuhiro MUSASHI e44c14657a Customize the pagination to be within the Quotes section. 2019-04-14 15:28:20 +08:00
Kazuhiro MUSASHI 8bbe6b7223 Add the explanation for the Quotes section. 2019-04-14 15:28:09 +08:00
Kazuhiro MUSASHI 105c1017b0 Add index page for Quotes section 2019-04-14 15:28:08 +08:00
Kazuhiro MUSASHI f91dd9b965 Add Quotes section for each header files. 2019-04-14 15:28:00 +08:00
Kazuhiro MUSASHI a572fc1f3c [WIP] Create quote section.
This is to create `quote` section.
2019-04-14 00:40:41 +08:00
Kazuhiro MUSASHI aa3caf53e1
Merge pull request #7 from kazu634/shortcode-leafletjs
Add shortcodes for leafletjs
2019-04-13 23:34:45 +07:00
Kazuhiro MUSASHI d6b773f8e8 Modify contents to demonstrate `Leaflet.js` shorcodes. 2019-04-14 00:31:10 +08:00
Kazuhiro MUSASHI c1cc2467e7 Add a shorcode for TopoJSON support. 2019-04-14 00:29:54 +08:00
Kazuhiro MUSASHI 7e1fc240f3 Add `leaflet-circle.html` as a shorcode for map circle. 2019-04-14 00:29:26 +08:00
Kazuhiro MUSASHI 78fd1b8673 Add `leaflet-marker.html` as a shortcode for map marker. 2019-04-14 00:28:58 +08:00
Kazuhiro MUSASHI 9cffb5d267 Add `leaflet-map.html` as a short code for the map. 2019-04-14 00:28:23 +08:00
Kazuhiro MUSASHI 0752b8e267
Merge pull request #6 from kazu634/delete-public-directory-before-generation
Delete public directory before generation
2019-04-13 18:11:55 +07:00
Kazuhiro MUSASHI 20da08ecbb Delete the `public` directory before generating the contents.
```
--- a/tasks/build.rake
+++ b/tasks/build.rake
@@ -20,8 +20,6 @@ end

 desc 'Generate the HTML pages'
 task :build do
-  sh 'hugo'
-
   cd 'content/post' do
     if os == :linux
       sh 'grep -l ecx.images-amazon.com *.md | sort | uniq | xargs --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
@@ -33,4 +31,10 @@ task :build do
     sh 'rm *.mde || true'
     sh 'rm *.md-e || true'
   end
+
+  cd 'public' do
+    sh 'rm -rf *'
+  end
+
+  sh 'hugo'
 end
```
2019-04-13 19:03:45 +08:00
Kazuhiro MUSASHI 82e81fcfbf [WIP] Delete public directory before hugo generates the contents.
Delete public directory before hugo generates the contents.
2019-04-12 22:17:47 +08:00
Kazuhiro MUSASHI 0419f696a2
Merge pull request #5 from kazu634/ignore-vim-swap-file
Ignore vim swap file.
2019-04-12 15:44:41 +07:00
Kazuhiro MUSASHI 110c2513bd Ignore vim swap file. 2019-04-12 15:43:58 +07:00
Kazuhiro MUSASHI edb7a95bc4
Merge pull request #4 from kazu634/make-another-sections
Make `Labs` section
2019-04-09 09:34:05 +09:00
Kazuhiro MUSASHI bf1ecb0a9c Add example content of Labs section. 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI ebdf0b1dfb Load the different headers from the default one. 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI 45c958bcdd Display the Labs page explanation, list up the articles on the Labs page. 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI d42a8e4085 Add Labs page explanation _index.html 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI 057b117413 Add link to the Labs section 2019-04-09 07:26:35 +08:00
Kazuhiro MUSASHI 1a934a8897
Merge pull request #3 from kazu634/delete-posts-without-date-information
Delete the posts without date information
2019-04-07 23:47:59 +09:00
Kazuhiro MUSASHI 860d782b3e Delete the posts without date information 2019-04-07 22:47:00 +08:00
Kazuhiro MUSASHI f3067f82d4
Merge pull request #2 from kazu634/url-modify
Url modify
2019-04-02 23:14:28 +07:00
Kazuhiro MUSASHI f538600b0b Delete the `url` setting from the archetypes file. 2019-04-02 23:13:03 +07:00
Kazuhiro MUSASHI 4feda5305c Delete the unnecessary commands from the new task. 2019-04-02 23:12:33 +07:00
Kazuhiro MUSASHI 36ba17039d Delete the url setting from `.md` files. 2019-04-02 23:09:46 +07:00
Kazuhiro MUSASHI c78d9c7e3b
Merge pull request #1 from kazu634/change-directory-structure
Change the directory structure.
2019-03-31 23:28:58 +07:00
Kazuhiro MUSASHI a1f6427f14 Change the directory structure. 2019-04-01 00:25:36 +08:00