Commit Graph

188 Commits

Author SHA1 Message Date
Qihan dc75871b6a add: 盐林格勒友链 2026-08-12 04:00:03 +00:00
Qihan 7ef6d1aa84 add: 夏沫花火友链 2026-08-12 03:49:34 +00:00
Qihan 73f19f9a8a add: 洛元小屋友链 2026-08-12 03:45:44 +00:00
Qihan 3b9a8ce28e add: 零狼小窝友链 2026-08-12 03:38:52 +00:00
Qihan 17ef036ae6 Update links.astro 2026-08-12 00:10:04 +08:00
Qihan daea553295 update: redesign links page with liuzhen932-style cards 2026-08-11 16:03:59 +00:00
Qihan cbc77bf83b update: redesign link cards with solid border (like liuzhen932) 2026-08-11 15:59:21 +00:00
Qihan 724e0e1eab update: align link cards to page left edge 2026-08-11 15:32:51 +00:00
Qihan 83ddd61f53 update: fine-tune link card left padding 2026-08-11 15:28:10 +00:00
Qihan 031bd44a63 update: remove left padding from link card 2026-08-11 15:24:46 +00:00
Qihan dfe82878d9 update: move avatar to left edge of link card 2026-08-11 15:22:11 +00:00
Qihan 1e1ee14d12 add: 米露小窝友链 2026-08-11 09:33:50 +00:00
Qihan 1397c0d0d1 Update links.astro 2026-08-11 17:31:16 +08:00
Qihan 3c39ddbfe5 style: tighter gap 0.4rem 2026-08-11 09:22:45 +00:00
Qihan 79d5e89a1a style: tighten card gap 2026-08-11 09:19:38 +00:00
Qihan b8ef26ba8d style: tighter cards, center-aligned text next to avatar 2026-08-11 09:16:42 +00:00
Qihan 766bfaf2f9 style: left-align text, wrap avatar top, bigger font 2026-08-11 09:12:21 +00:00
Qihan 23011a7dcf style: enlarge avatar, bigger text, more padding 2026-08-11 09:06:14 +00:00
Qihan f028e3a0d0 style: widen link cards to ~2 per row 2026-08-11 09:01:33 +00:00
Qihan 74888f403a style: thinner dashed border cards, transparent background 2026-08-11 08:58:04 +00:00
Qihan eae76bcd68 update: friend link cards with grid layout, move app guide below 2026-08-11 08:51:31 +00:00
Qihan 00a12bbd62 feat: add friends links page 2026-08-11 08:26:21 +00:00
Qihan 86c9f6c42d feat: update post OG image font to Noto Serif SC 2026-08-11 04:27:43 +00:00
Qihan e6e89911cd feat: update OG image font to Noto Serif SC 2026-08-11 04:27:41 +00:00
Qihan 579df08e3a fix: use Nunito font for per-post OG image 2026-08-11 04:17:28 +00:00
Qihan 9599417d3b fix: use Nunito font for OG image instead of missing Google Sans Code 2026-08-11 04:17:22 +00:00
Qihan 82e9db9481 Update index.astro 2026-06-17 00:08:15 +08:00
Qihan 95989771ad Update index.astro 2026-06-13 17:47:37 +08:00
Qihan dd163c47dd Update index.astro 2026-06-13 17:07:30 +08: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
せいはな 470bfb528e fix: sanitize post title for valid CSS view-transition-name (#650) 2026-06-02 22:05:23 +07:00
Orancat 68b452289a fix: update incorrect RSS link (#649) 2026-05-29 08:54:17 +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
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 7141d82dbd refactor: update component props and improve types (#600)
- stop exporting component Props
- replace interface with type for component Props
- enhance dynamic rendering in several components
2026-01-05 22:56:38 +07:00
Sat Naing f5f863f9d2 fix: improve Tag component by making it entire component clickable (#598)
Update Tag component structure/styles and make the entire
component clickable
2026-01-04 20:43:46 +07:00
Sat Naing ceb406314b refactor: improve semantic by replacing decorative hr with borders (#597)
Replace decorative usage of Hr component with borders to improve
semantic.

- remove Hr component
- replace decorative hr elements with borders
- introduce app-layout utility class
- update layout and spacing
- update docs about border css custom property
2026-01-04 20:24:34 +07:00
StephenFang aad5ac67e4 fix(og-images): wrap Buffer in Uint8Array for Response body (#568)
Astro uses Web API typings; Response doesn’t accept Node Buffer. Convert
the generated OG image Buffer to Uint8Array before constructing Response
to satisfy BodyInit and fix the build/type error.

Closes #560
2025-08-21 21:30:10 +07:00
Sat Naing 5fb3b25acb fix: broken typography in about layout (#541)
* fix: broken typography in about layout

* chore: update about content
2025-06-15 15:55:17 +07:00
Sat Naing 38ebf6e1b6 feat: add RTL language support (#531)
* feat: add RTL language support

- Add `SITE.dir` config option.
- Replace physical Tailwind classes with logical
property classes.

Resolves #439

* docs: add `dir` section in doc
2025-06-14 00:07:27 +07:00
Sat Naing 5f72b93d92 refactor: extract redundant max-width into utility (#525)
* refactor: extract redundant max-width into utility

Extract redundant max-width into a universal tailwind
utility class. By doing so, the width of the layout
in different pages can be customized easily.

* docs: update docs for modifying `max-w-app` utility
2025-06-09 11:42:33 +07:00
Sat Naing a397677d84 fix: ensure only one search bar is displayed on nav link clicks (#489)
Closes #465
2025-03-22 09:21:16 +07:00
satnaing feaf5e122a feat: allow blog posts to be organized by subdirectories
Blog posts can now be structured into subdirectories, which determine their slugs.

Example:
- `/src/data/blog/2025/testing.md` → `/posts/2025/testing`

Directories prefixed with `_` will be excluded from the slug.

Example:
- `/src/data/blog/_examples/tailwind-typography.md` → `/posts/tailwind-typography`

Closes #470, #366
2025-03-18 07:57:07 +07:00
satnaing 67b9536cce refactor: replace secHeading with variant prop in Card 2025-03-18 07:57:07 +07:00
Sat Naing 6749f62015 fix: add an option to disable dynamic OG image generation (#476)
* fix: add an option to disable dynamic OG image generation

Add new `dynamicOgImage` option in the `SITE` object inside 
`src/config.ts` file to disable auto og-image generation during build.

Resolves #428

* docs: update guides for `SITE.dynamicOgImage` option
2025-03-12 20:47:12 +07:00
satnaing 61c6ec81b8 fix: remove unused back url in the card url 2025-03-08 18:21:37 +07:00
Sat Naing 9119125643 feat!: add pagefind for static search (#458)
Replace React with pagefind for static site search
2025-03-08 18:21:37 +07:00
satnaing 79c7df45e5 feat: update back button logic
Instead of saving back url in the param, save the
back url info inside session.
2025-03-08 18:21:37 +07:00