Commit Graph

889 Commits

Author SHA1 Message Date
Qihan dd163c47dd Update index.astro 2026-06-13 17:07:30 +08:00
Qihan 5fca8b46cb Rename zh.ts to en.ts 2026-06-13 16:49:16 +08:00
Qihan 9ccfe889b4 Delete src/i18n/lang/en.ts 2026-06-13 16:47:59 +08:00
Qihan 4e4d537ac3 Create zh.ts 2026-06-13 16:44:34 +08:00
Qihan 5f94fff0c8 Update Footer.astro 2026-06-13 16:37:42 +08:00
Qihan 9a13d54964 Update Footer.astro 2026-06-13 16:33:30 +08:00
Qihan abb9ded945 Delete src/content/posts directory 2026-06-13 16:30:25 +08:00
Qihan c010909e2a Update Footer.astro 2026-06-13 16:29:12 +08:00
Qihan acc334b648 Create 你好,世界.md 2026-06-13 15:45:58 +08:00
Qihan c5883a6db3 Delete src/content/posta 2026-06-13 15:44:10 +08:00
Qihan fc3526a8aa Create posta 2026-06-13 15:43:57 +08:00
Qihan 51b63ebfa1 Delete src/content/posts/_color-schemes directory 2026-06-13 15:43:06 +08:00
Qihan c8cb70a758 Delete src/content/posts/_releases directory 2026-06-13 15:42:54 +08:00
Qihan 79ebd6437c Delete src/content/posts/examples/terminal-development.md 2026-06-13 15:41:57 +08:00
Qihan f74f7f40fc Delete src/content/posts/examples/tailwind-typography.md 2026-06-13 15:41:50 +08:00
Qihan b05c8859b5 Delete src/content/posts/examples/portfolio-website-development.md 2026-06-13 15:41:41 +08:00
Qihan 28094127d7 Delete src/content/posts/examples/example-draft-post.md 2026-06-13 15:41:12 +08:00
Qihan a2a966fe74 Delete src/content/posts/setting-dates-via-git-hooks.md 2026-06-13 15:36:28 +08:00
Qihan 5af2d074c3 Delete src/content/posts/how-to-update-dependencies.md 2026-06-13 15:36:20 +08:00
Qihan 91ece26a4c Delete src/content/posts/how-to-integrate-giscus-comments.md 2026-06-13 15:36:11 +08:00
Qihan 9fae94b2ed Delete src/content/posts/how-to-configure-astropaper-theme.mdx 2026-06-13 15:35:36 +08:00
Qihan dd27de2aff Delete src/content/posts/how-to-add-latex-equations-in-blog-posts.md 2026-06-13 15:35:28 +08:00
Qihan 859e945f36 Delete src/content/posts/dynamic-og-images.md 2026-06-13 15:35:19 +08:00
Qihan 8f076aaf89 Delete src/content/posts/customizing-astropaper-theme-color-schemes.mdx 2026-06-13 15:35:08 +08:00
Qihan f108517889 Delete src/content/posts/adding-new-post.mdx 2026-06-13 15:34:57 +08:00
Qihan a00de7ee87 Update about.md 2026-06-13 15:27:17 +08:00
Qihan ace2c32c54 Update about.md 2026-06-13 15:24:12 +08:00
Qihan b57caa3637 Update about.md 2026-06-13 15:23:59 +08:00
satnaing 4c33a60529 bump: version 6.0.0 → 6.1.0 2026-06-06 15:50:50 +07:00
Sat Naing e0506cb41e feat: add callout support (#655)
* feat: toggle .dark class on theme change

* feat: add callouts with rehype-callouts plugin

* docs: update blog posts with callouts
2026-06-06 09:09:08 +07:00
kOaDT 98f15ee3bc feat: add accessible image lightbox for post images (#654)
* feat: add accessible image lightbox for post images

* fix: iOS scroll lock, backdrop blur, dvh image sizing for lightbox

* feat: add vanilla pinch-to-zoom to image lightbox

* fix: improve touch event handling and scaling logic in image lightbox

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2026-06-06 09:08:21 +07:00
Sat Naing 38c4f39fde chore: add recommended VSCode extensions for AstroPaper (#653) 2026-06-03 08:46:32 +07:00
せいはな 470bfb528e fix: sanitize post title for valid CSS view-transition-name (#650) 2026-06-02 22:05:23 +07:00
cfresco-fb e062c79248 fix: iterate all weight matches in getFontPathByWeight (#645)
* fix: iterate all weight matches in getFontPathByWeight

When fontData has multiple entries for the same weight with different format sets, Array.find() stops at the first match even if that entry does not contain the requested format. The fix uses a for...of loop that returns only when both weight AND format match. 

* fix: add fallback to first src entry and trailing newline

- Use `?? font.src[0]` as fallback when no src entry matches the
  requested format, as suggested in code review
- Add missing trailing newline at end of file

Fixes #644
2026-06-02 21:47:12 +07:00
Sat Naing ca42b6b218 build(deps): bump astro and other dependencies (#651)
* build(deps): bump astro and its related dependencies

* build(deps): bump dependencies to latest versions
2026-06-02 08:22:00 +07:00
Erison Silva 1329c6082d build: use pnpm official Docker image and update CI/Docker setup (#639)
- Replace docker-compose.yml (node:lts) with compose.yaml (ghcr.io/pnpm/pnpm:11.3.0)
  - Bump pnpm to 11.3.0 and add --frozen-lockfile in CI
  - Add pnpm-workspace.yaml to allow esbuild and sharp builds
  - Update .gitignore for pnpm store and compose override file
2026-05-29 20:48:05 +07:00
Orancat 68b452289a fix: update incorrect RSS link (#649) 2026-05-29 08:54:17 +07:00
dependabot[bot] 3dd4bd54da build(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 (#643)
Bumps [fast-xml-builder](https://github.com/NaturalIntelligence/fast-xml-builder) from 1.1.5 to 1.2.0.
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-builder/blob/main/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-builder/compare/v1.1.5...v1.2.0)

---
updated-dependencies:
- dependency-name: fast-xml-builder
  dependency-version: 1.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-22 18:23:38 +07:00
dependabot[bot] a4e3b84318 build(deps): bump devalue from 5.7.1 to 5.8.1 (#638)
Bumps [devalue](https://github.com/sveltejs/devalue) from 5.7.1 to 5.8.1.
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.7.1...v5.8.1)

---
updated-dependencies:
- dependency-name: devalue
  dependency-version: 5.8.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-22 18:15:38 +07:00
dependabot[bot] 7b1ce430dc build(deps): bump fast-uri from 3.1.0 to 3.1.2 (#642)
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.0 to 3.1.2.
- [Release notes](https://github.com/fastify/fast-uri/releases)
- [Commits](https://github.com/fastify/fast-uri/compare/v3.1.0...v3.1.2)

---
updated-dependencies:
- dependency-name: fast-uri
  dependency-version: 3.1.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 10:13:53 +07:00
Sat Naing f0b644de3a feat!: AstroPaper v6 (#631)
* feat: add initial configuration and social icons for AstroPaper theme

* feat: add theme styles and design tokens

* chore: configure Astro with sitemap, i18n, fonts, and tooling

- Set site URL, i18n (single locale, no prefix), sitemap integration
- Add Google Sans Code font via stable fonts API
- Configure Shiki dual-theme markdown (min-light / night-owl)
- Fix astro-paper.config.ts to use relative import (alias not
  available when Vite loads root-level config files)
- Add @astrojs/sitemap and @typescript-eslint/parser dependencies
- Wire @typescript-eslint/parser into ESLint so TypeScript syntax
  in Astro frontmatter (type Props, etc.) parses correctly

* feat: add base styles, dark variant, and typography

- global.css: dark variant via [data-theme], base layer for * / a /
  button selectors, scrollbar tokens, layout utilities (max-w-app,
  app-layout), active-nav as @utility for Tailwind variant support
- html and body classes moved directly onto elements in BaseLayout
  (Tailwind-native approach) so only truly global selectors remain here
- typography.css: prose overrides, Shiki light/dark code block
  switching, diff/highlight/word-highlight transformer styles

* feat: add i18n types, English strings, and useTranslations helper

Plain typed object approach — no third-party i18n library needed.
Paraglide.js was considered but requires SSR output (hard blocker
for a static Astro site).

- UIStrings interface with nav, post, pagination, and a11y groups
- en.ts with `satisfies UIStrings` for literal-type preservation
- useTranslations(locale) helper falls back to English automatically

Adding a new language is a one-file addition; full routing stays
as a registry add-on.

* feat: add client-side theme toggle script

- Reads window.__theme.value set by the inline FOUC-prevention script
  to avoid re-detecting the theme on first load
- Toggles data-theme on <html> and persists to localStorage
- Fills <meta name="theme-color"> with the computed background colour
  so Android's browser chrome matches the page
- Re-runs setup on astro:after-swap for View Transitions navigation
- Carries theme-color across astro:before-swap to prevent navbar
  flicker on Android during page transitions
- Syncs with OS prefers-color-scheme changes at runtime

* feat: add BaseLayout and PostLayout

BaseLayout (replaces scaffold Layout.astro):
- Font, canonical URL via Astro.site, RSS autodiscovery
- FOUC-prevention inline script sets data-theme before first paint
  and exposes window.__theme.value for theme.ts to reuse
- html/body classes on elements directly (Tailwind-native)
- <slot name="head"> for child layout injection
- ClientRouter for View Transitions (respects lightAndDarkMode flag)
- googleVerification rendered from config instead of .env — it is a
  public string, not a secret, and not environment-specific

PostLayout (new):
- Wraps BaseLayout; injects article-specific head content via slot
- Overrides og:type to "article"
- Adds article:published_time / article:modified_time conditionally
- JSON-LD BlogPosting with conditional datePublished/dateModified
  (fixes old bug where absent dates produced "undefined" string)
- Structured data only on actual post pages (not home/archives/tags)

SiteConfig: add optional googleVerification field

* chore: replace scaffold index page with BaseLayout placeholder

* feat: add Header component

* feat: add Footer and Socials component

* chore: install dayjs, slugify, zod, @astrojs/mdx and add MDX integration

* feat: add resolved config that applies defaults in one place

Defaults for posts, features, socials, and shareLinks are merged in
src/config.ts so all consuming code gets non-optional types with no
scattered ?? fallbacks.

* feat: add content schema, blog path, and post utilities

Renames collection blog→posts, moves content to src/content/posts/,
adds .mdx support, and adds a typed pages collection. Includes
getSortedPosts, postFilter, getPath, and slugify utilities.

* feat: add Datetime and Card components

* refactor: switch layouts and components to resolved config

Replaces @/astro-paper.config imports with @/config and removes
optional chaining on feature flags now that the resolved config
guarantees non-optional values.

* feat: add home and footer i18n strings

* feat: implement home page with hero, featured, and recent posts

Replaces the BaseLayout placeholder with the full index page:
hero section with RSS link and social links, featured posts section,
recent posts capped at posts.perIndex, and an All Posts link. All
section labels come from i18n.

* feat: add pagination component

* feat: add Breadcrumb component with locale support

* feat: add Main component

* refactor: update code formatting in Card.astro

* feat: add posts page

* fix: add missing @astrojs/mdx dependency

* refactor: rename meta to pages in i18n

* refactor: improve code formatting in Breadcrumb

* refactor: destructure props in Main component for clarity

* feat: add tag pages

* feat: add About page

* chore: update i18n configuration to use site language from config

* feat: add Archives page

* feat: integrate Pagefind search functionality

* feat: add dynamic Open Graph image generation for posts

* feat: add post detail page

* feat: add Shiki transformers

* chore: remove unused edit link text

* chore: update .gitignore to include generated Pagefind directory

* chore: update site URL in configuration to production link

* chore: replace favicon and remove unused SVG assets, add new Open Graph image

* feat: update site config with default values

* feat: add default OG image path resolution

* fix: ensure edit post feature checks for enabled status correctly

* feat: implement dynamic Open Graph image generation

* feat: add RSS feed generation functionality

* feat: add 404 Not Found page

* feat: add robots.txt generation for SEO optimization

* refactor: change getSortedPosts to a named export

* refactor: change postFilter to a named export

* refactor: rename BaseLayout to Layout

* refactor: standardize locale handling across components

* refactor: update getPostsByGroupCondition location

* chore: remove unused Welcome component

* refactor(i18n): update links using getRelativeLocaleUrl

* refactor(i18n): add dynamic locale loading

* fix: update language attribute to use current locale

* fix: correct wording for updatedAt in post translations

* fix: update layout titles to use correct translation keys for tags pages

* chore: use new colors for better DX and a11y

* feat: add underline icon for active icon nav

* feat: add toc for markdown contents

* refactor: remove unused feature flags in config

* refactor(i18n): enhance locale handling and path management

* fix: ts unused variable hint

* refactor: extract locale stripping logic into a util func

* refactor(i18n): improve locale handling in tag pages

* refactor: update post URL helper functions

* refactor(i18n): replace pathWithBase with getRelativeLocaleUrl for locale handling

* refactor: rename fileWithBase to getAssetPath

* refactor: use runtime agnostic APIs for file paths

* refactor: use transition directive for heading transition

* refactor: remove unused title element from tag page

* fix: decouple ClientRouter from lightAndDarkMode flag

* refactor: rename `postPaths.ts` to `getPostPaths.ts`

* refactor: remove unused `minutesRead` string from post translations

* refactor: simplify AdjacentPostNav component by passing prevPost and nextPost directly

* refactor: remove unused code declaration

* docs: add existing blog posts

* chore: update astro and @astrojs/check dependencies to latest versions

* build: use experimental svg optimizer

* chore(repo): restore project meta files and Docker configs

* refactor: update code formatting with Prettier

* docs: update README and docs

* docs: add JSDoc comments to utility functions

* docs: add JSDoc comments to resolved config file

* fix(og): avoid double slashes when appending index.png

* chore(ci): update Node.js version to 22.12.0 in CI workflow

* feat: improve og image generation with Astro's getFontFileURL API (#632)

* feat: improve og image generation with Astro's getFontFileURL API

- remove @resvg/resvg-js and use sharp to convert SVG to PNG
- update og image generation to use Astro's getFontFileURL API for better font handling

* docs: update README and dynamic OG images documentation

- remove outdated content and clarify dynamic OG image generation process in README.
- add new image example and update instructions for handling non-Latin characters in dynamic OG images.
- adjust copyright year in README to 2026.

* fix(header): adjust icon button alignment in mobile

* feat(docs): add ResponsiveTable to use it in MDX posts (#634)

* feat(docs): add ResponsiveTable to use it in MDX posts

Introduce ResponsiveTable with variant-based styling. Rename docs posts to
.mdx, wrap tables in the component, and remove redundant table `code` rules
from prose typography.

* chore(prettier): ignore .mdx files when checking format

* chore(ci): update Node.js version to 24 in CI workflow

* bump: upgrade Astro and dependencies

* fix: remove redundant backUrl script bug

* fix(header): adjust button and icon alignment

* fix(a11y): improve muted-foreground color contrast

* docs: update predefined color schemes

* chore: support site verification env as fallback for googleVerification

* docs: add astro paper v6 updates in docs

* docs: add AstroPaper-v6.png in astro-paper-6 blog post

* fix: update back-to-top button DOM placement (#641)

Closes #626, #131, #493
2026-05-17 16:17:58 +07:00
satnaing f3005328e5 chore: correct closing tag in README.md for Lighthouse Score image 2026-01-14 06:18:08 +07:00
Sat Naing 4a12d9fc7e chore: cleanup unused files and docs (#610)
* chore: remove unused `public/assets` directory

* chore: move `remark-collapse` type declaration to `src` directory

* chore: reorganize project structure in README.md for clarity

Closes #609
2026-01-14 05:55:38 +07:00
Sat Naing fb63d96011 fix: slugify supports better acronyms and preserve non-latin char (#606)
* fix: slugify supports better acronyms and preserve non-latin char

Update slugify function to handle better acronyms and preserve non-latin characters.
- uses slugify (simov) for Latin-only strings to fix acronym issue (eg: e2e-testing)
- uses lodash.kebabcase for strings with non-latin characters to preserve them

* fix: remove dots in slugified titles for view transitions

Fixes #584
2026-01-14 05:20:25 +07:00
Sat Naing c20d747f38 docs: fix Image component typo and prevent code fence formatting (#605) 2026-01-10 21:50:23 +07:00
Sat Naing 29fe8a30de chore: remove unused IconSun.svg and clean up Layout.astro styles (#604)
- remove unused `IconSun.svg`
- remove unused styles inside `Layout.astro`
- remove `autofocus: true` option in pagefind initialization
2026-01-10 21:46:53 +07:00
Sat Naing c61a75575d fix: add autofocus in search bar and update search result title style (#603) 2026-01-10 21:27:23 +07:00
Sat Naing 698295d23d feat: integrate Astro fonts API with Google Sans Code font (#602)
- Add Google Sans Code font and make it the default font
- Font is preloaded with latin subset and weight 400 and style normal for optimal performance
- Add font configuration section in how to config docs
2026-01-10 21:08:31 +07:00
Sat Naing 5bb8e405bb refactor: optimize theme script to prevent render-blocking (#601)
* refactor: optimize theme script to prevent render-blocking

- Move theme script from `public/` to `src/scripts/`
- Split into minimal inline script (FOUC prevention) + external script (non-blocking)
- Rename `primaryColorScheme` to `initialColorScheme`
- Rename `toggle-theme.js` to `theme.ts`
- Use TypeScript for theme script
- Update docs for theme customization
2026-01-10 07:26:25 +07:00
satnaing 25d25437cf bump: version 5.5.0 → 5.5.1 2026-01-08 19:04:42 +07:00