Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ pnpm-debug.log*

# jetbrains setting folder
.idea/
md/

src/content/md/
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ COPY package*.json bun.lockb ./
RUN bun install
COPY . .

RUN bun astro telemetry disable

ENTRYPOINT ["/app/entrypoint.sh"]
12 changes: 9 additions & 3 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import { defineConfig, sharpImageService } from 'astro/config';
import mdx from '@astrojs/mdx';
import tailwind from "@astrojs/tailwind";
import astroRehypeRelativeMarkdownLinks from 'astro-rehype-relative-markdown-links';
import { remarkFixIndex } from './plugins/remarkFixIndex.mjs';

// https://astro.build/config
export default defineConfig({
integrations: [tailwind({
applyBaseStyles: false
})],
integrations: [
mdx({
optimize: true
}),
tailwind({
applyBaseStyles: false
})
],
image: {
service: sharpImageService(),
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
5 changes: 3 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
services:
markdown_viewer:
platform: "linux/amd64"
build:
context: .
restart: "no"
environment:
TITLE: "Markdown Viewer"
volumes:
- ./md:/app/src/content/md:ro
- ./public/favicon.svg:/app/public/favicon.svg
- ./src/content/md/:/app/src/content/md:ro
ports:
- "8080:80"
platform: "linux/amd64"
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
bun run build && /static-web-server --index-files="index.html" --root /app/dist
bun run build && /static-web-server --index-files="index.html" --page404="404.html" --root /app/dist
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/mdx": "^3.1.8",
"@astrojs/tailwind": "^5.1.0",
"@tailwindcss/typography": "^0.5.14",
"@types/node": "^22.5.0",
"astro": "^4.14.5",
"astro": "^4.16.6",
"astro-rehype-relative-markdown-links": "^0.15.0",
"sharp": "^0.33.5",
"tailwindcss": "^3.4.10"
Expand Down