diff --git a/.eleventy.js b/.eleventy.js index 2aa26fedc3..7fa4aa299d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -241,6 +241,14 @@ module.exports = function(eleventyConfig) { eleventyConfig.addFilter('rewriteIntegrationLinks', (str, integration) => { if (!str) return str; + // First pass: collect all actual anchor IDs from the HTML + const anchorIds = new Set(); + const anchorIdRegex = /id="([^"]+)"/g; + let anchorMatch; + while ((anchorMatch = anchorIdRegex.exec(str)) !== null) { + anchorIds.add(anchorMatch[1]); + } + // Convert relative links in README to absolute links const matcher = /((href|src)="([^"]*))"/g; let match; @@ -250,8 +258,24 @@ module.exports = function(eleventyConfig) { return fullMatch; } - // Skip pure anchors (same-page links) + // Handle same-page anchor links - try to fix broken anchors if (url.startsWith('#')) { + const targetAnchor = url.substring(1); + + // If the anchor doesn't exist, try to find a close match + if (!anchorIds.has(targetAnchor)) { + // Try to find anchors that match if we add periods back + // e.g., "migration-from-012-or-earlier" -> "migration-from-0.1.2-or-earlier" + for (const existingAnchor of anchorIds) { + // Remove all periods from existing anchor and compare + const normalizedExisting = existingAnchor.replace(/\./g, ''); + if (normalizedExisting === targetAnchor) { + // Found a match! Use the correct anchor + return `${attr}="#${existingAnchor}"`; + } + } + } + return fullMatch; } @@ -282,6 +306,7 @@ module.exports = function(eleventyConfig) { return result; }); + eleventyConfig.addFilter('duration', mins => { if (mins > 60) { const hrs = Math.floor(mins/60) diff --git a/src/blog/2026/01/opcua-vs-mqtt.md b/src/blog/2026/01/opcua-vs-mqtt.md index ae0e01d742..63407deb79 100644 --- a/src/blog/2026/01/opcua-vs-mqtt.md +++ b/src/blog/2026/01/opcua-vs-mqtt.md @@ -2,6 +2,7 @@ title: "MQTT vs OPC UA: Why This Question Never Has a Straight Answer" subtitle: "Why comparing MQTT and OPC UA is a category error, and how to choose based on requirements rather than marketing" description: "MQTT vs OPC UA isn't a real choice; they solve different problems. Learn when to use each protocol based on your actual requirements, not vendor marketing." +lastUpdated: 2026-01-24 date: 2026-01-21 authors: ["sumit-shinde"] image: /blog/2026/01/images/opcua-vs-mqtt.png @@ -62,7 +63,7 @@ MQTT is deliberately minimal. This simplicity at the transport layer enables its OPC UA (Unified Architecture) isn't primarily about moving data; it's about describing what data means, how it relates to other data, and what operations are valid. -Released in 2008, OPC UA replaced a fragmented collection of Windows-only industrial protocols with a platform-independent standard. Where MQTT is minimal, OPC UA is comprehensive. The specification spans 14 parts covering everything from information modeling to historical data access to alarm conditions. +Released in 2008, OPC UA replaced a fragmented collection of Windows-only industrial protocols with a platform-independent standard. Where MQTT is minimal, OPC UA is comprehensive. The specification spans 37 parts in the core specification covering everything from information modeling to historical data access to alarm conditions **At its core is the address space, a hierarchical graph of nodes:**