personal site built with purpose of:
- book tracking (fetching book metadata, covers, page count)
- easy to render hierarchical content (breadcrumbs nav, list of posts, list of dirs, etc.)
- clone and install dependencies:
git clone https://github.com/0xtimsb/site.git
cd site
bun install
- create your own private data repository:
-
create a github repository named
data
. -
initialize with the following structure:
data/
├── books/
│ ├── covers/
│ ├── sections.json
│ └── page-count.json
└── posts/
├── index.mdx
└── sub-directory/
├── index.mdx
└── first-post.mdx
-
update the submodule url in
.gitmodules
. -
initialize the submodule:
git submodule update --init --recursive
books are organized in sections through data/books/sections.json
.
the fetch-books
script automatically:
- fetches book metadata from google books api
- downloads and optimizes book covers
- updates page counts in
data/books/page-count.json
run it after adding new books:
bun run fetch-books
the site automatically generates breadcrumb navigation based on your content structure:
- root level: just the page title
- nested pages: home > directory > sub-directory > page title
- each intermediate path requires an index.mdx file with title metadata
bun run build