Compare commits
10 Commits
c753026393
...
031beba8ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
031beba8ac | ||
|
|
044007d495 | ||
|
|
dc095af8c4 | ||
|
|
b8ec3dcff7 | ||
|
|
838082d00b | ||
|
|
c42600c570 | ||
|
|
2e9487d61f | ||
|
|
fef0ac8abf | ||
|
|
577e10a9d3 | ||
|
|
975f6dc46b |
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
FROM node:22-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||||
|
|
||||||
|
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||||
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
RUN pnpm run build
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
[build]
|
[build]
|
||||||
publish = "dist"
|
publish = "dist"
|
||||||
command = "npm run build"
|
command = "pnpm run build"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
NODE_VERSION = "16"
|
NODE_VERSION = "22"
|
||||||
|
|
||||||
[[headers]]
|
[[headers]]
|
||||||
for = "/.well-known/*"
|
for = "/.well-known/*"
|
||||||
|
|||||||
27
nginx.conf
Normal file
27
nginx.conf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri.html $uri/index.html $uri/index.htm $uri/ =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /.well-known/ {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, OPTIONS";
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 404 /404.html;
|
||||||
|
location = /404.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
internal;
|
||||||
|
}
|
||||||
|
}
|
||||||
34
package.json
34
package.json
@@ -12,23 +12,27 @@
|
|||||||
"node": ">= 22.0.0"
|
"node": ">= 22.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@islands/headings": "^0.10.0-beta.1",
|
"@islands/headings": "^0.10.0",
|
||||||
"@islands/prism": "^0.10.0-beta.1",
|
"@islands/prism": "^0.10.0",
|
||||||
"@islands/pwa": "^0.10.0-beta.1",
|
"@islands/pwa": "^0.10.0",
|
||||||
"baseline-browser-mapping": "^2.10.0",
|
"baseline-browser-mapping": "^2.10.27",
|
||||||
"iles": "^0.10.0-beta.1",
|
"iles": "^0.10.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.3",
|
||||||
"sass": "^1.97.3",
|
"sass": "^1.99.0",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^6.0.3",
|
||||||
"vitest": "^4.0.18",
|
"vitest": "^4.1.5",
|
||||||
"vue": "^3.5.29",
|
"vue": "^3.5.33",
|
||||||
"vue-tsc": "^3.2.5"
|
"vue-tsc": "^3.2.7",
|
||||||
|
"vite": "^7.3.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@atproto/api": "^0.19.0",
|
"@atproto/api": "^0.19.11",
|
||||||
|
"@islands/feed": "^0.10.0",
|
||||||
"chart.xkcd": "^1.1.15",
|
"chart.xkcd": "^1.1.15",
|
||||||
"marked": "^17.0.3",
|
"marked": "^18.0.3",
|
||||||
"nanoid": "^5.1.6",
|
"md4x": "^0.0.25",
|
||||||
|
"nanoid": "^5.1.11",
|
||||||
"pinia": "^3.0.4"
|
"pinia": "^3.0.4"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.33.2"
|
||||||
}
|
}
|
||||||
|
|||||||
3666
pnpm-lock.yaml
generated
3666
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ const notes = await fetchNotes()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="blog-notes">
|
<div class="blog-notes" v-if="notes.length > 0">
|
||||||
<h2>Last notes</h2>
|
<h2>Last notes</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="note in notes" :key="note.href">
|
<li v-for="note in notes" :key="note.href">
|
||||||
|
|||||||
34
src/pages/feed.vue
Normal file
34
src/pages/feed.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<page>
|
||||||
|
path: /feed.rss
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import RenderFeed from "@islands/feed"
|
||||||
|
import type { FeedOptions, FeedItem } from "@islands/feed"
|
||||||
|
import { fetchNotes } from "~/api/fetch-notes"
|
||||||
|
|
||||||
|
const url = "https://apoena.dev"
|
||||||
|
|
||||||
|
const options: FeedOptions = {
|
||||||
|
title: "Apoena's distracted mind",
|
||||||
|
description: "Where I write about what I read.",
|
||||||
|
id: url,
|
||||||
|
link: url,
|
||||||
|
language: "en",
|
||||||
|
image: "https://apoena.dev/pwa-512x512.png",
|
||||||
|
copyright: "No copyright, just don't forget me",
|
||||||
|
}
|
||||||
|
|
||||||
|
const notes = await fetchNotes()
|
||||||
|
|
||||||
|
const items = notes.map<FeedItem>((note) => ({
|
||||||
|
link: note.canonicalUrl,
|
||||||
|
date: new Date(note.publishedAt),
|
||||||
|
title: note.title,
|
||||||
|
content: note,
|
||||||
|
}))
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<RenderFeed format="feed" :options="options" :items="items" />
|
||||||
|
</template>
|
||||||
@@ -18,11 +18,14 @@ export default definePageComponent({
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Note } from "~/api/note.type"
|
import type { Note } from "~/api/note.type"
|
||||||
import { marked } from "marked"
|
import { renderToHtml } from "md4x"
|
||||||
import { computed } from "vue"
|
|
||||||
|
|
||||||
const props = defineProps<{ note: Note }>()
|
const props = defineProps<{ note: Note }>()
|
||||||
const textContent = computed(() => marked.parse(props.note.textContent))
|
const textContent = renderToHtml(props.note.textContent)
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: props.note.title,
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"],
|
||||||
|
"~/*": ["./src/*"]
|
||||||
},
|
},
|
||||||
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
"lib": ["esnext", "dom", "dom.iterable", "scripthost"],
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
|
|||||||
Reference in New Issue
Block a user