Giter VIP home page Giter VIP logo

ixartz / eleventy-starter-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
263.0 5.0 57.0 584 KB

๐Ÿš€ Eleventy Starter is production-ready with SEO-friendly for quickly starting a blog. โšก Built with Eleventy, ESLint, Prettier, Webpack 5, PostCSS, Tailwind CSS 2 and Netlify CMS (optional).

Home Page: https://creativedesignsguru.com

License: MIT License

JavaScript 35.26% HTML 4.12% CSS 21.83% EJS 38.79%
eleventy tailwind-css starter-kit boilerplate blog blogging eleventy-theme eleventy-sample eleventy-template eleventy-site

eleventy-starter-boilerplate's Introduction

Eleventy Starter Boilerplate

Eleventy starter banner

๐Ÿš€ Eleventy Starter Boilerplate is production-ready with SEO-friendly for quickly starting a blog. โšก๏ธ Built with Eleventy, ESLint, Prettier, Webpack, PostCSS, Tailwind CSS and Netlify CMS (optional).

Clone this project and use it to create your own Eleventy blog. You can check a Eleventy templates demo.

Features

Production-ready in mind:

  • ๐Ÿ”ฅ 11ty for Static Site Generator
  • ๐ŸŽจ Integrate with Tailwind CSS (with PurgeCSS, remove unused CSS)
  • ๐Ÿ’… PostCSS for processing Tailwind CSS
  • โšก๏ธ Lazy load images with lazysizes
  • โœจ Compress image with Imagemin
  • ๐ŸŽˆ Syntax Highlighting with Prism.js
  • โ˜• Minify HTML & CSS with HTMLMinifier and cssnano
  • โœ๏ธ Linter with ESLint
  • ๐Ÿ›  Code Formatter with Prettier
  • ๐Ÿ’จ Live reload
  • ๐Ÿ“ฆ Module Bundler with Webpack
  • ๐ŸฆŠ Templating with EJS
  • ๐Ÿค– SEO metadata and Open Graph tags
  • โš™๏ธ JSON-LD for richer indexing
  • ๐Ÿ—บ Sitemap.xml
  • โš ๏ธ 404 page
  • ๐Ÿ“– Pagination
  • โœ… Cache busting
  • ๐Ÿ’ฏ Maximize lighthouse score
  • ๐ŸŒˆ Include a FREE minimalist blog theme
  • ๐Ÿ—’ Netlify CMS (optional)

Philosophy

  • Minimal code (HTML, CSS & JS). Add what you need
  • SEO-friendly
  • ๐Ÿš€ Production-ready

Requirements

  • Node.js and npm

Premium Themes (Eleventy Themes)

Blue Dark Eleventy Theme Blue Eclatant Eleventy Theme
Blue Dark Eleventy Theme premium Blue Eclatant Eleventy Theme premium
Blue Modern Eleventy Theme Blue Minimalist Eleventy Theme
Blue Modern Eleventy Theme premium Blue Minimalist Eleventy Theme premium

Getting started

Run the following command on your local environment:

git clone --depth=1 https://github.com/ixartz/Eleventy-Starter-Boilerplate.git my-project-name
cd my-project-name
npm install

Then, you can run locally in development mode with live reload:

npm run dev

Open http://localhost:8080 with your favorite browser to see your blog.

Project structure

.
โ”œโ”€โ”€ public             # Static files
โ”‚   โ””โ”€โ”€ assets
โ”‚       โ””โ”€โ”€ images     # Images not needed by Webpack
โ””โ”€โ”€ src
    โ”œโ”€โ”€ _data          # Eleventy data folder
    โ”œโ”€โ”€ _includes
    โ”‚   โ””โ”€โ”€ layouts    # HTML layout files
    โ”œโ”€โ”€ assets         # Assets folder that needs to be processed by Webpack
    โ”‚   โ”œโ”€โ”€ images
    โ”‚   โ”‚   โ””โ”€โ”€ posts  # Images used in your blog posts (will be compressed by Webpack)
    โ”‚   โ””โ”€โ”€ styles     # Your blog CSS files
    โ””โ”€โ”€ posts          # Your blog posts

