Repository navigation
#1 Migrate to Deno #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1924dc6
add AGENTS.md / update .gitignore
SebinSong d68ae74
replace package.json with deno.json
SebinSong 0fbdbe1
upgrade Astro to latest
SebinSong 715670c
comment polishing
SebinSong 88314e6
revert back the experimental permissions config
SebinSong 92d3ca9
Update README.md
SebinSong ccc87ca
UI fix in the /tag page
SebinSong eee5bbf
updates per review
SebinSong 0a143d5
updates per feedback
SebinSong f37c5e5
update per feedback
SebinSong 14d9a19
update in .gitignore
SebinSong c4e27f0
merge the main in
SebinSong 1d1d817
remove pull-review.yml (deleted on main)
SebinSong 004a89d
update per CRs
SebinSong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # AGENTS.md | ||
|
|
||
| This file provides guidance to AI coding agents when working with code in this repository. | ||
|
|
||
| ## Project | ||
|
|
||
| Static site for the okTurtles Podcast (https://podcast.okturtles.org/), built with Astro 7, Vue 3 islands and SCSS. The site's main outputs are the episode pages and the podcast RSS feed at `/rss.xml`. | ||
|
|
||
| ## Commands | ||
|
|
||
| ```sh | ||
| deno install # install dependencies into node_modules/ (after cloning or changing deno.json) | ||
| deno task dev # dev server | ||
| deno task build # static build into dist/ | ||
| deno task preview # serve the built dist/``` | ||
| ``` | ||
|
|
||
| There is no lint, type-check or test script. `deno task build` is the only automated check; after touching the feed, inspect `dist/rss.xml` (the README lists external feed validators). | ||
|
|
||
| - The project runs on Deno 2.7.0 or newer, with no `package.json`. Dependencies are npm packages pinned to exact versions in the `imports` map of `deno.json`. | ||
| - Tasks run Astro with the `--allow-*` flags in `deno.json` rather than `--allow-all`. Writes are limited to the project folder and network access to localhost. `--allow-run` and `--allow-ffi` are required by the build tools and are not restricted. | ||
| - The `ASTRO_TELEMETRY_DISABLED` variable (all tasks) and the `ASTRO_DISABLE_UPDATE_CHECK` variable (`dev` only) are required: without them Astro attempts things the permissions do not allow. | ||
| - The `noExternal` and `alias` settings under `vite.resolve` in `astro.config.mjs` are required for the build. | ||
| - Episode MP3s are stored in Git LFS. | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Episodes are Markdown pages | ||
|
|
||
| Each episode is `src/pages/episodes/<n>.md`, routed by Astro's file-based routing and rendered through `src/layouts/EpisodePageLayout.astro` (set via the `layout` frontmatter key). There is no content collection; the frontmatter is the single source of truth for the page, the episode lists, the tag pages and the RSS feed. Its shape is the `Episode` interface in `src/types.ts`. | ||
|
|
||
| Adding an episode means adding: | ||
|
|
||
| 1. `src/pages/episodes/<n>.md` with the full frontmatter (copy the latest episode) | ||
| 2. `public/media/audios/episodes/<n>.mp3` (LFS) | ||
| 3. `public/images/episode-covers/ep<n>.jpg` (`coverImage` is the bare filename; the directory is prepended in code) | ||
|
|
||
| Frontmatter fields that feed the RSS `<enclosure>` and `<guid>` must be accurate: `filesize` is the MP3 size in bytes, `filetype` its MIME type, `duration` is `HH:MM:SS` (or `MM:SS`), and `guid` is a unique UUID that must not change once published. `episode` (number) is the sort key everywhere. | ||
|
|
||
| ### Episode data access | ||
|
|
||
| `getAllEpisodes()` in `src/helpers.ts` loads all episodes with `import.meta.glob('./pages/episodes/*.{md,mdx}', { eager: true })` and attaches `details` (frontmatter + compiled HTML as `epContent`). Tag helpers there derive everything from episode `tags`; there is no separate tag registry. Tag URLs replace whitespace with underscores (`getTagLink` / `whiteSpaceToUnderscore`), and `src/pages/tag/[tag].astro` must use the same transform in `getStaticPaths`. | ||
|
|
||
| `EpisodeList.vue` is hydrated with `client:load` and calls `getAllEpisodes()` itself when no `episodeList` prop is passed, so that helper also runs in the client bundle. | ||
|
|
||
| ### RSS feed | ||
|
|
||
| `src/pages/rss.xml.js` builds the feed XML by hand using the string helpers in `src/utils/rss-generation.ts` (not `@astrojs/rss`), following Apple Podcasts requirements and the PSP-1 spec linked in the source comments. Channel-level metadata comes from `src/constants.ts`; `SITE_URL` there is also used as Astro's `site` in `astro.config.mjs`. `generateXMLTag` escapes content unless it contains a CDATA block or `noEscape` is passed. Each item carries the post as sanitized HTML (`content:encoded`, `itunes:summary`) and as plain text (`description`). | ||
|
|
||
| ### Layout and client-side pieces | ||
|
|
||
| - `PageLayout.astro` wraps every page (`BaseHead`, `Header`, `Footer`). It takes `pageType` (`'default' | 'episode'`), which sets the `is-<pageType>` body class and the header variant, and puts the episode number on `<body data-episode>`, which `HeaderButtons.vue` reads on the client. | ||
| - Plyr is not an npm dependency. `EpisodePageLayout.astro` injects `public/third-party/plyr.3.7.8.min.js` as an inline script through the `head-append` slot, and `AudioPlayer.vue` uses the global `Plyr`. A `?play` query parameter on an episode URL triggers autoplay. | ||
| - Cross-island state uses nanostores (`src/store/toast.ts`, consumed via `@nanostores/vue`). | ||
|
|
||
| ### Styles | ||
|
|
||
| Global styles are loaded once via `src/styles/main.scss` (imported in `BaseHead.astro`). Component `<style lang="scss">` blocks pull in variables, colors and mixins with `@use '@/styles/variables' as *;` (e.g. the `from($tablet)` breakpoint mixin). Class naming: `c-` for component-scoped classes, `l-` for layout, `is-` for state modifiers. `@/` aliases `src/` (`tsconfig.json`, plus the Vite alias in `astro.config.mjs`). | ||
|
|
||
| ## CI | ||
|
|
||
| The only workflows (`.github/workflows/pull-review*.yml`) run an AI PR review when a member, owner or collaborator comments `/review` on a pull request. Nothing builds or deploys from CI. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "nodeModulesDir": "auto", | ||
| "minimumDependencyAge": "P14D", | ||
| "tasks": { | ||
| "dev": "ASTRO_TELEMETRY_DISABLED=1 ASTRO_DISABLE_UPDATE_CHECK=true deno run --allow-read --allow-write=. --allow-env --allow-sys --allow-ffi --allow-run --allow-net=localhost,127.0.0.1,0.0.0.0,[::] astro dev", | ||
| "build": "ASTRO_TELEMETRY_DISABLED=1 deno run --allow-read --allow-write=. --allow-env --allow-sys --allow-ffi --allow-run --allow-net=localhost,127.0.0.1 astro build", | ||
| "preview": "ASTRO_TELEMETRY_DISABLED=1 deno run --allow-read --allow-write=. --allow-env --allow-sys --allow-ffi --allow-run --allow-net=localhost,127.0.0.1,0.0.0.0,[::] astro preview" | ||
| }, | ||
| "imports": { | ||
| "@astrojs/mdx": "npm:@astrojs/mdx@8.0.2", | ||
| "@astrojs/vue": "npm:@astrojs/vue@7.0.3", | ||
| "@nanostores/vue": "npm:@nanostores/vue@1.0.1", | ||
| "astro": "npm:astro@7.3.5", | ||
| "nanostores": "npm:nanostores@1.0.1", | ||
| "remove-markdown": "npm:remove-markdown@0.6.2", | ||
| "sanitize-html": "npm:sanitize-html@2.17.0", | ||
| "sass": "npm:sass@1.89.2", | ||
| "vue": "npm:vue@3.5.43" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this project doesn't have
AGENTS.mdyet, so created one using/initcommand in Claude Code. But please feel free to rewrite/amend this in the future if needed.