You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
6.5 KiB

2 years ago
  1. # Eleventy Starter Boilerplate
  2. <p align="center">
  3. <a href="https://creativedesignsguru.com/demo/Eleventy-Starter-Boilerplate/eleventy-starter-boilerplate-presentation/"><img src="public/assets/images/eleventy-js-starter-boilerplate.png?raw=true" alt="Eleventy starter banner"></a>
  4. </p>
  5. 🚀 Eleventy Starter Boilerplate is production-ready with SEO-friendly for quickly starting a blog. ⚡️ Built with [Eleventy](https://www.11ty.dev), [ESLint](https://eslint.org), [Prettier](https://prettier.io), [Webpack](https://webpack.js.org), [PostCSS](https://postcss.org), [Tailwind CSS](https://tailwindcss.com) and [Netlify CMS](https://www.netlifycms.org) (optional).
  6. Clone this project and use it to create your own [Eleventy](https://www.11ty.dev) blog. You can check a [Eleventy templates demo](https://creativedesignsguru.com/demo/Eleventy-Starter-Boilerplate/eleventy-starter-boilerplate-presentation/).
  7. ### Features
  8. Production-ready in mind:
  9. - 🔥 [11ty](https://www.11ty.dev) for Static Site Generator
  10. - 🎨 Integrate with [Tailwind CSS](https://tailwindcss.com) (with [PurgeCSS](https://purgecss.com), remove unused CSS)
  11. - 💅 [PostCSS](https://postcss.org) for processing [Tailwind CSS](https://tailwindcss.com)
  12. - ⚡️ Lazy load images with [lazysizes](https://github.com/aFarkas/lazysizes)
  13. - ✨ Compress image with [Imagemin](https://github.com/imagemin/imagemin)
  14. - 🎈 Syntax Highlighting with [Prism.js](https://prismjs.com)
  15. - ☕ Minify HTML & CSS with [HTMLMinifier](https://www.npmjs.com/package/html-minifier) and [cssnano](https://cssnano.co)
  16. - ✏️ Linter with [ESLint](https://eslint.org)
  17. - 🛠 Code Formatter with [Prettier](https://prettier.io)
  18. - 💨 Live reload
  19. - 📦 Module Bundler with [Webpack](https://webpack.js.org)
  20. - 🦊 Templating with [EJS](https://ejs.co)
  21. - 🤖 SEO metadata and [Open Graph](https://ogp.me/) tags
  22. - ⚙️ [JSON-LD](https://developers.google.com/search/docs/guides/intro-structured-data) for richer indexing
  23. - 🗺 Sitemap.xml
  24. - ⚠️ 404 page
  25. - 📖 Pagination
  26. - ✅ Cache busting
  27. - 💯 Maximize lighthouse score
  28. - 🌈 Include a FREE minimalist blog theme
  29. - 🗒 Netlify CMS (optional)
  30. ### Philosophy
  31. - Minimal code (HTML, CSS & JS). Add what you need
  32. - SEO-friendly
  33. - 🚀 Production-ready
  34. ### Requirements
  35. - Node.js and npm
  36. ### Premium Themes ([Eleventy Themes](https://creativedesignsguru.com/category/eleventy/))
  37. | [Blue Dark Eleventy Theme](https://creativedesignsguru.com/blue-dark-eleventy-theme/) | [Blue Eclatant Eleventy Theme](https://creativedesignsguru.com/blue-eclatant-eleventy-theme/) |
  38. | --- | --- |
  39. | [![Blue Dark Eleventy Theme premium](https://creativedesignsguru.com/assets/images/themes/blue-dark-mode-eleventy-theme-homepage-xs.png)](https://creativedesignsguru.com/blue-dark-eleventy-theme/) | [![Blue Eclatant Eleventy Theme premium](https://creativedesignsguru.com/assets/images/themes/eclatant-blue-eleventy-theme-homepage-xs.png)](https://creativedesignsguru.com/blue-eclatant-eleventy-theme/) |
  40. | [Blue Modern Eleventy Theme](https://creativedesignsguru.com/blue-modern-eleventy-theme/) | [Blue Minimalist Eleventy Theme](https://creativedesignsguru.com/blue-minimalist-eleventy-theme/) |
  41. | --- | --- |
  42. | [![Blue Modern Eleventy Theme premium](https://creativedesignsguru.com/assets/images/themes/modern-blue-eleventy-theme-homepage-xs.png)](https://creativedesignsguru.com/blue-modern-eleventy-theme/) | [![Blue Minimalist Eleventy Theme premium](https://creativedesignsguru.com/assets/images/themes/minimalist-blue-eleventy-theme-homepage-xs.png)](https://creativedesignsguru.com/blue-minimalist-eleventy-theme/) |
  43. ### Getting started
  44. Run the following command on your local environment:
  45. ```
  46. git clone --depth=1 https://github.com/ixartz/Eleventy-Starter-Boilerplate.git my-project-name
  47. cd my-project-name
  48. npm install
  49. ```
  50. Then, you can run locally in development mode with live reload:
  51. ```
  52. npm run dev
  53. ```
  54. Open http://localhost:8080 with your favorite browser to see your blog.
  55. ### Project structure
  56. ```
  57. .
  58. ├── public # Static files
  59. │ └── assets
  60. │ └── images # Images not needed by Webpack
  61. └── src
  62. ├── _data # Eleventy data folder
  63. ├── _includes
  64. │ └── layouts # HTML layout files
  65. ├── assets # Assets folder that needs to be processed by Webpack
  66. │ ├── images
  67. │ │ └── posts # Images used in your blog posts (will be compressed by Webpack)
  68. │ └── styles # Your blog CSS files
  69. └── posts # Your blog posts
  70. ```
  71. ### Customization
  72. You can easily configure Eleventy Starter Boilerplate. Please change the following file:
  73. - `public/assets/images/logo.png`: your blog logo
  74. - `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/
  75. - `src/_data/site.json`: your blog configuration
  76. - `src/_includes/layouts`: your blog HTML layout
  77. - `src/assets/styles/main.css`: your blog CSS file using Tailwind CSS
  78. ### Deploy to production
  79. You can see the results locally in production mode with:
  80. ```
  81. npm run serve
  82. ```
  83. The generated HTML and CSS files are minified. It will also removed unused CSS from [Tailwind CSS](https://tailwindcss.com).
  84. You can create an optimized production build with:
  85. ```
  86. npm run build
  87. ```
  88. Now, your blog is ready to be deployed. All generated files are located at `_site` folder, which you can deploy with any hosting service.
  89. ### Deploy to Netlify
  90. Clone this repository on own GitHub account and deploy to Netlify:
  91. [![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/ixartz/Eleventy-Starter-Boilerplate&stack=cms)
  92. ### Remove Netlify files and Netlify CMS
  93. If you don't use Netlify, you can easily remove all Netlify related files:
  94. - `public/admin`, the entier folder
  95. - `src/_includes/layouts/base.ejs`, the loaded script `netlify-identity-widget.js` and the inline script `if (window.netlifyIdentity) { ...`
  96. - `netlify.toml`, the entire file
  97. ### Contributions
  98. Everyone is welcome to contribute to this project. Feel free to open an issue if you have question or found a bug.
  99. ### License
  100. Licensed under the MIT License, Copyright © 2020
  101. See [LICENSE](LICENSE) for more information.
  102. ---
  103. Made with ♥ by [CreativeDesignsGuru](https://creativedesignsguru.com)
  104. [![Sponsor Next JS Boilerplate](https://cdn.buymeacoffee.com/buttons/default-red.png)](https://www.buymeacoffee.com/ixartz)