Customization

You can easily configure Eleventy Starter Boilerplate. Please change the following file:

  • public/assets/images/logo.png: your blog logo
  • public/apple-touch-icon.png, public/favicon.ico, public/favicon-16x16.png and public/favicon-32x32.png: your blog favicon, you can generate from https://favicon.io/favicon-converter/
  • src/_data/site.json: your blog configuration
  • src/_includes/layouts: your blog HTML layout
  • src/assets/styles/main.css: your blog CSS file using Tailwind CSS

Deploy to production

You can see the results locally in production mode with:

npm run serve

The generated HTML and CSS files are minified. It will also removed unused CSS from Tailwind CSS.

You can create an optimized production build with:

npm run build

Now, your blog is ready to be deployed. All generated files are located at _site folder, which you can deploy with any hosting service.

Deploy to Netlify

Clone this repository on own GitHub account and deploy to Netlify:

Netlify Deploy button

Remove Netlify files and Netlify CMS

If you don't use Netlify, you can easily remove all Netlify related files:

  • public/admin, the entier folder
  • src/_includes/layouts/base.ejs, the loaded script netlify-identity-widget.js and the inline script if (window.netlifyIdentity) { ...
  • netlify.toml, the entire file

Contributions

Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.

License

Licensed under the MIT License, Copyright ยฉ 2020

See LICENSE for more information.


Made with โ™ฅ by CreativeDesignsGuru

Sponsor Next JS Boilerplate

eleventy-starter-boilerplate's People

Contributors

ixartz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eleventy-starter-boilerplate's Issues

Disable webp conversion in webpack (images not working on iOS)

The default webpack config will convert images to webp (but keep the file extension).
Webp is not a bad format in itself, but without further configuration to also have png fallbacks,
the images will break on iOS.

The usual flow with webp seems to be to detect the user agent or read Accept headers
and only serve webp to android/PC (or possibly use <picture> with multiple sources).

(In addition, my images grew with 5kB and 10kB when they were webp...)

Diff:

--- a/webpack.config.js
+++ b/webpack.config.js
@@ -76,10 +76,6 @@ module.exports = {
               gifsicle: {
                 interlaced: true,
               },
-              // the webp option will enable WEBP
-              webp: {
-                quality: 80,
-              },
             },
           },
         ],

How to change homepage?

I found this template via the Netlify and would be sooooooo excited about it except that it's making me feel like an idiot. I've worked mostly with PHP/Drupal the last ten years and am new to 11ty and ejs etc.

I want to make the current "home" page accessible via /blog url and create a custom page for home.

But all I can do is break it.

I keep getting Cannot GET / (even on localhost:8080) and can't figure out what causes it. It seems totally random.

I'm able to add a /contact page and can add it to the menu. But can't do that for /blog. Nor can I figure out how to replace the homepage with a custom page via an index.md file.

Any chance you could help me here?

How to add home and about page

I was roaming around the web in the search of a simple yet attractive blogging site with netlify cms . this site is all i want . I configured it according to me and it looks awesome.but i am facing one issue i want to add a home and about page to my site. How can i do so ? Thank you in advance!

.ejs over .nunjucks?

Was wondering if there was a specific reason for choosing .ejs of nunjucks? A lot of the eleventy plugins ( Reading time for example) are only available for nunjucks.

how does post.ejs work? how to create additional template files like that?

Sorry this question might not be specifically unique to this starter theme... I'm inexperienced with both 11ty and ejs and so I'm not sure which of those this question is most suited to.

How does post.ejs file get automatically used for pages in the src/posts directory? Can you explain how I can do that for other pages? Or could you point me to the part in the code where this is made?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.