move to config.yaml file again
This commit is contained in:
parent
f60c79e94c
commit
dc69dec8de
8 changed files with 24 additions and 23 deletions
|
@ -1,4 +1,3 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
dist
|
||||
config*
|
||||
dist
|
11
Dockerfile
11
Dockerfile
|
@ -2,6 +2,7 @@ FROM node:lts AS base
|
|||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
COPY config.yaml ./
|
||||
|
||||
FROM base AS prod-deps
|
||||
RUN npm ci --omit=dev
|
||||
|
@ -13,20 +14,12 @@ FROM build-deps AS build
|
|||
|
||||
COPY . .
|
||||
|
||||
ARG POCKETBASE_URL
|
||||
ENV POCKETBASE_URL="${POCKETBASE_URL}"
|
||||
ARG PUBLIC_DESCRIPTION
|
||||
ENV PUBLIC_DESCRIPTION="${PUBLIC_DESCRIPTION}"
|
||||
ARG PUBLIC_TITLE
|
||||
ENV PUBLIC_TITLE="${PUBLIC_TITLE}"
|
||||
ARG PUBLIC_USEICONS
|
||||
ENV PUBLIC_USEICONS="${PUBLIC_USEICONS}"
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM base AS runtime
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/config.yaml ./config.yaml
|
||||
|
||||
ARG PORT=4321
|
||||
ENV HOST=0.0.0.0
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { Image } from "astro:assets";
|
||||
import Social from "./Social.astro";
|
||||
import pb from "../lib/pb";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
const avatarRec = await pb
|
||||
.collection("images")
|
||||
|
@ -13,8 +14,8 @@ const socials = await pb.collection("socials").getFullList();
|
|||
const config = {
|
||||
// icon,
|
||||
socials,
|
||||
title: import.meta.env.PUBLIC_TITLE,
|
||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
||||
title: c.title,
|
||||
description: c.description,
|
||||
};
|
||||
---
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
import { Image } from "astro:assets";
|
||||
import Social from "./Social.astro";
|
||||
import pb from "../lib/pb";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
|
||||
const avatarRec = await pb
|
||||
.collection("images")
|
||||
|
@ -12,15 +14,15 @@ const socials = await pb.collection("socials").getFullList();
|
|||
const config = {
|
||||
icon,
|
||||
socials,
|
||||
title: import.meta.env.PUBLIC_TITLE,
|
||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
||||
title: c.title,
|
||||
description: c.description,
|
||||
};
|
||||
---
|
||||
|
||||
<aside>
|
||||
<div class="p-4">
|
||||
<a href="/">
|
||||
<!-- {
|
||||
{
|
||||
config.icon && (
|
||||
<Image
|
||||
class={"icon"}
|
||||
|
@ -30,7 +32,7 @@ const config = {
|
|||
height={50}
|
||||
/>
|
||||
)
|
||||
} -->
|
||||
}
|
||||
<h1 class="font-bold text-2xl pt-4">{config.title}</h1></a
|
||||
>
|
||||
<p class="pt-4">{config.description}</p>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
import { Boolify } from "../lib/boolify";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
const { href, text, icon } = Astro.props;
|
||||
const useIcons = Boolify(import.meta.env.PUBLIC_USEICONS);
|
||||
const useIcons = Boolify(c.useIcons);
|
||||
---
|
||||
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import Sidebar from "../components/Sidebar.astro";
|
||||
|
||||
import pb from "../lib/pb";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
const avatarRec = await pb
|
||||
.collection("images")
|
||||
|
@ -20,8 +21,8 @@ const config = {
|
|||
icon,
|
||||
socials,
|
||||
background,
|
||||
title: import.meta.env.PUBLIC_TITLE,
|
||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
||||
title: c.title,
|
||||
description: c.description,
|
||||
};
|
||||
|
||||
export const prerender = false;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import Lightbox from "../components/Lightbox.astro";
|
||||
import Sidebar from "../components/Sidebar.astro";
|
||||
import pb from "../lib/pb";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
|
@ -20,8 +21,8 @@ const config = {
|
|||
icon,
|
||||
socials,
|
||||
background,
|
||||
title: import.meta.env.PUBLIC_TITLE,
|
||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
||||
title: c.title,
|
||||
description: c.description,
|
||||
};
|
||||
---
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
import pb from "../lib/pb";
|
||||
import c from "../../config.yaml";
|
||||
|
||||
export const prerender = false
|
||||
const backgroundRec = await pb.collection('images').getFirstListItem('useAsBackground=true').catch(() => null);
|
||||
const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgroundRec.file) : null;
|
||||
|
@ -15,7 +17,7 @@ const background = backgroundRec ? await pb.files.getUrl(backgroundRec, backgrou
|
|||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>{import.meta.env.PUBLIC_TITLE}</title>
|
||||
<title>{c.title}</title>
|
||||
</head>
|
||||
<body>
|
||||
<slot />
|
||||
|
|
Loading…
Add table
Reference in a new issue