-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multilangauge and weekly digest (#2)
* chore: use `deno.jsonc` * ci: allow empty tests * fix: rendering style * fix: date not being sorted properly * chore: organize pages * feat: nav bar * feat: multilangauge and weekly digest
- Loading branch information
Showing
27 changed files
with
1,299 additions
and
466 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
_site | ||
pr.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
import { lume } from "./lume_core.ts" | ||
import type { Processor } from "lume/core/processors.ts" | ||
|
||
import multilanguage from "lume/plugins/multilanguage.ts" | ||
import relativeUrls from "lume/plugins/relative_urls.ts" | ||
import inline from "lume/plugins/inline.ts" | ||
import minifyHTML from "lume/plugins/minify_html.ts" | ||
|
||
const site = lume() | ||
|
||
site.copy([".css"]) | ||
site.ignore("./README.md") | ||
site.data("layout", "_includes/base.ts") | ||
site.use(relativeUrls()) | ||
site | ||
.copy([".css"]) | ||
.ignore("./README.md", "./CONTRIBUTING.md") | ||
.data("layout", "_includes/base.ts") | ||
|
||
const addMeta: Processor = (pages) => | ||
pages.forEach((page) => { | ||
page.data.date = new Date(page.data.basename) | ||
page.data.title = page.data.title ?? page.data.basename | ||
}) | ||
|
||
site | ||
.preprocess([".md"], addMeta) | ||
.use(relativeUrls()) | ||
.use(multilanguage({ languages: ["ko"] })) | ||
|
||
if (Deno.env.get("MINIFY")) { | ||
site.use(inline()) | ||
site.use(minifyHTML()) | ||
site | ||
.use(inline()) | ||
.use(minifyHTML()) | ||
} | ||
|
||
export default site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const layout = "base.ts" | ||
export const head = /*html*/ ` | ||
<link rel="stylesheet" href="/assets/pages.css" inline /> | ||
` | ||
|
||
export default ({ children }: Lume.Data) => /*html*/ ` | ||
${children} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
:root { | ||
--width: 800px; | ||
} | ||
|
||
body { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100dvh; | ||
|
||
--margin: calc(100vw - var(--width)); | ||
margin: auto max(0vw, calc(var(--margin) / 2)); | ||
} | ||
|
||
main { | ||
max-width: var(--width); | ||
|
||
display: flex; | ||
flex-direction: column; | ||
line-height: 1.6; | ||
color: #444; | ||
} | ||
|
||
main>header { | ||
& { | ||
display: flex; | ||
align-items: flex-end; | ||
margin: 1em 0; | ||
gap: 1em; | ||
} | ||
|
||
h1 { | ||
margin: 0; | ||
} | ||
} | ||
|
||
main, | ||
nav { | ||
margin-bottom: auto; | ||
} | ||
|
||
footer { | ||
margin: 1em auto; | ||
} | ||
|
||
hr { | ||
width: 100%; | ||
} | ||
|
||
img { | ||
max-width: min(100%, var(--width)); | ||
height: auto; | ||
object-fit: contain; | ||
} | ||
|
||
a { | ||
text-decoration-line: underline; | ||
} | ||
|
||
li code { | ||
font-size: 1rem; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3 { | ||
line-height: 1.2; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
nav { | ||
|
||
h1, | ||
h2, | ||
h3 { | ||
margin: 0.5em auto; | ||
} | ||
} | ||
|
||
ul { | ||
padding-left: 1em; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.