Commit Graph

48 Commits

Author SHA1 Message Date
Sat Naing 2774045045 fix: broken editPost link and update editPost logic (#487)
* fix: broken editPost link and update editPost logic

Fixed broken editPost link. Removed the ability to update
the editPost link inside each blog post for consistency.
The editPost button per blog post can still be hidden.

* docs: update docs for editPost
2025-03-20 12:41:58 +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
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
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
Sat Naing 35429176e0 refactor!: remove react dependency for UI interactions (#457)
Remove react as a dependency for UI interactions.
Update jsx components such as Search and Datetime
with astro components.
2025-03-08 18:21:37 +07:00
satnaing 172e14b5f4 build!: upgrade to Tailwind CSS v4 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
George Zhao a56b28bc2c fix: use tag name for display in tags page (#438)
Instead of slugified tags, original tag names will
be used for displaying tag names in the tags page.
2025-02-08 11:52:36 +07:00
開源 lib 43387b0d94 fix: add inline-block class to post title for improved view transition animation (#420) 2025-01-02 23:47:29 +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
Sat Naing 29eff36794 feat: add prev/next links at the bottom of blog post (#372)
* feat: add prev/next links at the bottom of blog post
* fix: update and rerun scripts in post details page after swap

Resolves #358
2024-09-16 20:43:54 +07:00
Sat Naing 6bbe177566 chore: upgrade ESLint to v9 and update configurations (#356)
* chore: upgrade ESLint to v9 and update configurations

Upgrade ESLint and configure and update ESLint rules.

* refactor: update code to comply with new ESLint v9 rules
2024-08-19 12:58:16 +07:00
satnaing 63feb9607b refactor: remove commented codes 2024-07-27 17:29:58 +07:00
87xie b9266cb20d refactor: remove redundant role in article element (#323) 2024-07-15 22:36:03 +07:00
87xie 7b045a0be8 feat: make heading links keyboard focusable (#275) 2024-07-14 16:10:56 +07:00
Sat Naing 8e022c7b5a feat: add scroll indicator in blog posts (#249) 2024-02-09 11:43:51 +06:30
Alan Ye 556df2d21a fix: add SITE.title in PostDetails title tag for consistent look (#247)
Add `SITE.title` in PostDetails page to be the same as other page title tags.

---------

Co-authored-by: satnaing <satnaingdev@gmail.com>
2024-01-25 10:33:32 +06:30
satnaing b05ab6213e refactor: update post detail script codes
Updates:
- add optional chaining in possible null variables
- remove unnecessary after-swap event listeners
2024-01-24 13:46:31 +06:30
Sat Naing 8f75f0a5e7 fix: update back button to redirect to home when no route history (#241)
Update back button in PostDetails.astro to redirect to home page when
there's no route history.
If a blog post url is pasted in the browser and there's no route history
,prior to this commit, back button did not work as expected.
Now, if there's somewhere to go back, the back button will go back to the
previous route.
If not, the back button will redirect to home page.
2024-01-22 11:03:41 +06:30
Benjamin Rae 742baff2c9 feat: add heading links to PostDetails page (#232)
- implement easy links to headings (h2-h6) on post details
- the links are aria-hidden and only show on hover
2024-01-15 11:17:47 +06:30
immodded 1e2c5e82d8 feat: add share links in blog post (#215)
* Add share links

* refactor: update and rename Sharebutton to ShareLinks

- rename SOCIALS to shareLinks to avoid confusion with `src/config.ts > SOCIALS`
- fix type error related with shareLinks
- add `linkTitle` in shareLinks for better accessibility
- update styles to looks good in all devices

* refactor: place ShareLinks next to `back to top`

- place ShareLinks at the bottom (next to `back to top`)
- update styles for ShareLinks and Back to Top button

---------

Co-authored-by: Sat Naing <satnaingdev@gmail.com>
2024-01-08 15:11:10 +06:30
Qisthi Ramadhani 6e7d76a0d3 feat: add copy buttons for code blocks (#217)
* feat: copy button on snippet code

* refactor: update func name, styles and refactor backToTop

Rename the function name `copyButton` to `attachCopyButtons`. Update copy button styles. Fix broken `backToTop` function by attaching `astro:after-swap` event listener.

---------

Co-authored-by: Sat Naing <satnaingdev@gmail.com>
2024-01-07 21:15:47 +06:30
satnaing e7c9a56722 refactor: enable scroll-smooth only in post detail page 2024-01-04 15:53:12 +06:30
Sat Naing b05b8fb842 feat: replace slugified title with unslugified tag name (#198)
Update slugified titles to be unslugified in the tag page. This is for better SEO and better a11y. Url and tag elelemnts will still be slugified.

Closes: #179
2023-12-28 14:16:40 +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 c526157118 feat: implement back-to-top button in blog post page
Implement back-to-top button under tags in PostDetails page. Update html scroll-behavior to smooth.

Closes: #156
2023-12-15 14:21:17 +06:30
tanishqmanuja 88d9343ab5 feat: use new og images in layout 2023-09-26 02:04:11 +06:30
tanishqmanuja 7f3edbdecd fix: get og image url correctly 2023-09-26 02:04:11 +06:30
tanishqmanuja 6dffcf3cb3 fix: og image src
related to: 3e0109c12e708351df60df7b938e8bcc07807540
2023-09-26 02:04:11 +06:30
Tanishq Manuja 6c7d04fa12 feat: add view transitions for card on search page (#118)
* feat: use predictable slug for card transition

* feat: enable view transitions in search card

* refactor: use Card.tsx instead of Card.astro

* refactor: handle card styling in component

* refactor: remove unused class name

---------

Co-authored-by: Sat Naing <satnaingdev@gmail.com>
2023-09-26 02:04:11 +06:30
satnaing 1933a6beae fix: update auto-gen OG images to allow special char usage in title
Update the implementation of og image generation code to allow special character usage in title.

fix #103, fix #88
2023-09-26 02:04:11 +06:30
satnaing cbdaa59bae feat: add ViewTransitions from Astro
Integrate ViewTransitions API from Astro v3.

resolve #96
2023-09-26 02:04:11 +06:30
Nahuel Garbezza 4687bd516b feat: support custom canonical URLs (#83)
Adding an optional attribute in the posts' frontmatter that allows the user to set a custom canonical URL
2023-07-23 10:55:19 +06:30
satnaing e017dcf9a5 style: format files with prettier 2023-06-21 11:48:07 +06:30
satnaing e8bd3911b3 refactor: update slugify logic inside the component itself 2023-05-15 10:05:11 +06:30
Jingwei Gao 49d7f77a86 Fix: slugify tags in post detail page 2023-05-01 17:36:00 +08:00
Sat Naing 27507d1d78 feat: generate og images in png format (#43)
* feat: generate og images in png format

In production mode, generate og images from svg to png format.

fix #40

* refactor: update og image format from svg to png

Update OG image format in post detail to png. Update twitter og images to auto-generated dynamic og
images.
2023-03-01 18:46:42 +06:30
satnaing 1a427285f3 style: format styles with Tailwind Prettier plugin 2023-01-31 15:53:49 +06:30
satnaing 50af65b0b4 refactor: update ogImage.src to ogImage 2023-01-30 20:57:35 +06:30
satnaing 38761e2e8f refactor: update collection type and new schema property name 2023-01-28 01:18:25 +06:30
Sat Naing ce3f1dc4a0 feat: generate dynamic og image for blog posts (#15)
* feat: add dynamic og image using satori
* feat: add og card styling
* feat: add dynamic paths for ogTitle
* feat: add default og url
* ci: change config site url for testing purpose
* fix: update original auto-generate og image style
* refactor: move ogImage jsx inside generateOgImage
* fix: add conditions for filtering draft posts & ogImages
* build: update minor and major dependency updates
* build: update site option in config file
2022-12-28 09:09:57 +06:30
Sat Naing 20822c422a chore: format files with prettier 2022-10-16 23:53:16 +06:30
Sat Naing 25bc1e06cf Remove prose-slate style 2022-09-26 02:28:05 +06:30
Sat Naing 350f586e4d Update outline style of Go Back button 2022-09-26 00:09:02 +06:30
Sat Naing b8a08dc794 Update import of type definition 2022-09-22 20:51:35 +06:30
Sat Naing fe92f303d4 Update PostDetails layout to accept author, desc and og image 2022-09-21 14:08:47 +06:30
Sat Naing 6bc75bac9a Replace breadcrumbs with go back button 2022-09-20 22:21:37 +06:30
Sat Naing 17dfe7f24c Add PostDetails layout for each post 2022-09-20 20:55:53 +06:30