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
2026-05-17 16:17:58 +07:00
2026-05-17 16:17:58 +07:00
2026-05-17 16:17:58 +07:00
2026-01-08 19:04:42 +07:00
2024-07-27 10:36:40 +07:00
2026-05-17 16:17:58 +07:00
2023-01-08 21:39:01 +06:30
2026-05-17 16:17:58 +07:00
2026-05-17 16:17:58 +07:00

AstroPaper 📄

AstroPaper Figma Typescript GitHub Conventional Commits Commitizen friendly

AstroPaper is a minimal, responsive, accessible and SEO-friendly Astro blog theme. This theme is designed and crafted based on my personal blog.

Read the blog posts or check the README Documentation Section for more info.

🔥 Features

  • type-safe markdown
  • super fast performance
  • accessible (Keyboard/VoiceOver)
  • responsive (mobile ~ desktops)
  • SEO-friendly
  • light & dark mode
  • static search (Pagefind)
  • draft posts & pagination
  • sitemap & rss feed
  • MDX support
  • collapsible table of contents
  • followed best practices
  • highly customizable
  • dynamic OG image generation for blog posts (Blog Post)
  • i18n ready

Note: I've tested screen-reader accessibility of AstroPaper using VoiceOver on Mac and TalkBack on Android. I couldn't test all other screen-readers out there. However, accessibility enhancements in AstroPaper should be working fine on others as well.

Lighthouse Score

AstroPaper Lighthouse Score

🚀 Project Structure

Inside of AstroPaper, you'll see the following folders and files:

/
├── public/
│   ├── pagefind/          # auto-generated on build
│   ├── favicon.svg
│   └── default-og.jpg
├── src/
│   ├── assets/
│   │   ├── icons/
│   │   └── images/
│   ├── components/
│   ├── content/
│   │   ├── pages/
│   │   │   └── about.md
│   │   └── posts/
│   │       └── some-blog-posts.md
│   ├── i18n/
│   ├── layouts/
│   ├── pages/
│   ├── scripts/
│   ├── styles/
│   ├── types/
│   ├── utils/
│   ├── config.ts
│   └── content.config.ts
├── astro-paper.config.ts  # user-defined configurations
└── astro.config.ts

All blog posts are stored in the src/content/posts/ directory. You can organise posts into subdirectories — the subdirectory name becomes part of the post URL.

📖 Documentation

Documentation can be read in two formats_ markdown & blog post.

💻 Tech Stack

Main Framework - Astro
Type Checking - TypeScript
Styling - TailwindCSS
UI/UX - Figma Design File
Static Search - Pagefind
Icons - Tablers
Code Formatting - Prettier
Deployment - Cloudflare Pages
Linting - ESLint
Dynamic OG images - Satori + Sharp + Astro Fonts

👨🏻‍💻 Running Locally

You can start using this project locally by running the following command in your desired directory:

# pnpm
pnpm create astro@latest --template satnaing/astro-paper

# npm
npm create astro@latest -- --template satnaing/astro-paper

# yarn
yarn create astro --template satnaing/astro-paper

# bun
bun create astro@latest -- --template satnaing/astro-paper

Then start the project by running the following commands:

# install dependencies if you haven't done so in the previous step.
pnpm install

# start running the project
pnpm dev

Google Site Verification (optional)

You can add your Google Site Verification HTML tag by setting site.googleVerification in astro-paper.config.ts:

export default defineAstroPaperConfig({
  site: {
    // ...
    googleVerification: "your-google-site-verification-value",
  },
  // ...
});

See this discussion for adding AstroPaper to the Google Search Console.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
pnpm install Installs dependencies
pnpm dev Starts local dev server at localhost:4321
pnpm build Type-checks, builds the site, runs Pagefind indexing, and copies the index to public/pagefind/
pnpm preview Preview your build locally, before deploying
pnpm sync Generates TypeScript types for all Astro modules. Learn more.
pnpm astro ... Run CLI commands like astro add, astro check

Feedback & Suggestions

If you have any suggestions/feedback, you can contact me via my email. Alternatively, feel free to open an issue if you find bugs or want to request new features.

📜 License

Licensed under the MIT License, Copyright © 2026


Made with 🤍 by Sat Naing 👨🏻‍💻 and contributors.

S
Description
No description provided
Readme MIT 12 MiB
Languages
Astro 40.5%
MDX 33.8%
TypeScript 21.5%
CSS 2.5%
JavaScript 1.5%
Other 0.2%