Skip to content

Commit 236f75f

Browse files
committed
feat: last modifier date for handbook pages
1 parent ccb5669 commit 236f75f

25 files changed

+521
-980
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# build output
22
dist/
33

4+
# Bun
5+
bun.lockb
6+
.bun/
7+
48
# generated types
59
.astro/
610

@@ -45,3 +49,6 @@ Dockerfile.bak
4549

4650
# Cache files
4751
.cache/
52+
53+
# others
54+
bunfig.toml

Dockerfile

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,35 @@
11
FROM node:24.11.1-alpine3.22 AS base
22
WORKDIR /app
3-
43
ENV ASTRO_TELEMETRY_DISABLED=true
5-
6-
FROM base AS development
7-
8-
ENV NODE_ENV=development
9-
ENV HOST=0.0.0.0
10-
ENV PORT=4321
11-
4+
RUN apk update && \
5+
apk add --no-cache git
126
COPY package*.json ./
13-
COPY ./.kube/config.yaml ./.kube/config.yaml
14-
RUN --mount=type=cache,target=/root/.npm npm install
15-
COPY . .
16-
RUN chmod -R 755 src/pages
17-
18-
EXPOSE 4321
19-
CMD ["npm", "run", "dev", "--", "--host", "--allowed-hosts=website.staging.env.datum.net"]
207

218
FROM base AS build
22-
239
ENV NODE_ENV=production
24-
ENV HOST=0.0.0.0
25-
ENV PORT=4321
26-
27-
COPY package*.json ./
2810
COPY ./.kube/config.yaml ./.kube/config.yaml
2911
RUN --mount=type=cache,target=/root/.npm npm install --ignore-scripts
3012
COPY . .
3113
RUN chmod -R 755 src/pages
32-
3314
RUN npm run build
3415

35-
FROM node:24.11.1-alpine3.22 AS production
16+
FROM base AS development
17+
ENV NODE_ENV=development
18+
COPY ./.kube/config.yaml ./.kube/config.yaml
19+
RUN --mount=type=cache,target=/root/.npm npm install
20+
COPY . .
21+
RUN chmod -R 755 src/pages
22+
CMD ["npm", "run", "dev", "--", "--host", "--allowed-hosts=website.staging.env.datum.net"]
3623

24+
FROM node:24.11.1-alpine3.22 AS production
3725
ENV NODE_ENV=production
38-
ENV HOST=0.0.0.0
39-
ENV PORT=4321
40-
41-
WORKDIR /app
42-
4326
COPY --from=build /app/dist ./dist
4427
COPY --from=build /app/package*.json ./
45-
COPY --from=build /app/.kube/config.yaml ./.kube/config.yaml
4628
RUN --mount=type=cache,target=/root/.npm npm install --omit=dev --ignore-scripts
4729
COPY --from=build /app/src/pages ./src/pages
4830
RUN chmod -R 755 src/pages
4931

32+
ENV HOST=0.0.0.0
33+
ENV PORT=4321
5034
EXPOSE 4321
5135
CMD ["node", "./dist/server/entry.mjs"]

astro.config.mjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-check
21
import { defineConfig } from 'astro/config';
32
import robotsTxt from 'astro-robots-txt';
43
import tailwindcss from '@tailwindcss/vite';
@@ -10,9 +9,10 @@ import node from '@astrojs/node';
109

1110
import playformCompress from '@playform/compress';
1211

13-
import glossary from './src/libs/integration/glossary.ts';
14-
import sitemap from './src/libs/integration/sitemap.ts';
15-
import announcement from './src/libs/integration/announcement.ts';
12+
import glossary from './src/plugins/glossary.js';
13+
import sitemap from './src/plugins/sitemap.js';
14+
import announcement from './src/plugins/announcement.ts';
15+
import { remarkModifiedTime } from './src/plugins/remarkModifiedTime.mjs';
1616

1717
const env = loadEnv(process.env.NODE_ENV || 'development', process.cwd(), '');
1818

@@ -27,6 +27,9 @@ export default defineConfig({
2727
adapter: node({
2828
mode: 'standalone',
2929
}),
30+
markdown: {
31+
remarkPlugins: [remarkModifiedTime],
32+
},
3033
image: {
3134
layout: 'constrained',
3235
},
@@ -188,9 +191,7 @@ export default defineConfig({
188191
SVG: true,
189192
}),
190193
],
191-
192194
vite: {
193-
// @ts-expect-error - Tailwind Vite plugin type mismatch with Vite's expected plugin types
194195
plugins: [tailwindcss()],
195196
css: {
196197
devSourcemap: true,
@@ -199,10 +200,8 @@ export default defineConfig({
199200
noExternal: ['zod'],
200201
},
201202
},
202-
203203
experimental: {},
204204
prefetch: true,
205-
206205
redirects: {
207206
'/product': '/features/',
208207
'/feature/': '/features/',

0 commit comments

Comments
 (0)