mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-07-18 04:47:36 +00:00
Compare commits
2 Commits
767037a66f
...
78832de162
Author | SHA1 | Date | |
---|---|---|---|
78832de162 | |||
158a19d35e |
10
Dockerfile
10
Dockerfile
@ -15,9 +15,15 @@ COPY package.json .
|
|||||||
COPY package-lock.json* .
|
COPY package-lock.json* .
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
FROM node:22-slim
|
FROM node:22-slim AS quartz
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY --from=builder /usr/src/app/ /usr/src/app/
|
COPY --from=builder /usr/src/app/ /usr/src/app/
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=convert /usr/src/app/ /usr/src/app/content/
|
COPY --from=convert /usr/src/app/ /usr/src/app/content/
|
||||||
CMD ["npx", "quartz", "build", "--serve"]
|
RUN npx quartz build
|
||||||
|
|
||||||
|
FROM nginx:latest
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
COPY --from=quartz /usr/src/app/public/ /usr/share/nginx/html/
|
||||||
|
WORKDIR /etc/nginx/
|
||||||
|
COPY custom/nginx/default.conf /etc/nginx/conf.d/
|
7
custom/compose.yaml
Normal file
7
custom/compose.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: quartz-jpg
|
||||||
|
container_name: quartz-jpg
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
@ -1,12 +0,0 @@
|
|||||||
services:
|
|
||||||
quartz:
|
|
||||||
image: quartz-jpg
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
environment:
|
|
||||||
NODE_ENV: production
|
|
||||||
container_name: quartz-jpg-container
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
3
custom/init-repos.sh
Normal file
3
custom/init-repos.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
git remote add content https://git.marchal.dev/keb/jpg-content.git
|
||||||
|
git remote add convert-furigana https://git.marchal.dev/keb/jpg-convert-furigana.git
|
||||||
|
git remote add convert-usage https://git.marchal.dev/keb/jpg-convert-usage.git
|
13
custom/nginx/default.conf
Normal file
13
custom/nginx/default.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html
|
||||||
|
error_page 404 /404.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri.html $uri/ =404;
|
||||||
|
}
|
||||||
|
}
|
@ -70,7 +70,7 @@ const config: QuartzConfig = {
|
|||||||
}),
|
}),
|
||||||
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
||||||
Plugin.Description(),
|
Plugin.Description(),
|
||||||
Plugin.Latex({ renderEngine: "katex" }),
|
// Plugin.Latex({ renderEngine: "katex" }),
|
||||||
],
|
],
|
||||||
filters: [Plugin.RemoveDrafts()],
|
filters: [Plugin.RemoveDrafts()],
|
||||||
emitters: [
|
emitters: [
|
||||||
@ -102,11 +102,11 @@ const config: QuartzConfig = {
|
|||||||
const f2Title = f2.frontmatter?.title?.toLowerCase() ?? ""
|
const f2Title = f2.frontmatter?.title?.toLowerCase() ?? ""
|
||||||
return naturalCompare(f1Title, f2Title)
|
return naturalCompare(f1Title, f2Title)
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
Plugin.TagPage(),
|
Plugin.TagPage(),
|
||||||
Plugin.ContentIndex({
|
Plugin.ContentIndex({
|
||||||
enableSiteMap: true,
|
enableSiteMap: true,
|
||||||
enableRSS: true,
|
enableRSS: false,
|
||||||
}),
|
}),
|
||||||
Plugin.Assets(),
|
Plugin.Assets(),
|
||||||
Plugin.Static(),
|
Plugin.Static(),
|
||||||
|
@ -6,15 +6,22 @@ export const sharedPageComponents: SharedLayout = {
|
|||||||
head: Component.Head(),
|
head: Component.Head(),
|
||||||
header: [],
|
header: [],
|
||||||
afterBody: [
|
afterBody: [
|
||||||
Component.Footer({
|
Component.DesktopOnly(
|
||||||
links: {
|
Component.Footer({
|
||||||
"Théo Marchal": "https://theo.marchal.dev"
|
links: {
|
||||||
}
|
"Théo Marchal": "https://theo.marchal.dev"
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
],
|
],
|
||||||
footer: Component.Flex({
|
footer:
|
||||||
components:[]
|
Component.MobileOnly(
|
||||||
}),
|
Component.Footer({
|
||||||
|
links: {
|
||||||
|
"Théo Marchal": "https://theo.marchal.dev"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
// components for pages that display a single page (e.g. a single note)
|
// components for pages that display a single page (e.g. a single note)
|
||||||
@ -29,22 +36,21 @@ export const defaultContentPageLayout: PageLayout = {
|
|||||||
|
|
||||||
left: [
|
left: [
|
||||||
Component.PageTitle(),
|
Component.PageTitle(),
|
||||||
|
|
||||||
Component.MobileOnly(Component.Spacer()),
|
|
||||||
Component.MobileOnly(Component.Flex({
|
|
||||||
components: [
|
|
||||||
{
|
|
||||||
Component: Component.Search(),
|
|
||||||
grow: true,
|
|
||||||
},
|
|
||||||
{ Component: Component.Darkmode() },
|
|
||||||
]
|
|
||||||
})),
|
|
||||||
|
|
||||||
Component.Explorer( { folderDefaultState: "open" } ),
|
Component.Explorer( { folderDefaultState: "open" } ),
|
||||||
],
|
],
|
||||||
|
|
||||||
right: [
|
right: [
|
||||||
|
|
||||||
|
Component.MobileOnly(Component.Flex({
|
||||||
|
components: [
|
||||||
|
{ Component: Component.Darkmode() },
|
||||||
|
{
|
||||||
|
Component: Component.Search(),
|
||||||
|
grow: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
})),
|
||||||
|
|
||||||
Component.DesktopOnly(Component.Darkmode()),
|
Component.DesktopOnly(Component.Darkmode()),
|
||||||
Component.DesktopOnly(Component.Search()),
|
Component.DesktopOnly(Component.Search()),
|
||||||
Component.TableOfContents(),
|
Component.TableOfContents(),
|
||||||
@ -54,7 +60,7 @@ export const defaultContentPageLayout: PageLayout = {
|
|||||||
// components for pages that display lists of pages (e.g. tags or folders)
|
// components for pages that display lists of pages (e.g. tags or folders)
|
||||||
export const defaultListPageLayout: PageLayout = {
|
export const defaultListPageLayout: PageLayout = {
|
||||||
|
|
||||||
beforeBody: [
|
beforeBody: [
|
||||||
Component.ConditionalRender({
|
Component.ConditionalRender({
|
||||||
component: Component.Breadcrumbs(),
|
component: Component.Breadcrumbs(),
|
||||||
condition: (page) => page.fileData.slug !== "index",
|
condition: (page) => page.fileData.slug !== "index",
|
||||||
@ -63,22 +69,21 @@ export const defaultListPageLayout: PageLayout = {
|
|||||||
|
|
||||||
left: [
|
left: [
|
||||||
Component.PageTitle(),
|
Component.PageTitle(),
|
||||||
|
|
||||||
Component.MobileOnly(Component.Spacer()),
|
|
||||||
Component.MobileOnly(Component.Flex({
|
|
||||||
components: [
|
|
||||||
{
|
|
||||||
Component: Component.Search(),
|
|
||||||
grow: true,
|
|
||||||
},
|
|
||||||
{ Component: Component.Darkmode() },
|
|
||||||
]
|
|
||||||
})),
|
|
||||||
|
|
||||||
Component.Explorer( { folderDefaultState: "open" } ),
|
Component.Explorer( { folderDefaultState: "open" } ),
|
||||||
],
|
],
|
||||||
|
|
||||||
right: [
|
right: [
|
||||||
|
|
||||||
|
Component.MobileOnly(Component.Flex({
|
||||||
|
components: [
|
||||||
|
{ Component: Component.Darkmode() },
|
||||||
|
{
|
||||||
|
Component: Component.Search(),
|
||||||
|
grow: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
})),
|
||||||
|
|
||||||
Component.DesktopOnly(Component.Darkmode()),
|
Component.DesktopOnly(Component.Darkmode()),
|
||||||
Component.DesktopOnly(Component.Search()),
|
Component.DesktopOnly(Component.Search()),
|
||||||
Component.TableOfContents(),
|
Component.TableOfContents(),
|
||||||
|
@ -157,6 +157,10 @@ table {
|
|||||||
margin: 1rem auto;
|
margin: 1rem auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-footer {
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
@ -188,6 +192,13 @@ table {
|
|||||||
margin-left: unset;
|
margin-left: unset;
|
||||||
margin-right: unset;
|
margin-right: unset;
|
||||||
}
|
}
|
||||||
|
@media all and ($medDesktop) {
|
||||||
|
width: 750px;
|
||||||
|
min-width: unset;
|
||||||
|
max-width: unset;
|
||||||
|
margin-left: unset;
|
||||||
|
margin-right: unset;
|
||||||
|
}
|
||||||
@media all and ($maxDesktop) {
|
@media all and ($maxDesktop) {
|
||||||
width: 950px;
|
width: 950px;
|
||||||
min-width: unset;
|
min-width: unset;
|
||||||
@ -203,6 +214,10 @@ table {
|
|||||||
padding-left: 1.5rem;
|
padding-left: 1.5rem;
|
||||||
padding-right: 1.5rem;
|
padding-right: 1.5rem;
|
||||||
}
|
}
|
||||||
|
@media all and ($desktop) {
|
||||||
|
padding-left: 1.8rem;
|
||||||
|
padding-right: 1.8rem;
|
||||||
|
}
|
||||||
@media all and ($maxDesktop) {
|
@media all and ($maxDesktop) {
|
||||||
padding-left: 3.5rem;
|
padding-left: 3.5rem;
|
||||||
padding-right: 3.5rem;
|
padding-right: 3.5rem;
|
||||||
@ -311,6 +326,7 @@ table {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
|
height: fit-content;
|
||||||
|
|
||||||
@media all and ($desktop)
|
@media all and ($desktop)
|
||||||
{
|
{
|
||||||
@ -342,7 +358,7 @@ table {
|
|||||||
height: fit-content;
|
height: fit-content;
|
||||||
min-width: fit-content;
|
min-width: fit-content;
|
||||||
max-width: 14rem;
|
max-width: 14rem;
|
||||||
flex-grow: .3;
|
flex-grow: 1;
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +378,11 @@ table {
|
|||||||
@media all and ($mobile) {
|
@media all and ($mobile) {
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
margin-top: 0;
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center hr {
|
||||||
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.darkmode {
|
.darkmode {
|
||||||
@ -370,9 +390,8 @@ table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ $breakpoints: (
|
|||||||
$mobile: "(max-width: #{map.get($breakpoints, mobile)})";
|
$mobile: "(max-width: #{map.get($breakpoints, mobile)})";
|
||||||
$tablet: "(min-width: #{map.get($breakpoints, mobile)}) and (max-width: #{map.get($breakpoints, desktop)})";
|
$tablet: "(min-width: #{map.get($breakpoints, mobile)}) and (max-width: #{map.get($breakpoints, desktop)})";
|
||||||
$desktop: "(min-width: #{map.get($breakpoints, desktop)})";
|
$desktop: "(min-width: #{map.get($breakpoints, desktop)})";
|
||||||
|
$medDesktop: "(min-width: 1420px)";
|
||||||
$maxDesktop: "(min-width: 1630px)";
|
$maxDesktop: "(min-width: 1630px)";
|
||||||
|
|
||||||
$pageWidth: #{map.get($breakpoints, mobile)};
|
$pageWidth: #{map.get($breakpoints, mobile)};
|
||||||
|
Reference in New Issue
Block a user