Skip to content

Commit d72b2e9

Browse files
committed
13.0.0: improve site and deployment, add /robots.txt and /rss.xml paths, add Nix flake
1 parent 86f28fd commit d72b2e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1215
-1530
lines changed

.envrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# 🐾 @noel/site: Noel's personal website, blog, and documentation site made with Astro
2+
# Copyright (c) 2018-2024 Noel Towa <[email protected]>
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in all
12+
# copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
# SOFTWARE.
21+
22+
if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then
23+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8="
24+
fi
25+
26+
# make .direnv if it doesn't exist
27+
mkdir -p "$(direnv_layout_dir)"
28+
29+
watch_file shell.nix
30+
watch_file flake.nix # as outputs can change at anytime
31+
watch_file flake.lock
32+
33+
# try to use flakes, if it fails use normal nix (ie. shell.nix)
34+
use flake || use nix
35+
eval "$shellHook"

.eslintrc.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/ESLint.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 🐾 @noel/site: Noel's personal website, blog, and documentation site made with Astro
2-
# Copyright (c) 2018-2023 Noel Towa <[email protected]>
2+
# Copyright (c) 2018-2024 Noel Towa <[email protected]>
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal
@@ -54,17 +54,14 @@ jobs:
5454
- name: Checkout the repository
5555
uses: actions/checkout@v4
5656

57-
- name: Uses Node.js 20.x
58-
uses: actions/setup-node@v4
59-
with:
60-
node-version: 20.x
61-
62-
- name: Setup Yarn and node-modules cache
63-
id: yarn-cache
64-
uses: auguwu/[email protected]
57+
- name: Setup Bun
58+
uses: oven-sh/setup-bun@v1
6559

6660
- name: Install dependencies
67-
run: yarn install --immutable
61+
run: bun install
62+
63+
- name: Format project
64+
run: bun fmt
6865

69-
- name: Lint project with ESLint
70-
run: yarn lint
66+
- name: Lint with ESLint
67+
run: bun lint

.github/workflows/Publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 🐾 @noel/site: Noel's personal website, blog, and documentation site made with Astro
2-
# Copyright (c) 2018-2023 Noel Towa <[email protected]>
2+
# Copyright (c) 2018-2024 Noel Towa <[email protected]>
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -652,8 +652,4 @@ FodyWeavers.xsd
652652
# Additional files built by Visual Studio
653653

654654
.astro/
655-
.vercel/
656-
server/.yarn/*.gz
657-
server/.yarn/cache/
658-
.yarn/cache/
659-
!.yarn/releases/
655+
.direnv/

.vscode/settings.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
22
"editor.tabSize": 4,
3+
"editor.formatOnSave": true,
4+
"editor.formatOnPaste": true,
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"eslint.experimental.useFlatConfig": true,
7+
"eslint.validate": ["javascript", "typescript", "astro"],
38
"css.lint.unknownAtRules": "ignore",
4-
"[typescript]": {
5-
"editor.defaultFormatter": "esbenp.prettier-vscode"
9+
"editor.codeActionsOnSave": {
10+
"source.fixAll.eslint": true
11+
},
12+
"[astro]": {
13+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
614
}
715
}

.yarn/releases/yarn-4.1.0.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 🐾 @noel/site: Noel's personal website, blog, and documentation site made with Astro
2-
# Copyright (c) 2018-2023 Noel Towa <[email protected]>
2+
# Copyright (c) 2018-2024 Noel Towa <[email protected]>
33
#
44
# Permission is hereby granted, free of charge, to any person obtaining a copy
55
# of this software and associated documentation files (the "Software"), to deal
@@ -19,24 +19,22 @@
1919
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
# SOFTWARE.
2121

22-
FROM node:20.11.0-alpine3.18 AS build
22+
FROM oven/bun:1.0-alpine AS build
2323

24-
RUN apk update && apk add --no-cache git ca-certificates
24+
RUN apk update
2525
WORKDIR /build
2626

27-
COPY .yarn /build/.yarn
2827
COPY package.json .
29-
COPY .yarnrc.yml .
30-
COPY yarn.lock .
28+
COPY bun.lockb .
3129

32-
RUN yarn install --immutable
30+
RUN bun install --frozen-lockfile
3331

3432
COPY . .
35-
RUN yarn build
33+
RUN bun run build
3634

37-
FROM node:20.11.0-alpine3.18
35+
FROM oven/bun:1.0-alpine
3836

39-
RUN apk update && apk add --no-cache ca-certificates bash tini curl
37+
RUN apk update && apk add --no-cache bash tini curl
4038
WORKDIR /app/noel/site
4139

4240
COPY --from=build /build/node_modules /app/noel/site/node_modules
@@ -46,8 +44,8 @@ RUN addgroup -g 1001 noel && \
4644
adduser -DSH -u 1001 -G noel noel && \
4745
chown -R noel:noel /app/noel/site
4846

49-
EXPOSE 3000
47+
EXPOSE 4321
5048

5149
USER noel
5250
ENTRYPOINT ["tini", "-s"]
53-
CMD ["node", "dist/server/entry.mjs"]
51+
CMD ["bun", "dist/server/entry.mjs"]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT LICENSE
22

3-
Copyright (c) 2018-2023 Noel Towa <[email protected]>
3+
Copyright (c) 2018-2024 Noel Towa <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)