Commit Graph

93 Commits

Author SHA1 Message Date
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
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
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 594addaec1 refactor!: update blog directory to src/data/blog 2025-03-08 18:21:37 +07:00
satnaing cc936ca5e4 build!: upgrade Astro to v5 and related packages 2025-03-08 18:21:37 +07:00
Sat Naing 397e3211d7 docs: update est readingTime blog post (#409)
Resolves #406
2024-11-05 18:12:45 +07:00
Patrick Wilson 7573617e79 feat: add archives page with configurable menu (#386)
* feat: add archives page with configurable menu

* optimize: compat mobile layout

* fix: update archive menu layout

* fix: hide archives page from URL if showArchives is false

* docs: add `showArchives` option in docs

Resolves #361

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-10-14 18:49:40 +07:00
Patrick Wilson 0bc8eeeac8 feat: add edit post feature in blog posts (#384)
* feat: add edit post feature

* fix: remove edit button except on post detail pages

* docs: update site config docs for editPost

Resolves #191
---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-10-11 18:14:17 +07:00
Erison Silva c11b2a2960 fix(docs): update giscus blog post (#392) 2024-10-02 21:44:40 +07:00
Alberto Perdomo 70b2486293 docs: add a blog post for LaTex support (#373)
Add a blog post for adding LaTex equation rendering 
in AstroPaper blog posts.
---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-09-11 09:21:43 +07:00
faiz ahnaf ec373c3369 fix(blog): correct file reference in reading time guide (#359)
Ensure no duplicate items appear in the list of the blog post
and update the list with the correct one.
2024-09-08 12:25:24 +07:00
Sat Naing dab61b3714 build: bump Astro to v4.14.2 & use content layer (#355)
Bump Astro from v4.13 to v4.14.2 and use experimental
content layer api.
2024-08-19 12:53:58 +07:00
satnaing 65b6a492c3 docs: update estimated reading time blog post async section
Update `getStaticPaths` section of `/tags/[tag]/[page].astro`
to have resolved promises. Replace `flatMap` with
`await Promise.all` and `.flat()`.
2024-08-18 01:50:55 +07:00
Sat Naing 88e5c430c8 docs: update estimated reading time blog post (#354)
Resolves #350
2024-08-17 21:03:28 +07:00
Sat Naing 910b72e513 docs: update pre-commit hook blog post (#344)
Add a section about the removal of the pre-commit
hook in v4.3.0.
2024-08-03 11:41:23 +07:00
u8b19 2f82febff4 fix: resolve non-latin char issue in generated OG images (#318)
Changes made
- update font source with Google font
- add error handling in font fetching logic
- update docs in dynamic-og-images blog post

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-07-27 14:36:52 +07:00
FjellOverflow 76b65556f7 docs: add guide on integrating user comments with Giscus (#335) 2024-07-27 10:01:25 +07:00
Matthieu aa9430a1cf docs: fix typo in development note of theme configuration guide (#333) 2024-07-24 22:04:13 +07:00
David Legrand 0d5ea52c23 feat: add number of posts config for home page (#281)
* Add a SITE config parameter for posts in index page

* docs: update blog post for `postPerIndex` config

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-07-14 16:48:49 +07:00
Jahseh J c9150f2774 fix: update incorrect typo in predefined-color-schemes.md (#245) 2024-01-24 09:20:45 +06:30
David Legrand 3efa05cc10 feat: hide posts in Prod with future pubDatetime (#234)
* Hide posts when PubDateTime is not reached

* refactor: extract filter logic into a file

* docs: update SITE config docs

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-01-15 19:40:02 +06:30
Simon Smale de605d87a0 docs: adds blog post for how to add a social icon (#221)
* docs: adds blog post for how to add a social icon

* refactor: update the blog post

---------

Co-authored-by: Sat Naing <satnaingdev@gmail.com>
2024-01-09 15:47:38 +06:30
Simon Smale bb60a9b3db docs: updates the hook post with a smarter updateHook (#222) 2024-01-09 11:18:40 +06:30
satnaing ff30dee418 docs: add an AstroPaper v4 announcement post 2024-01-04 15:53:12 +06:30
Simon Smale 9c776dac1f docs: adds an article about git hook date setting (#211)
* feat: adds post on git hook date setting

* fix: make necessary adjustments and fix typo

---------

Co-authored-by: Sat Naing <satnaingdev@gmail.com>
2024-01-04 15:53:12 +06:30
satnaing 1c806b7ddd docs: add new color scheme for AstroPaper v4 2024-01-04 15:53:12 +06:30
satnaing 792a02b325 docs: #205 update estimated-reading-time article
Fix typo. Update await files in getSortedPosts.

Closes: #205
2024-01-04 15:53:12 +06:30
Simon Smale 14e2936608 feat: add code-snippets for content creation (#206)
* Create astro-paper.code-snippets

* feat: allow nullable modDatetime

this is needed to allow the snippet to work with a blank date time, and is a precursor of adding in a modified date time setting hook

* Update astro-paper.code-snippets to make feat false by default
2024-01-04 15:53:12 +06:30
Sat Naing 2827d4e7d8 refactor: replace postSlug with Astro content slug
* refactor: replace postSlug with Astro content slug

Remove postSlug from blog schema. Refactor articles that use postSlug. Remove slugify function from slugify util file. Replace slugify logic with Astro's content collections slug logic.

Closes: #186

* docs: update docs for removed slugify contents

* refactor: remove unused import
2023-12-27 10:20:55 +06:30
Sat Naing 80e67a1dca feat: add modified datetime in blog posts
* feat: add modified datetime in blog posts

Add modDatetime in blogSchema. Update Datetime component to accept modDatetime. Update sorting logic. Rename datetime to pubDatetime in Datetime component.

Closes: #134

* feat: add published_time & modified_time meta tags

* docs: update related blog posts to be up-to-date

* fix: remove extra spaces in breadcrumbs
2023-12-26 10:11:26 +06:30
satnaing cd02b047d2 fix: #133 update LOCALE config to cover overall locales
Update LOCALE inside config.ts to include html lang value and datetime locale values. Updated respective files and blog post.

Closes: #133
2023-12-20 10:50:45 +06:30
Tanishq Manuja 9dcc5e1932 refactor: update site URL to be single source of truth (#143)
* wip: astro config to use .ts instead of .mjs

* fix: remove invalid prop in astro config

* refactor: single source of truth for site url

* refactor: make minor updates due to astro.config.ts

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2023-10-09 03:07:45 +00:00
satnaing d57f53ac4d docs: add a new theme and add main image in v3 post 2023-09-26 02:04:11 +06:30
satnaing 4c33936b66 docs: add upgrade section for AstroPaper v3 2023-09-26 02:04:11 +06:30
satnaing 485671ac05 docs: remove AstroPaper-2 post from featured posts 2023-09-26 02:04:11 +06:30
satnaing d7196caec9 docs: add AstroPaper v3 release blog post 2023-09-26 02:04:11 +06:30
satnaing e4463ad62a docs: update generated svg image to generated OG image 2023-09-26 02:04:11 +06:30
satnaing a5feb4b3ab docs: update reading-time post for astro-paper v3 2023-09-26 02:04:11 +06:30