GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - InPoint-Automation/HreflangAutoLinker: A Publii plugin that manages hreflang tags across a pair of multilingual sites for pages, posts, and tags

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
Third Party Licenses/sql.js
Third Party Licenses/sql.js
 
 
options
options
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
DEV.md
DEV.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
main.js
main.js
 
 
plugin.json
plugin.json
 
 
screenshot.png
screenshot.png
 
 
thumbnail.svg
thumbnail.svg
 
 

Repository files navigation

Hreflang Auto-Linker

Icon

Description

Hreflang Auto-Linker is a Publii plugin that manages hreflang tags across a pair of multilingual sites. It pairs your posts, pages, and tags with their equivalents on another copy of the site through a central mapping UI, then injects the correct <link rel="alternate" hreflang="..."> tags into every page at build time and sets the page's <html lang="..."> attribute. Works for any two-language site pair.

Features

  • Injects <link rel="alternate" hreflang="..."> tags for posts, pages, and tags
  • Sets <html lang="..."> from the configured site language
  • Mapping UI to pair local content with partner-site content - reads the partner site database directly
  • Validates all published content and logs any unmapped items
  • Configurable this-site language, partner site directory, partner language, and partner base URL

Requirements

Publii 0.46.0 or newer.

Installation

  1. Download the release ZIP.
  2. Publii -> Tools -> Plugins -> Install plugin -> pick the ZIP.
  3. Enable the plugin for the site.

Usage

Open Plugins -> Hreflang Auto-Linker -> settings icon and fill in this site's language code, the partner site's directory name, its language code, and its base URL. Choose which site x-default points to. Then open the mapping UI to pair each local post/page/tag with its partner-site equivalent and save. Tags are injected on the next site render.

[!IMPORTANT] Repeat this process and configure the plugin with opposing settings from the other site as well or these links will not be bidirectional.

screenshot

Contributing

Feel free to fork this project or contribute a PR. Build instructions can be found in the developer readme DEV.md.

Licenses

Main code

This project is licensed under the GPLv3+. See LICENSE file for details.

Third-Party Components

The rendered site output (main.js) is self-contained plain JavaScript with no dependencies. The mapping UI bundles one library:

Bundled assets

  • sql.js - MIT License - reads the partner site's SQLite database in the mapping UI. Full text: Third Party Licenses/sql.js

Credits

This project was developed by InPoint Automation Sp. z o.o. https://inpointautomation.com/

Thanks to the Publii project for the CMS and plugin API.

Changelog

See CHANGELOG.md for the full version history.

About

A Publii plugin that manages hreflang tags across a pair of multilingual sites for pages, posts, and tags

Topics

publiipublii-plugin

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.