A modern, performant blog built with Eleventy, featuring articles about AI, Code, and Climate Change.
npm install
Start the development server:
npm start
The site will be available at http://localhost:8080 with hot-reload enabled.
Generate the static site:
npm run build
The built site will be in the _site directory.
adhir-blog/
βββ _data/ # Global data files
β βββ metadata.json # Site metadata
βββ _includes/ # Templates and layouts
β βββ layouts/
β βββ base.njk # Base layout
β βββ home.njk # Homepage layout
β βββ post.njk # Blog post layout
βββ _site/ # Built site (generated)
βββ css/ # Stylesheets
β βββ main.css
β βββ prism-tomorrow.css
βββ js/ # JavaScript files
β βββ main.js
βββ posts/ # Blog posts (Markdown)
β βββ gpt-optimization.md
β βββ rust-wasm.md
β βββ carbon-api.md
βββ .eleventy.js # Eleventy configuration
βββ .gitignore
βββ index.njk # Homepage
βββ about.md # About page
βββ 404.md # 404 page
βββ package.json
βββ README.md
Create new posts in the posts/ directory as Markdown files with frontmatter:
---
title: Your Post Title
description: A brief description
date: 2024-01-20
tags:
- AI
- Climate
category: ai
readingTime: 5
layout: layouts/post.njk
---
Your content here...
Edit _data/metadata.json to update site information, author details, and social links.
Modify css/main.css for design changes. The CSS uses CSS custom properties for easy theming.
js/main.jsjs/main.jsDEMO_KEY with your own NASA API keynpm run build_sitenpm i -g vercelvercelnpm run build_site contents to gh-pages branchThe blog uses NASAβs DEMO_KEY by default. For production:
DEMO_KEY in js/main.jsMIT License - feel free to use this for your own blog!
Created by Adhir Inspired by Mediumβs design with added interactivity
---
## π¦ Complete File Structure for Download
adhir-blog/ βββ _data/ β βββ metadata.json βββ _includes/ β βββ layouts/ β βββ base.njk β βββ home.njk β βββ post.njk βββ css/ β βββ main.css (full CSS from the HTML artifact) β βββ prism-tomorrow.css βββ js/ β βββ main.js βββ posts/ β βββ gpt-optimization.md β βββ rust-wasm.md β βββ carbon-api.md βββ .eleventy.js βββ .gitignore βββ index.njk βββ about.md βββ 404.md βββ package.json βββ README.md