Explore More Passive Income Ideas

Posts

Language-Aware Navigation Menus in Jekyll

Why Multilingual Navigation Matters When building a multilingual Jekyll site, maintaining separate navigation menus for each language manually is inefficient and error-prone. To create a better user experience and simplify content management, we can use data-driven navigation with language-specific YAML files and modular Liquid includes. Step 1: Structure Your Language Folders For each supported language, create a corresponding folder in the root of your site (e.g. /en , /fr , /de ). Within each folder, include an index.md file and other localized content. This folder structure allows you to route users correctly and serve language-appropriate navigation. Step 2: Create YAML Data Files for Menus Inside your _data directory, create a subfolder called menus and place one YAML file for each language, such as: _data/menus/en.yml _data/menus/fr.yml _data/menus/de.yml Sample en.yml - title: "Home" url: "/en/" - title: "Blog" ...
Recent posts

Smart Multilingual 404 Pages in Jekyll

Why Localized 404 Pages Matter Standard 404 pages serve a purpose: to notify users that the page they're looking for no longer exists. But for multilingual Jekyll sites, a generic 404 page in one language can confuse users browsing in another. Creating localized, intelligent 404 pages improves user experience, reduces bounce rate, and strengthens the credibility of your brand internationally. Step 1: Set Up a Global 404 Page Template Start by creating a 404.html file in the root of your Jekyll site. This file will use Liquid logic to detect the user’s preferred language and redirect or render accordingly. Basic 404 Structure --- layout: default permalink: /404.html --- <script> const supportedLangs = ['en', 'es', 'fr', 'de', 'jp']; const userLang = (navigator.language || navigator.userLanguage).substring(0, 2); const matchedLang = supportedLangs.includes(userLang) ? userLang : 'en'; const redirectURL = `/...

Localized Navigation Menus with YAML Data in Jekyll

Why You Need Language-Aware Menus When building a multilingual site in Jekyll, your navigation menus need to reflect the current language context. A user browsing the French version of your site should not see English labels or links pointing to English pages. Instead of duplicating navigation code across each layout, the smarter approach is to centralize the structure using YAML data files. Step 1: Create a Navigation YAML File Inside your _data folder, create a file named navigation.yml . Define language-specific navigation entries: en: - title: "Home" url: "/en/" - title: "About" url: "/en/about/" - title: "Docs" url: "/en/docs/" fr: - title: "Accueil" url: "/fr/" - title: "À propos" url: "/fr/about/" - title: "Documentation" url: "/fr/docs/" This keeps all navigation logic in one file, making it easy to maintain a...

Client Filtering for Multilingual Jekyll Content

Why Client-Side Filtering is Essential for UX Static sites often lack the dynamic interactivity users expect, especially when handling complex documentation or blog archives. Adding filtering capabilities on the client side provides instant feedback, speeds up discovery, and gives your multilingual Jekyll site a modern, app-like experience. This guide shows how to implement live filtering for multilingual content using HTML, JavaScript, and Jekyll’s built-in data structure. Step 1: Prepare a Structured Content Block Create a content section with clear language and category tags. Here's a simplified format in your HTML: <div id="filter-controls"> <select id="language-filter"> <option value="all">All Languages</option> <option value="en">English</option> <option value="es">Spanish</option> <option value="fr">French</option> </sele...

Highlight Search Terms in Multilingual Jekyll

Why Highlighting Matters in Search UX When users land on a page after searching, they often need to visually locate where their search keywords appear. This becomes especially important in long-form documentation or blogs. By automatically highlighting those terms, you improve usability, reduce bounce rate, and guide users directly to the content they care about. For multilingual sites, this requires extra care — search terms may appear in different languages, and the highlights must respect the page’s language context. Step 1: Pass Search Terms via URL When users perform a search (e.g., using Lunr.js or Simple-Jekyll-Search), include the search query in the resulting URL. This is often done like this: https://example.com/docs/page.html?q=installation Or for multilingual: https://example.com/es/guias/instalacion?q=instalación This lets the destination page know what word to highlight dynamically using JavaScript. Step 2: Add a Highlight Script Include Create an ...

Alternate Language URLs and Hreflang for Jekyll SEO

Why Alternate Language URLs Matter for SEO When you offer the same content in multiple languages, search engines must understand which version to show to which user. Mismanaging this can cause duplicate content issues, indexing of the wrong version, or missed opportunities in international search rankings. To address this, you should implement a robust system of alternate language URLs using structured routing and the HTML hreflang tag in your Jekyll site. Step 1: Define Language-Specific URLs The best practice is to have separate URLs for each language version. For example: /en/guide/getting-started/ – English version /es/guide/getting-started/ – Spanish version /fr/guide/getting-started/ – French version This ensures each language is treated as a unique document by Google, which is essential for proper indexing and ranking. Configure Permalinks in Front Matter Inside your content file, define a language-specific permalink: lang: en permalink: /en/gu...

Multilingual Search Indexes with Lunrjs in Jekyll

Why Per-Language Search is Important When managing a multilingual Jekyll site, it's not enough to offer translation — your search function must also understand language boundaries. Without separation, users searching in Japanese might get results in Portuguese, degrading the experience. With Lunr.js, you can build client-side search indexes tailored to each language, ensuring relevant results and faster response times. Step 1: Install Lunr.js and Multilingual Plugins First, include the Lunr.js core library in your site’s assets: /assets/js/lunr.min.js Then include language support plugins for each language you plan to index (e.g., lunr.stemmer.support.js , lunr.jp.js , lunr.pt.js ). Example Include: <script src="/assets/js/lunr.min.js"></script> <script src="/assets/js/lunr.stemmer.support.js"></script> <script src="/assets/js/lunr.jp.js"></script> <script src="/assets/js/lunr.pt.js"...

Archives / All Content


© Zest Link Run . All rights reserved.