TWCARTY is a minimal, responsive starter template for photographers and artists to showcase their work and blog posts.
Basic knowledge of:
Clone the repository
git clone https://github.com/sira313/twcarty
Install PNPM globally
npm install -g pnpm
Install dependencies
pnpm install
Run the project
pnpm build && pnpm serve
Watch and edit styles (optional) To edit CSS in real-time:
pnpm watch:css
scripts/
src/
├── asset/
│ ├── blog/
│ ├── index/
│ └── photos/
│ └── thumbnail/
├── blog/
├── photos/
├── _data/
├── _includes/
│ ├── footer/
│ ├── index/
│ ├── js/
│ ├── main/
│ ├── nav/
│ ├── post/
│ └── search/
└── _pages/
├── data/
├── js/
├── main/
└── tags/
In .eleventy.js
, you can set global site data:
eleventyConfig.addGlobalData("lang", "en");
eleventyConfig.addGlobalData("rootTitle", "Apoxicam");
eleventyConfig.addGlobalData("rootURL", "https://twcarty.netlify.app");
eleventyConfig.addGlobalData("quotes", "<i>No one comes to your website to be entertained...</i><br /><b>― Jay Baer</b>");
Edit src/_data/sosmed.json
to include your social media.
Use Feather Icons or custom SVGs made in Inkscape.
Default menus:
To add more menus, follow this tutorial
Update your collections in .eleventy.js
:
const collectionConfigs = [
{ name: "posts", glob: "src/blog/**/*.md" },
{ name: "photos", glob: "src/photos/**/*.md" },
{ name: "recentPosts", glob: "src/blog/*.md", limit: 3 },
{ name: "recentPhotos", glob: "src/photos/*.md", limit: 6 }
];
Also update:
src/_data/nav.json
for desktop viewsrc/_data/nav-mobile.json
for screens < 300pxDefined in src/_includes/
:
base.html
– main layoutpost-blog.html
– for blog postspost-photos.html
– for photo postsLocated in src/_pages/
:
index.md
– homepagephotos.html
– photo galleryblog.html
– blog listingUse the helper script to automate post creation:
For blog posts:
pnpm mkpost -b "Your post title"
For photo posts:
pnpm mkpost -p "Your post title"
These will generate Markdown files in their respective folders.
Images and other assets are stored in /src/asset/
You can link them from the front matter in your posts.
Use Squoosh to convert images to .webp
for better performance.
While eleventy-img
is available, it didn’t match this project’s needs. Feel free to explore it here.
If you find this project helpful, you can support me here: