Skip to content

alexandrehtrb/alexandrehtrb.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

196d5aa · Mar 7, 2025
Oct 15, 2024
Mar 7, 2025
Mar 6, 2025
Jan 14, 2024
Jan 14, 2024
Jan 14, 2024
Jan 14, 2024
Jan 15, 2024
Sep 6, 2024
Feb 20, 2025
Feb 20, 2025
Jan 14, 2024
Jan 14, 2024
Sep 6, 2024
Jan 15, 2025

Repository files navigation

Blog starter

Netlify Status

View the live demo here, hosted on Netlify

homepage darkmode

Aims

A blog that still runs without javascript. Hence, no bundlers.

Features

  • Static Site Gen - Eleventy

  • Tailwind CSS v2.0 / Tailwind Typography / Dark Mode

  • Create excerpts using the <!-- excerpt -->

  • Custom ReadTime filter

  • 404 page

  • Tags page to view posts related to tag

    • Use of a tagList collection defined in .eleventy.js
    • /tags - show all available tags (excluding all and posts) as buttons (tags.md)
    • /tags/tag-name - shows all posts related to that tag (tagList.md)
  • Sitemap and Robots.txt

    • Change site url in _data/site.json
  • Shortcode to handle images

    • Add image under src/assets/img/posts and use the asset_img short code
    • {% post_img 'filename' 'alt_text' %} eg. {% post_img 'mailbox.jpg' 'mailbox' %}
  • Draft posts using the published frontmatter
  • Posts pagination in index.html
    • change the size frontmatter variable
  • ESLint
  • Bash script to create new post (based on YYYY and MM)
$ ./create new blog post
Created new post at src/posts/2021/01/new-blog-post.md

Running locally

Create your blogpost under src/posts. I like to have mine sorted by YY/MM.

Navigate to localhost:8080 after starting the server.

npm install
npm run dev

# or

pnpm install
pnpm dev

Deployment

GitHub Pages

Just commit and push to master branch, a GitHub Action will start and deploy.

Netlify / Surge / Firebase hosting / etc hosting providers

Build Command: npm run build or pnpm dev

Output folder: _site