Practical Hexo: A Hands-On Introduction to Building Blogs Using the Hexo Framework
Book information
Description
Leverage the power of Hexo to quickly produce static blog sites that are efficient and fast. This project-oriented book simplifies the process of setting up Hexo and manipulating content, using little more than a text editor and free software. It will equip you with a starting toolset that you can use to develop future projects, incorporate into your existing workflow and allow you to take your websites to the next level. Hexo is based on JavaScript and Node.js, two of the biggest tools available for developers: you can enhance, extend, and configure Hexo as requirements dictate. With Hexo the art of possible is only limited by the extent of your imagination and the power of JavaScript and Node.js. Practical Hexo gets you quickly acquainted with creating and manipulating blogs using a static site generator approach. You will understand how to use the Hexo framework to rapidly create and deploy blogs that are performant, with the minimum of fuss, then extend and customize your content using plugins and themes. You will work through some practical projects to help solidify your skills, and put them into practice. What You'll Learn Implement the Hexo framework in a projectCustomize and extend contentConsider maintenance requirements and how they compare to other blog systemsApply skills to practical, real-world projectsCreate themes and build pluginsMake changes using other tools and libraries. Who This Book Is For Website developers who are already familiar with JavaScript and keen to learn how to leverage the Hexo framework. Agile development team members, where time is of the essence to deliver results quickly. Developers who want to focus on simplicity, to produce efficient and properly optimized content in modern browsers using tools already in their possession. Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Getting Started So, what’s new…? Introducing Hexo Some housekeeping tasks Getting the dependencies installed Installing Hexo Creating our first example blog Exploring the changes in detail Understanding how Hexo operates Breaking apart the folder structure The _config.yml file Using an alternative configuration file Overriding a theme configuration The package.json file Changing our configuration Changing the URL of our blog Exploring our code changes in detail Summary Chapter 2: Manipulating Content and Media Understanding how content is stored Creating written content Breaking apart our changes Setting the front matter content Adding text to posts Dissecting the changes made Adding excerpts Adding media content Improving image coverage Breaking apart the changes Linking to external content Breaking apart the code Managing content Breaking apart our code Tagging content Processing and previewing content Making assumptions Breaking apart the changes “But there’s more…” Summary Chapter 3: Creating Themes Changing themes Exploring theme file structure Creating our first theme Breaking apart the changes Constructing theme files Understanding what happened Using variables in Hexo Adding navigation Understanding the changes Using permalinks Summary Chapter 4: Developing Themes Adding comments Understanding what happened Adding widgets Understanding the code in detail Adding a sitemap Breaking apart the changes Applying styles Testing our theme Publishing themes online Where next? Summary Chapter 5: Working with the API But…when is a plugin not a plugin? Exploring what is available in Hexo Making use of Hexo helpers Creating a custom helper Breaking apart the code Creating tag snippets Understanding the code in detail Taking into account tag plugins Adding content through generators Breaking apart the code Taking things further Digging deeper into the API The pitfalls of using these API methods Putting a task runner to use Watching for changes Compiling Sass code with Hexo Understanding how our code works Summary Chapter 6: Building Plugins When is a plugin not a plugin: Revisited Understanding the architecture of a plugin Using existing tools to accelerate development Writing our first plugin Dissecting the code Implementing the WebP format as a plugin Building our plugin Understanding the code Publishing our plugins online Taking it further: Setting up a website Summary Chapter 7: Deployment and Publishing Understanding the deployment process Tidying up our content Choosing a host Uploading content Understanding the changes Testing our code with Travis CI Breaking apart the code Completing the deployment Automating the process Understanding the changes Reviewing GitHub deployer Making your content live Assigning a domain name Enforcing HTTPS encryption Summary Chapter 8: Improving Our Workflow and Blog Making a start Making changes to our blog Adding a favicon Breaking apart the changes Refreshing the screen Lazy loading images Understanding the changes Improving front matter Adding thumbnails to post summaries Understanding the code changes Adding meta tags Exploring the changes in detail Making changes to our workflow Making use of Autoprefixer Understanding how our code works Using this plugin: An epilogue Improving SEO Breaking apart the changes made Implementing a 404 redirect Understanding the changes Summary Chapter 9: Localizing Content Setting the background Sourcing the data Breaking apart the changes Architecting language support Adding support to the theme Understanding what happened Testing the changes Understanding the impact of our changes Making support more consistent Breaking apart the code Allowing for RTL languages Adding in Arabic support Understanding how our code works Summary Chapter 10: Creating an eCommerce Site Setting the scene Getting prepared Setting up the base site Understanding what happened Building the gallery Breaking apart the code Creating the product page and content Exploring the code in detail Adding supplementary pages Working through the code Adding Snipcart Publishing to GitLab Understanding the changes Comparing architecture Taking things further: Where next? Summary Chapter 11: Migrating to Hexo Understanding the migration process Options available for migrating content Housekeeping Setting up our new blog Migrating from WordPress Understanding the limits Using the Migrator API Summary Index
Similar books
Developing Web Components with Svelte: Building a Library of Reusable Ui Components, 2nd Edition
2025 · PDF
Developing Web Components with Svelte : Building a Library of Reusable UI Components
2025 · EPUB
Practical Next.js for E-Commerce: Create E-Commerce Sites with the Next.js Framework
2023 · PDF
Introducing the HTML5 Web Speech API: Your Practical Introduction to Adding Browser-Based Speech Capabilities to your Websites and Online Applications
2020 · PDF
Beginning Shadow DOM API: Get Up and Running with Shadow DOM for Web Applications
2024 · PDF
Beginning Shadow DOM API : Get Up and Running with Shadow DOM for Web Applications
2024 · EPUB
Beginning Shadow DOM API
2024 · PDF
Beginning Eleventy: A Practical Introduction to the Eleventy Static Site Generator
2022 · PDF