lwojcik / eleventy-template-bliss

Single-column blog template for Eleventy focused on simplicity without sacrificing functionality
https://eleventy-bliss.lkmt.us/
MIT License
84 stars 19 forks source link
11ty blog blog-template blog-theme eleventy eleventy-blog-template eleventy-starter eleventy-template eleventy-theme eleventy-themes theme

Bliss - Blog Theme For Eleventy

Bliss is a single-column blog template for Eleventy static site generator with strong focus on simplicity without sacrificing functionality.

It is a modified and improved version of the theme running my personal blog.

Features

Live demo

https://eleventy-bliss.lkmt.us/

Setup

git clone https://github.com/lwojcik/eleventy-template-bliss
cd eleventy-template-bliss
npm install
npm run dev # to launch the project for modifications
npm run build # to build production version

Instant deploy

Netlify:

Deploy to Netlify

Vercel:

Deploy with Vercel

Render:

Deploy to Render

Deploy to GitHub Pages

Follow the steps below:

  1. Fork the repository to your GitHub account.
  2. In package.json, find the following line:
{
  "scripts": {
    // ...
    "build-gh-pages": "npm run build:sass; npm run build:eleventy -- --pathprefix=/eleventy-template-bliss/",
    //...
  }
}

Replace eleventy-template-bliss with the name of your repository.

  1. In your repository, make sure GitHub Pages are set up in the Pages tab of your repository settings:
    • Source - should be set up to GitHub Actions
  2. In Actions > General section of your repository's settings, under the Workflow permissions sub-section, select Read and write permissions
  3. Go to Actions tabs of your repository. From the list of actions select Build and deploy to GitHub Pages
  4. Click Run workflow.
  5. If the workflow runs successfully, your page will be available at https://yourusername.github.io/your-repo-name.

By default, the GitHub action workflow for publishing on GitHub Pages is set to be run manually. If you want it to run on each push to main branch, open .github/workflows/build-to-gh-pages.yml and edit on section as follows:

on:
  workflow_dispatch: # This enables the action to be launched manually from GitHub Actions tab
  push:
    branches: ['main'] # This makes the action run on each push to main branch

Configuration

See siteConfig.js. Inline documentation is available in the file.

Translation file

See phrases.js for the list of translatable static phrases.

Personalization checklist

Non-exhaustive list of steps to make the template your own. Some of them are optional, others are highly recommended:

Optional customizations

Make titles optional + use file slugs for permalinks

By default, the template assumes each post and each page to have a title and generates a permalink out using a slugify function. In other words, it converts A title like this! into a-title-like-this.

If you want your posts to have no title, open content/posts/posts.json file and modify the following line:

  "permalink": "{% if customPermalink %}{{ customPermalink }}{% else %}/{{ title | slugify }}/{% endif %}",

into the following:

  "permalink": "{% if customPermalink %}{{ customPermalink }}{% else %}/{{ page.fileSlug }}/{% endif %}",

You can do the same for pages by modifying content/pages/pages.json file.

Automatic favicon generation

Until version 2.4.0 Bliss was bundled with a favicon generation plugin. Due to unresolved bugs this plugin is no longer included with the template.

If you want to reimplement it yourself, change history from this pull request may be helpful.

Contributions

Contributions of the following kind are welcome:

I consider the project complete and apart from specific exceptions, no new features are planned.

Before contributing be sure to read Code of Conduct.

License

Licensed under the MIT license.