diff --git a/README.md b/README.md index 8bb0abd..e213fab 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,7 @@ AstroPaper is a minimal, responsive, accessible and SEO-friendly Astro blog theme. This theme is designed and crafted based on [my personal blog](https://satnaing.dev/blog). -This theme follows best practices and provides accessibility out of the box. Light and dark mode are supported by default. Moreover, additional color schemes can also be configured. - -This theme is self-documented \_ which means articles/posts in this theme can also be considered as documentations. Read [the blog posts](https://astro-paper.pages.dev/posts/) or check [the README Documentation Section](#-documentation) for more info. +Read [the blog posts](https://astro-paper.pages.dev/posts/) or check [the README Documentation Section](#-documentation) for more info. ## πŸ”₯ Features @@ -46,55 +44,52 @@ Inside of AstroPaper, you'll see the following folders and files: / β”œβ”€β”€ public/ β”‚ β”œβ”€β”€ assets/ -β”‚ β”‚ └── logo.svg -β”‚ β”‚ └── logo.png +| β”œβ”€β”€ pagefind/ # auto-generated when build β”‚ └── favicon.svg β”‚ └── astropaper-og.jpg -β”‚ └── robots.txt +β”‚ └── favicon.svg β”‚ └── toggle-theme.js β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ assets/ -β”‚ β”‚ └── socialIcons.ts +β”‚ β”‚ └── icons/ +β”‚ β”‚ └── images/ β”‚ β”œβ”€β”€ components/ -β”‚ β”œβ”€β”€ content/ -β”‚ β”‚ | blog/ -β”‚ β”‚ | └── some-blog-posts.md -β”‚ β”‚ └── config.ts +β”‚ β”œβ”€β”€ data/ +β”‚ β”‚ └── blog/ +β”‚ β”‚ └── some-blog-posts.md β”‚ β”œβ”€β”€ layouts/ β”‚ └── pages/ β”‚ └── styles/ β”‚ └── utils/ β”‚ └── config.ts -β”‚ └── types.ts -└── package.json +β”‚ └── constants.ts +β”‚ └── content.config.ts +└── astro.config.ts ``` Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. Any static assets, like images, can be placed in the `public/` directory. -All blog posts are stored in `src/content/blog` directory. +All blog posts are stored in `src/data/blog` directory. ## πŸ“– Documentation Documentation can be read in two formats\_ _markdown_ & _blog post_. -- Configuration - [markdown](src/content/blog/how-to-configure-astropaper-theme.md) | [blog post](https://astro-paper.pages.dev/posts/how-to-configure-astropaper-theme/) -- Add Posts - [markdown](src/content/blog/adding-new-post.md) | [blog post](https://astro-paper.pages.dev/posts/adding-new-posts-in-astropaper-theme/) -- Customize Color Schemes - [markdown](src/content/blog/customizing-astropaper-theme-color-schemes.md) | [blog post](https://astro-paper.pages.dev/posts/customizing-astropaper-theme-color-schemes/) -- Predefined Color Schemes - [markdown](src/content/blog/predefined-color-schemes.md) | [blog post](https://astro-paper.pages.dev/posts/predefined-color-schemes/) - -> For AstroPaper v1, check out [this branch](https://github.com/satnaing/astro-paper/tree/astro-paper-v1) and this [live URL](https://astro-paper-v1.astro-paper.pages.dev/) +- Configuration - [markdown](src/data/blog/how-to-configure-astropaper-theme.md) | [blog post](https://astro-paper.pages.dev/posts/how-to-configure-astropaper-theme/) +- Add Posts - [markdown](src/data/blog/adding-new-post.md) | [blog post](https://astro-paper.pages.dev/posts/adding-new-posts-in-astropaper-theme/) +- Customize Color Schemes - [markdown](src/data/blog/customizing-astropaper-theme-color-schemes.md) | [blog post](https://astro-paper.pages.dev/posts/customizing-astropaper-theme-color-schemes/) +- Predefined Color Schemes - [markdown](src/data/blog/predefined-color-schemes.md) | [blog post](https://astro-paper.pages.dev/posts/predefined-color-schemes/) ## πŸ’» Tech Stack **Main Framework** - [Astro](https://astro.build/) **Type Checking** - [TypeScript](https://www.typescriptlang.org/) -**Component Framework** - [ReactJS](https://reactjs.org/) **Styling** - [TailwindCSS](https://tailwindcss.com/) **UI/UX** - [Figma Design File](https://www.figma.com/community/file/1356898632249991861) -**Fuzzy Search** - [FuseJS](https://fusejs.io/) -**Icons** - [Boxicons](https://boxicons.com/) | [Tablers](https://tabler-icons.io/) +**Static Search** - [FuseJS](https://pagefind.app/) +**Icons** - [Tablers](https://tabler-icons.io/) **Code Formatting** - [Prettier](https://prettier.io/) **Deployment** - [Cloudflare Pages](https://pages.cloudflare.com/) **Illustration in About Page** - [https://freesvgillustration.com](https://freesvgillustration.com/) @@ -105,29 +100,24 @@ Documentation can be read in two formats\_ _markdown_ & _blog post_. You can start using this project locally by running the following command in your desired directory: ```bash -# npm 6.x -npm create astro@latest --template satnaing/astro-paper +# pnpm +pnpm create astro@latest --template satnaing/astro-paper -# npm 7+, extra double-dash is needed: +# npm npm create astro@latest -- --template satnaing/astro-paper # yarn yarn create astro --template satnaing/astro-paper - -# pnpm -pnpm dlx create-astro --template satnaing/astro-paper ``` -> **_Warning!_** If you're using `yarn 1`, you might need to [install `sharp`](https://sharp.pixelplumbing.com/install) as a dependency. - Then start the project by running the following commands: ```bash -# install dependencies -npm run install +# install dependencies if you haven't done so in the previous step. +pnpm install # start running the project -npm run dev +pnpm run dev ``` As an alternative approach, if you have Docker installed, you can use Docker to run this project locally. Here's how: @@ -159,14 +149,14 @@ All commands are run from the root of the project, from a terminal: | Command | Action | | :----------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run format:check` | Check code format with Prettier | -| `npm run format` | Format codes with Prettier | -| `npm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | -| `npm run lint` | Lint with ESLint | +| `pnpm install` | Installs dependencies | +| `pnpm run dev` | Starts local dev server at `localhost:4321` | +| `pnpm run build` | Build your production site to `./dist/` | +| `pnpm run preview` | Preview your build locally, before deploying | +| `pnpm run format:check` | Check code format with Prettier | +| `pnpm run format` | Format codes with Prettier | +| `pnpm run sync` | Generates TypeScript types for all Astro modules. [Learn more](https://docs.astro.build/en/reference/cli-reference/#astro-sync). | +| `pnpm run lint` | Lint with ESLint | | `docker compose up -d` | Run AstroPaper on docker, You can access with the same hostname and port informed on `dev` command. | | `docker compose run app npm install` | You can run any command above into the docker container. | | `docker build -t astropaper .` | Build Docker image for AstroPaper. | diff --git a/src/assets/images/AstroPaper-v5.png b/src/assets/images/AstroPaper-v5.png new file mode 100644 index 0000000..8fb4985 Binary files /dev/null and b/src/assets/images/AstroPaper-v5.png differ diff --git a/src/data/blog/adding-new-post.md b/src/data/blog/adding-new-post.md index 9fbfb8e..c91a560 100644 --- a/src/data/blog/adding-new-post.md +++ b/src/data/blog/adding-new-post.md @@ -1,7 +1,7 @@ --- author: Sat Naing pubDatetime: 2022-09-23T15:22:00Z -modDatetime: 2023-12-21T09:12:47.400Z +modDatetime: 2025-03-08T07:46:00.619Z title: Adding new posts in AstroPaper theme slug: adding-new-posts-in-astropaper-theme featured: true @@ -30,7 +30,7 @@ Here is the list of frontmatter property for each post. | **_pubDatetime_** | Published datetime in ISO 8601 format. | required\* | | **_modDatetime_** | Modified datetime in ISO 8601 format. (only add this property when a blog post is modified) | optional | | **_author_** | Author of the post. | default = SITE.author | -| **_slug_** | Slug for the post. This field is optional but cannot be an empty string. (slug: ""❌) | default = slugified file name | +| **_slug_** | Slug for the post. This field is optional. | default = slugified file name | | **_featured_** | Whether or not display this post in featured section of home page | default = false | | **_draft_** | Mark this post 'unpublished'. | default = false | | **_tags_** | Related keywords for this post. Written in array yaml format. | default = others | diff --git a/src/data/blog/astro-paper-4.md b/src/data/blog/astro-paper-4.md index d5520ab..68b11d2 100644 --- a/src/data/blog/astro-paper-4.md +++ b/src/data/blog/astro-paper-4.md @@ -3,7 +3,7 @@ author: Sat Naing pubDatetime: 2024-01-04T09:30:41.816Z title: AstroPaper 4.0 slug: "astro-paper-v4" -featured: true +featured: false ogImage: ../../assets/images/AstroPaper-v4.png tags: - release @@ -22,7 +22,7 @@ Hello everyone! Wishing you a happy New Year πŸŽ‰ and all the best for 2024! We' AstroPaper now leverages the power and capabilities of Astro v4. However, it’s a subtle upgrade and won’t break most Astro users. -![Astro v4](https://astro.build/_astro/header-astro-4.GLp8HjfV.webp) +![Astro v4](https://astro.build/_astro/header-astro-4.YunweN9V_OmV0l.webp) ### Replace `postSlug` with Astro Content `slug` [#197](https://github.com/satnaing/astro-paper/pull/197) diff --git a/src/data/blog/astro-paper-5.md b/src/data/blog/astro-paper-5.md new file mode 100644 index 0000000..309a8df --- /dev/null +++ b/src/data/blog/astro-paper-5.md @@ -0,0 +1,101 @@ +--- +pubDatetime: 2025-03-08T08:18:19.693Z +title: AstroPaper 5.0 +slug: astro-paper-v5 +featured: true +ogImage: ../../assets/images/AstroPaper-v5.png +tags: + - release +description: "AstroPaper v5: keep the clean look, updates under the hood." +--- + +At last, the long-awaited AstroPaper v5 is finally here. AstroPaper v5 keeps the same minimal & clean look, but comes with significant updates under the hood. + +![AstroPaper v5](@/assets/images/AstroPaper-v5.png) + +## Table of contents + +## Major Changes + +### Upgrade to Astro v5 [#455](https://github.com/satnaing/astro-paper/pull/455) + +AstroPaper now comes with Astro v5, bringing all the new features and improvements that come with it. + +### Tailwind v4 + +AstroPaper has been upgraded to Tailwind v4, which includes many style changes under the hood. The `tailwind.config.js` file has been removed, and now all the configuration is located within the `src/styles/global.css` file. Typography-related styles have been extracted and moved to `src/styles/typography.css`. + +Due to the new behavior in TailwindCSS v4, styles inside `