fossbook 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -227,11 +227,16 @@ module.exports = {
227
227
  authorName: "이수현",
228
228
  authorDescription: "오픈 소스 개발자이자 작가",
229
229
  blogDescription: "한국어 블로그",
230
- homeLabel: "대문",
230
+ homeLabel: "처음",
231
231
  allPostsLabel: "모든 글",
232
- aboutLabel: "소개",
232
+ aboutLabel: "이곳은",
233
233
  tagsLabel: "태그",
234
234
  allTagsLabel: "모든 태그",
235
+ postedOnLabel: "올린 날:",
236
+ readMoreLabel: "더 읽기",
237
+ previousPageLabel: "앞으로",
238
+ nextPageLabel: "뒤로",
239
+ transcriptLabel: "말글 보이기",
235
240
  };
236
241
  ```
237
242
 
package/lib/init.js CHANGED
@@ -128,7 +128,9 @@ function initProject(options = {}) {
128
128
  // },
129
129
  // Add localized blog information to fossbook.config.en.js,
130
130
  // fossbook.config.ko.js, and so on. Menu labels can also be localized with
131
- // homeLabel, allPostsLabel, aboutLabel, tagsLabel, allTagsLabel, and transcriptLabel.
131
+ // homeLabel, allPostsLabel, aboutLabel, tagsLabel, allTagsLabel,
132
+ // postedOnLabel, readMoreLabel, previousPageLabel, nextPageLabel,
133
+ // and transcriptLabel.
132
134
 
133
135
  // Comment system (optional)
134
136
  // comments: { provider: "utterances", repo: "user/repo", issueTerm: "pathname", theme: "github-light" },
@@ -16,7 +16,12 @@ module.exports = class PageBase {
16
16
  }
17
17
 
18
18
  formatDate(date) {
19
- const options = { year: "numeric", month: "short", day: "numeric" };
19
+ const options = {
20
+ year: "numeric",
21
+ month: "short",
22
+ day: "numeric",
23
+ timeZone: "UTC",
24
+ };
20
25
  return date.toLocaleDateString(this.config.locale || "en-US", options);
21
26
  }
22
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fossbook",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "description": "A lightweight static blog site generator for GitHub Pages",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -456,6 +456,11 @@
456
456
  font-size: 1rem;
457
457
  }
458
458
 
459
+ .readmore {
460
+ display: inline-block;
461
+ margin-top: 0.75rem;
462
+ }
463
+
459
464
  /* navigation */
460
465
  h1.assistive-text {
461
466
  display: none;
@@ -517,6 +522,11 @@
517
522
  .disable-link {
518
523
  color: grey;
519
524
  }
525
+
526
+ .pagination-separator {
527
+ color: grey;
528
+ margin: 0 0.5rem;
529
+ }
520
530
 
521
531
  /* Callout */
522
532
  .callout {
@@ -47,16 +47,17 @@
47
47
  <img src="${page.config.basePath}${post.path}/images/${post.image}" alt="${post.title}">
48
48
  </div>` : ''}
49
49
  <div class="description">${post.description || ''}</div>
50
- <a class="readmore" href="${page.config.basePath}${post.path}">Read more ⟶</a>
50
+ <a class="readmore" href="${page.config.basePath}${post.path}">${page.config.readMoreLabel || "Read more"} ⟶</a>
51
51
  </section>`,
52
52
  )
53
53
  .join("")}
54
54
  <ul class="pagination" role="navigation">
55
55
  <span class="page-item page-prev">
56
- ${data.prev ? `<a href="${page.config.basePath}page/${data.prev}.html" class="page-link" aria-label="Previous">← Prev</a>` : `<span class="page-link disable-link"><span aria-hidden="true">← Prev</span></span>`}
56
+ ${data.prev ? `<a href="${page.config.basePath}page/${data.prev}.html" class="page-link" aria-label="${page.config.previousPageLabel || "Previous"}">← ${page.config.previousPageLabel || "Prev"}</a>` : `<span class="page-link disable-link"><span aria-hidden="true">← ${page.config.previousPageLabel || "Prev"}</span></span>`}
57
57
  </span>
58
+ <span class="pagination-separator" aria-hidden="true">|</span>
58
59
  <span class="page-item page-next">
59
- ${data.next ? `<a href="${page.config.basePath}page/${data.next}.html" class="page-link" aria-label="Next">Next →</a>` : `<span class="page-link disable-link"><span aria-hidden="true">Next →</span></span>`}
60
+ ${data.next ? `<a href="${page.config.basePath}page/${data.next}.html" class="page-link" aria-label="${page.config.nextPageLabel || "Next"}">${page.config.nextPageLabel || "Next"} →</a>` : `<span class="page-link disable-link"><span aria-hidden="true">${page.config.nextPageLabel || "Next"} →</span></span>`}
60
61
  </span>
61
62
  </ul>
62
63
  </main>
@@ -53,7 +53,7 @@
53
53
  <article class="content">
54
54
  <div class="title">
55
55
  <h1 class="title">${page.title}</h1>
56
- <div class="meta">Posted on ${page.formatDate(new Date(page.date))}</div>
56
+ <div class="meta">${page.config.postedOnLabel || "Posted on"} ${page.formatDate(new Date(page.date))}</div>
57
57
  ${page.languageSwitcher()}
58
58
  </div>
59
59
  ${page.body.includes('class="blockquote-container image-dialogue"') ? `<div class="transcript-control">