Beginning Eleventy: A Practical Introduction to the Eleventy Static Site Generator
- Length: 359 pages
- Edition: 1
- Language: English
- Publisher: Apress
- Publication Date: 2022-10-26
- ISBN-10: 1484283147
- ISBN-13: 9781484283141
- Sales Rank: #5280334 (See Top 100 Books)
Leverage the power of Eleventy to quickly produce static sites that are efficient and fast. This project-oriented book simplifies the process of setting up Eleventy and manipulating content, using little more than a text editor or free software.
It will equip you with a starting tool set that you can use to develop future projects or incorporate into your existing workflow. More importantly, you’ll take websites to the next level, reducing the reliance on tools that are bloated, prone to being hacked and not the most efficient. Beginning Eleventy is an excellent resource for getting acquainted with creating and manipulating blogs using a static site generator approach. It takes the view that you don’t have to create something complex and unwieldy; you can build something quickly, then extend it using the power of the API and plugins over time, without sacrificing speed or features.
What You’ll Learn:
- Implement the Eleventy framework in a project
- Explore some of the options for customizing content using the framework
- Gain an appreciation of pointers around maintenance requirements, and how this might compare to other blog systems
- Work through some example projects, to help build up a working blog from standalone demos to implementing with other tools or libraries
This Book Is For?
- Website developers who are already familiar with JavaScript, who are looking for a fast and simple framework to deliver high quality results fast
- Developers who are looking to leverage the Eleventy framework to quickly create an online blog using little more than a text editor, producing optimized content in modern browsers using tools they will already have
- Those in agile development teams, where time is of the essence and need to deliver high quality results quickly
Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Introducing Eleventy What Makes Eleventy So Appealling? Introducing Our Project Implementing a Development Environment Implementing Our First Example Breaking Apart the Code Understanding Eleventy Concepts Layouts and Templates Using Filters and Shortcodes Collections Custom Data Pagination The Eleventy Configuration File Performing Some Additional Changes Summary Chapter 2: Creating Structure Exploring the Site Structure Creating Pages and Blog Posts Breaking Apart the Code Adding Pagination Setting Up Paginating for the Post Index Reviewing the Code Changes Adding Pagination Links to Posts Understanding the Changes Implementing a Site Navigation Understanding the Code Changes Configuring Links Using Permalinks Summary Chapter 3: Sourcing Data Implement Sourcing from Markdown Files Why Is Data Crucial in Eleventy? Understanding the Process for Consuming Data Exploring the Options Available Adding Site Metadata Exploring the Code Changes What About Other Data? Fetching from an External Source Exploring the Changes Sourcing from a Third-Party CMS Setting Up the Data Breaking Apart the Code Retrieving Data from DatoCMS Understanding What Happened Caching Data Exploring the Code Summary Chapter 4: Creating Templates Understanding How Templates Work in Eleventy Creating Layouts for Our Site Building the Base Template Breaking Apart the Code Choosing the Right Tools Updating Content Pages Understanding the Code Changes Updating the Post Layout Breaking Apart the Changes Updating the Rest of the Site Setting Up a Site Map Exploring the Changes Made Adding RSS Feeds Understanding What Happened Handling Invalid URLs Exploring the Changes Made Summary Chapter 5: Configuring Options Exploring What Is Available Creating Shortcodes Breaking Apart the Code Tagging Content Exploring the Code Changes Counting Pages Exploring the Code in Detail Responding to Events Understanding What Happened Watching the Changes Understanding What Happened A Small Thought Overriding BrowserSync Launching a Script Automatically Breaking Apart the Code Summary Chapter 6: Styling the Site and Content Making Improvements Adding Images Understanding What Happened Adding Support for Styles Exploring What Happened Styling the Site Sourcing from a CSS Library Breaking Apart the Code Using a CSS Preprocessor Dissecting the Code Automating the Process Exploring the Changes Summary Chapter 7: Creating Plugins Why Use a Plugin? Understanding the Architecture Putting Some Examples to Use Lazy-Loading Images Breaking Apart the Code Adding Reading Time Dissecting the Demo Creating a Simple Plugin Understanding What Happened Testing the Plugin Locally Understanding the Code Changes Publishing to a GitHub Site Publishing to npm Understanding What Happened Summary Chapter 8: Internationalizing the Site Setting the Background Exploring Options Some Housekeeping Creating a Strategy Setting the Locale Understanding the Changes Made Localizing Dates Understanding What Happened Localizing Layouts Exploring the Changes Localizing the Header Breaking Apart the Changes Summary Chapter 9: Localizing the Content Localizing Blog Content Breaking Apart the Code Changes Updating Post Tagging Updating the English Version Breaking Apart the Code Dealing with French Content Understanding the Changes Separating Content into Localized Collections Exploring the Changes Made Updating the Index Page Understanding the Changes Made Adding a Language Switcher Summary Chapter 10: Polishing the Site Exploring Options Tidying Up the Code Examining the Code Changes Adding Extra Features Reviewing the Code Changes Testing the Site with Cypress Understanding the Changes Assessing Performance Breaking Apart the Code Looking to the Future Summary Chapter 11: Deployment and Publishing Understanding the Deployment Process Laying the Foundations Setting Up a GitHub Pages Account Deploying the Site to GitHub Understanding the Changes Made Tidying Up the Release Understanding What Happened Adding a Domain Name Breaking Apart the Code Changes Summary Index
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/Apress
2. In the Find a repository… box, search the book title: Beginning Eleventy: A Practical Introduction to the Eleventy Static Site Generator
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.