Skip to content

✨ feat: add static books section#263

Merged
lwinmoepaing merged 4 commits intomyanmar-software-engineers:mainfrom
kaungmyatshwe1397:add-book-section
Mar 23, 2026
Merged

✨ feat: add static books section#263
lwinmoepaing merged 4 commits intomyanmar-software-engineers:mainfrom
kaungmyatshwe1397:add-book-section

Conversation

@kaungmyatshwe1397
Copy link
Copy Markdown
Contributor

@kaungmyatshwe1397 kaungmyatshwe1397 commented Mar 22, 2026

✨ Add Static Books Directory #257

Summary

Implements a fully static /books route backed by Contentlayer MDX entries,
following the same contributor workflow used by profiles.

Changes

  • Extended contentlayer.config.ts with a new Book document type
  • Added content/books/*.mdx as the content source
  • Created /src/app/books/page.tsx as a static list page
  • Added title, authorName, and link as required frontmatter fields
  • Sorted books alphabetically by title
  • Added empty state when no entries exist
  • Added route metadata (title, description, Open Graph)
  • Added /books to navbar and footer navigation
  • Added locale strings in messages/en.json and messages/mm.json

Type of Change

  • ✨ New feature (non-breaking)

Contributor Contract

New books can be added by creating an MDX file in content/books/:

---
title: "Clean Code"
authorName: "Robert C. Martin"
link: "https://example.com/book"
---

For repo-hosted files, place the file in public/books/ and reference
it as /books/filename.pdf in the link field.

Checklist

  • [x ] bun run build passes with no errors
  • [x ] /books renders all entries correctly
  • [x ] Books are sorted alphabetically by title
  • [x ] Empty state renders when no entries exist
  • [x ] Navbar and footer include the Books link
  • [x ] Both en and mm locale strings resolve correctly
  • [x ] External links open correctly
  • [ x] Existing /profile and /blog routes are unaffected
Screen.Recording.2026-03-22.211101.mp4

@lwinmoepaing
Copy link
Copy Markdown
Member

Could you add these as optional fields? If they are provided, please display them in the UI. No need to make it too fancy basic functionality is enough.

Field Description Required
image Book cover image Optional
authorEmail Author email Optional
authorLink Author website or social profile Optional

@kaungmyatshwe1397
Copy link
Copy Markdown
Contributor Author

kaungmyatshwe1397 commented Mar 22, 2026

Screenshot 2026-03-22 235524 Update schema and UI for those optional requirements. Thanks for your feedback.

Copy link
Copy Markdown
Member

@lwinmoepaing lwinmoepaing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

@lwinmoepaing
Copy link
Copy Markdown
Member

lwinmoepaing commented Mar 22, 2026

Btw, you’ll need to pull from the latest main branch.
There have been some changes, so please pull and merge to your current branch.
And then build locally first.
If everything looks good, feel free to open a pull request.

@kaungmyatshwe1397
Copy link
Copy Markdown
Contributor Author

-[x]fix missing key for book section in updated navbar.tsx
-[x]update working branch with upstream
-[x]successfully run build
Screenshot 2026-03-23 103846
Please tell me there is something i miss , i will fix and update as soon as i can.
Thanks for reviewing.

Copy link
Copy Markdown
Member

@lwinmoepaing lwinmoepaing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ready to ship 🚀 Great work!

@lwinmoepaing lwinmoepaing merged commit 8f3d07a into myanmar-software-engineers:main Mar 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add Book Section (စာအုပ် ကဏ္ဍ ထည့်သွင်းခြင်း)

2 participants