From 773e9d930f5cf184d13a8df5905c7e1a3a36bf52 Mon Sep 17 00:00:00 2001 From: Jenny-Jiani <70129215+Jenny-Jiani@users.noreply.github.com> Date: Tue, 24 Feb 2026 13:12:04 +0800 Subject: [PATCH 1/4] Create license_seo_overrides.yml --- _data/license_seo_overrides.yml | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 _data/license_seo_overrides.yml diff --git a/_data/license_seo_overrides.yml b/_data/license_seo_overrides.yml new file mode 100644 index 0000000..987b7cd --- /dev/null +++ b/_data/license_seo_overrides.yml @@ -0,0 +1,63 @@ +mrz_license: + index: + title: "MRZ Scanner Licensing Guide – Tracking, Offline Setup & Errors" + description: "Dynamsoft MRZ Scanner licensing guide covering offline activation, runtime quota expansion, hardware binding, usage tracking, free trials, and license error troubleshooting." + dbr-free-trial: + title: "What I need to know about MRZ Scanner SDK trial licenses?" + description: "Guide to obtaining and extending an MRZ Scanner SDK trial license, including extension limits and evaluation duration details." + ensure-no-overuse: + title: "MRZ Scanner Concurrent Instance License Configuration Guide" + description: "Understand how to use concurrent instance licenses in Dynamsoft MRZ Scanner and avoid exceeding device instance limits." + expand-quota-for-runtime-license: + title: "How to Expand Runtime MRZ SCanner License Quota | Dynamsoft FAQ" + description: "Step-by-step guide to expanding a Dynamsoft MRZ Scanner runtime license quota before expiration using the portal or support-assisted purchase." + how-hardware-is-bind-to-license: + title: "MRZ Scanner SDK Licensing Process Explained" + description: "Guide to MRZ Scanner licensing process, explaining device registration, UUID generation, and how OS modifications affect license allocation." + how-license-tracking-works: + title: "MRZ Scanner SDK License Tracking" + description: "Learn how license tracking works in Dynamsoft MRZ Scanner across Per Scan, Per Device, and Per Concurrent Device licensing models." + new-license-required-per-device-licensing: + title: "MRZ Scanner License Seat Usage Explained" + description: "Understand when a per-device MRZ scnner SDK license takes a new seat, such as using another browser, clearing indexedDB, or opening Incognito mode." + offline-registration-license: + title: "How to Use Offline Registration License in MRZ Scanner SDK" + description: "Complete instructions for Dynamsoft offline license registration, covering UUID tools, manual device activation, and code integration across SDK platforms." + sdk-works-without-internet: + title: "Can MRZ Scanner SDK work without internet connection?" + description: "Can MRZ Scanner SDK work offline? Learn how self-hosted licensing enables MRZ scanning without internet and when a network connection is required." + track-license: + title: "How to track the number of devices for MRZ Scanner SDK?" + description: "Discover how Dynamsoft MRZ Scanner license servers monitor device usage, including IndexedDB tracking for browsers and UUID-based device identification." + +dbr_license: + index: + title: "Barcode Reader Licensing Guide – Activation, Tracking & Errors" + description: "Dynamsoft Barcode Reader licensing guide covering offline activation, quota expansion, hardware binding, license tracking, free trials, and error troubleshooting." + dbr-free-trial: + title: "What I need to know about Barcode Reader SDK trial licenses?" + description: "Get started with a Barcode Reader trial license and extend your evaluation period for up to 30 days." + ensure-no-overuse: + title: "Barcode Reader Concurrent Instance License Setup Guide" + description: "Understand how to manage concurrent instance licenses in Dynamsoft Barcode Reader using SetMaxConcurrentInstanceCount and MaxParallelTasks settings." + expand-quota-for-runtime-license: + title: "How to Expand Runtime Barcode Scanner License Quota | Dynamsoft FAQ" + description: "Step-by-step guide to adding quota to a Dynamsoft Barcode Reader runtime license using the customer portal or a support-issued quote." + how-hardware-is-bind-to-license: + title: "Barcode Reader SDK Licensing Process Explained" + description: "Learn how the DBR licensing process generates a device UUID and how OS upgrades or downgrades affect license usage." + how-license-tracking-works: + title: "Dynamsoft Barcode Reader License Tracking" + description: "Learn how license tracking works for Dynamsoft Barcode Reader, including Per Scan, Per Device, and Per Concurrent Device licensing models." + new-license-required-per-device-licensing: + title: "Barcode Scanner License Seat Usage Explained" + description: "Guide to per-device licensing behavior in Barcode Reader, explaining how browser storage and indexedDB resets affect license allocation." + offline-registration-license: + title: "How to Use Offline Registration License in Barcode Scanner SDK" + description: "Learn how to register and activate a Dynamsoft license offline using the UUID tool and authorization string setup across platforms." + sdk-works-without-internet: + title: "Can Dynamsoft Barcode Reader SDK work without internet connection?" + description: "Can Dynamsoft Barcode Reader SDK work offline? Learn how self-hosted licensing enables barcode scanning without internet and when network access is required." + track-license: + title: "How to track the number of devices for Barcode Reader SDK?" + description: "Discover how Dynamsoft hosted and self-hosted license servers monitor device counts in JavaScript and native SDK environments." From a976081b59d9ef6f655e73cf504ead995249fe53 Mon Sep 17 00:00:00 2001 From: Jenny-Jiani <70129215+Jenny-Jiani@users.noreply.github.com> Date: Fri, 27 Feb 2026 17:10:17 +0800 Subject: [PATCH 2/4] Create path_reference_alias.rb --- _plugins/path_reference_alias.rb | 77 ++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 _plugins/path_reference_alias.rb diff --git a/_plugins/path_reference_alias.rb b/_plugins/path_reference_alias.rb new file mode 100644 index 0000000..5ddde2a --- /dev/null +++ b/_plugins/path_reference_alias.rb @@ -0,0 +1,77 @@ +module Jekyll + class PathReferenceAliasPage < Page + def initialize(site, source_dir, source_name, alias_dir) + @site = site + @base = site.source + @dir = alias_dir + @name = source_name + + process(@name) + read_yaml(File.join(@base, source_dir), @name) + end + end + + class PathReferenceAliasGenerator < Generator + safe true + priority :low + + def generate(site) + placeholder_files = detect_placeholders(site) + return if placeholder_files.empty? + + placeholder_paths = placeholder_files.map { |item| item[:relative_path] } + site.static_files.reject! { |file| placeholder_paths.include?(file.relative_path) } + + placeholder_files.each do |item| + create_alias_pages(site, item) + end + end + + private + + def detect_placeholders(site) + site.static_files.filter_map do |file| + next unless File.extname(file.relative_path).empty? + + file_path = File.join(site.source, file.relative_path) + next unless File.file?(file_path) + + raw = File.read(file_path, encoding: 'UTF-8').strip + next if raw.empty? + next unless raw.start_with?('./', '../') + + placeholder_dir = File.dirname(file.relative_path) + target_dir = File.expand_path(raw, File.join(site.source, placeholder_dir)) + source_root = File.expand_path(site.source) + + next unless target_dir.start_with?(source_root + File::SEPARATOR) + next unless Dir.exist?(target_dir) + + { + relative_path: file.relative_path, + placeholder_dir: placeholder_dir, + placeholder_name: File.basename(file.relative_path), + target_dir: target_dir + } + end + end + + def create_alias_pages(site, placeholder) + alias_root = File.join(placeholder[:placeholder_dir], placeholder[:placeholder_name]).tr('\\', '/') + source_root = File.expand_path(site.source) + + Dir.glob(File.join(placeholder[:target_dir], '**', '*.md')).sort.each do |source_file| + source_dir = File.dirname(source_file) + source_name = File.basename(source_file) + + source_rel_dir = source_dir.sub(/^#{Regexp.escape(source_root)}[\\\/]?/, '').tr('\\', '/') + alias_rel_dir = source_rel_dir.sub(/^#{Regexp.escape(placeholder[:target_dir].sub(/^#{Regexp.escape(source_root)}[\\\/]?/, '').tr('\\', '/'))}/, '').sub(%r{^/}, '') + + alias_dir = alias_root + alias_dir = File.join(alias_root, alias_rel_dir).tr('\\', '/') unless alias_rel_dir.empty? + + site.pages << PathReferenceAliasPage.new(site, source_rel_dir, source_name, alias_dir) + end + end + end +end From b581d86c3f27f4a1d4966d100ee1611c76b7f12c Mon Sep 17 00:00:00 2001 From: Jenny-Jiani <70129215+Jenny-Jiani@users.noreply.github.com> Date: Sat, 28 Feb 2026 09:51:20 +0800 Subject: [PATCH 3/4] update title & description --- _data/license_seo_overrides.yml | 16 ++++++++++++++-- .../general/avoid-incorrect-barcode-results.md | 4 ++-- .../general/avoid-incorrect-results.md | 2 +- barcode-reader/general/check-current-version.md | 4 ++-- .../configuration/avoid-incorrect-results.md | 2 +- .../web/capabilities/adaptive-wasm-loading.md | 2 +- .../what-is-in-the-dist-folder-of-dbr.md | 2 +- .../avoid-incorrect-barcode-results.md | 4 ++-- .../web/debug/check-current-version.md | 4 ++-- barcode-reader/web/debug/debug-mode.md | 4 ++-- barcode-reader/web/debug/resolve-magic-word.md | 4 ++-- mrz-scanner/general/index.md | 2 +- mrz-scanner/index.md | 2 +- 13 files changed, 32 insertions(+), 20 deletions(-) diff --git a/_data/license_seo_overrides.yml b/_data/license_seo_overrides.yml index 987b7cd..dbab7ad 100644 --- a/_data/license_seo_overrides.yml +++ b/_data/license_seo_overrides.yml @@ -5,11 +5,14 @@ mrz_license: dbr-free-trial: title: "What I need to know about MRZ Scanner SDK trial licenses?" description: "Guide to obtaining and extending an MRZ Scanner SDK trial license, including extension limits and evaluation duration details." + enable-supported-barcode-format: + title: "Fix \"[xxx] No license found\" Error for MRZ Scanner SDK" + description: "Resolve the \"No license found\" error by enabling only the barcode formats supported by your MRZ scanner SDK license." ensure-no-overuse: title: "MRZ Scanner Concurrent Instance License Configuration Guide" description: "Understand how to use concurrent instance licenses in Dynamsoft MRZ Scanner and avoid exceeding device instance limits." expand-quota-for-runtime-license: - title: "How to Expand Runtime MRZ SCanner License Quota | Dynamsoft FAQ" + title: "How to Expand Runtime MRZ Scanner License Quota | Dynamsoft FAQ" description: "Step-by-step guide to expanding a Dynamsoft MRZ Scanner runtime license quota before expiration using the portal or support-assisted purchase." how-hardware-is-bind-to-license: title: "MRZ Scanner SDK Licensing Process Explained" @@ -19,7 +22,7 @@ mrz_license: description: "Learn how license tracking works in Dynamsoft MRZ Scanner across Per Scan, Per Device, and Per Concurrent Device licensing models." new-license-required-per-device-licensing: title: "MRZ Scanner License Seat Usage Explained" - description: "Understand when a per-device MRZ scnner SDK license takes a new seat, such as using another browser, clearing indexedDB, or opening Incognito mode." + description: "Understand when a per-device MRZ scanner SDK license takes a new seat, such as using another browser, clearing indexedDB, or opening Incognito mode." offline-registration-license: title: "How to Use Offline Registration License in MRZ Scanner SDK" description: "Complete instructions for Dynamsoft offline license registration, covering UUID tools, manual device activation, and code integration across SDK platforms." @@ -29,6 +32,9 @@ mrz_license: track-license: title: "How to track the number of devices for MRZ Scanner SDK?" description: "Discover how Dynamsoft MRZ Scanner license servers monitor device usage, including IndexedDB tracking for browsers and UUID-based device identification." + troubleshooting-unauthorized-device-clone-detected: + title: "Troubleshooting Error -20151 for MRZ Scanner SDK" + description: "Troubleshoot MRZ SDK error -20151 caused by device clone detection, time modification, or frequent SDK version switching." dbr_license: index: @@ -37,6 +43,9 @@ dbr_license: dbr-free-trial: title: "What I need to know about Barcode Reader SDK trial licenses?" description: "Get started with a Barcode Reader trial license and extend your evaluation period for up to 30 days." + enable-supported-barcode-format: + title: "Fix \"[xxx] No license found\" Error for Barcode Scanner SDK" + description: "Fix the \"No license found\" error by enabling only the barcode formats supported by your Barcode Reader license." ensure-no-overuse: title: "Barcode Reader Concurrent Instance License Setup Guide" description: "Understand how to manage concurrent instance licenses in Dynamsoft Barcode Reader using SetMaxConcurrentInstanceCount and MaxParallelTasks settings." @@ -61,3 +70,6 @@ dbr_license: track-license: title: "How to track the number of devices for Barcode Reader SDK?" description: "Discover how Dynamsoft hosted and self-hosted license servers monitor device counts in JavaScript and native SDK environments." + troubleshooting-unauthorized-device-clone-detected: + title: "Troubleshooting Error -20151 for Barcode Reader SDK" + description: "Resolve error -20151 in Dynamsoft by correcting system time settings and avoiding rapid SDK version changes that trigger clone detection." diff --git a/barcode-reader/general/avoid-incorrect-barcode-results.md b/barcode-reader/general/avoid-incorrect-barcode-results.md index a39f125..b08877e 100644 --- a/barcode-reader/general/avoid-incorrect-barcode-results.md +++ b/barcode-reader/general/avoid-incorrect-barcode-results.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to avoid incorrect barcode results? +title: Barcode Reader Configuration Guide: Prevent Incorrect Results keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, Troubleshooting / User Cases, avoid incorrect barcode results -description: How to avoid incorrect barcode results? +description: Improve barcode decoding accuracy in Dynamsoft Barcode Reader by configuring minResultConfidence and minBarcodeTextLength. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/general/avoid-incorrect-results.md b/barcode-reader/general/avoid-incorrect-results.md index 23cffe0..ce3f22b 100644 --- a/barcode-reader/general/avoid-incorrect-results.md +++ b/barcode-reader/general/avoid-incorrect-results.md @@ -1,6 +1,6 @@ --- layout: default-layout -title: How to filter incorrect results with the barcode result length? +title: How to filter incorrect results with the barcode result length in DBR SDK? keywords: Dynamsoft Barcode Reader, FAQ, DBR Introduction, General, incorrect results description: How to filter results with the barcode result length? needAutoGenerateSidebar: false diff --git a/barcode-reader/general/check-current-version.md b/barcode-reader/general/check-current-version.md index 6faad7f..5ca3f3b 100644 --- a/barcode-reader/general/check-current-version.md +++ b/barcode-reader/general/check-current-version.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to check the version of the JS SDK I am currently using? +title: How to Verify the Dynamsoft Barcode Reader JS SDK Version keywords: Dynamsoft Barcode Reader, FAQ, tech basic, check version, current version -description: How to check the version of the JS SDK I am currently using? +description: Step-by-step guide to identifying the current version of the Dynamsoft JS Barcode Reader SDK in web apps using API, npm, or CDN methods. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/server/configuration/avoid-incorrect-results.md b/barcode-reader/server/configuration/avoid-incorrect-results.md index 49e745d..c37c92a 100644 --- a/barcode-reader/server/configuration/avoid-incorrect-results.md +++ b/barcode-reader/server/configuration/avoid-incorrect-results.md @@ -1,6 +1,6 @@ --- layout: default-layout -title: How to filter incorrect results with the barcode result length? +title: How to filter incorrect results with the barcode result length in DBR Server SDK? keywords: Dynamsoft Barcode Reader, FAQ, DBR Introduction, General, incorrect results description: How to filter incorrect results with the barcode result length? needAutoGenerateSidebar: false diff --git a/barcode-reader/web/capabilities/adaptive-wasm-loading.md b/barcode-reader/web/capabilities/adaptive-wasm-loading.md index a360514..f829d41 100644 --- a/barcode-reader/web/capabilities/adaptive-wasm-loading.md +++ b/barcode-reader/web/capabilities/adaptive-wasm-loading.md @@ -2,7 +2,7 @@ layout: default-layout title: About Adaptive WebAssembly (Wasm) Loading keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, wasm, loading -description: How to enable -SIMD-Pthread Wasm for accelerated deep learning computation? +description: Learn how Adaptive WebAssembly loading works in Dynamsoft Barcode Reader Web, including Baseline, SIMD, and SIMD-Pthread Wasm variants and performance optimization. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/web/capabilities/what-is-in-the-dist-folder-of-dbr.md b/barcode-reader/web/capabilities/what-is-in-the-dist-folder-of-dbr.md index f53c8c3..352dcec 100644 --- a/barcode-reader/web/capabilities/what-is-in-the-dist-folder-of-dbr.md +++ b/barcode-reader/web/capabilities/what-is-in-the-dist-folder-of-dbr.md @@ -2,7 +2,7 @@ layout: default-layout title: What's in the dist Folder of dynamsoft-barcode-reader-bundle? keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, tech basic, wasm, dist, files -description: How to enable -SIMD-Pthread Wasm for accelerated deep learning computation? +description: Overview of the dynamsoft-barcode-reader-bundle dist folder, covering JavaScript bundles, WebAssembly modules, worker scripts, and supporting assets. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/web/configuration/avoid-incorrect-barcode-results.md b/barcode-reader/web/configuration/avoid-incorrect-barcode-results.md index 16a8475..932429e 100644 --- a/barcode-reader/web/configuration/avoid-incorrect-barcode-results.md +++ b/barcode-reader/web/configuration/avoid-incorrect-barcode-results.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to avoid incorrect barcode results? +title: Barcode Reader Web Edition: Prevent Incorrect Results keywords: Dynamsoft Barcode Reader, FAQ, JavaScript, Troubleshooting / User Cases, avoid incorrect barcode results -description: How to avoid incorrect barcode results? +description: Avoid inaccurate barcode scans in Dynamsoft Barcode Reader Web by configuring result confidence thresholds and minimum barcode text length. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/web/debug/check-current-version.md b/barcode-reader/web/debug/check-current-version.md index f41d713..311315a 100644 --- a/barcode-reader/web/debug/check-current-version.md +++ b/barcode-reader/web/debug/check-current-version.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to check the version of the JS SDK I am currently using? +title: How to Verify the Dynamsoft Barcode Reader Web SDK Version keywords: Dynamsoft Barcode Reader, FAQ, tech basic, check version, current version -description: How to check the version of the JS SDK I am currently using? +description: Guide to identifying the installed version of Dynamsoft Barcode Reader Web SDK using module APIs, npm show commands, or CDN configuration. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/web/debug/debug-mode.md b/barcode-reader/web/debug/debug-mode.md index adf8499..3b5e27d 100644 --- a/barcode-reader/web/debug/debug-mode.md +++ b/barcode-reader/web/debug/debug-mode.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to resolve the expected magic word error that occurs when using DBR-JS? +title: Enable Debug Mode in DBR-JS | Dynamsoft keywords: Dynamsoft Barcode Reader, FAQ, tech basic, Magic Word, MIME -description: How to resolve the expected magic word error that occurs when using DBR-JS? +description: Enable debug mode, upload custom JSON templates, save video frames, and customize scan settings in Dynamsoft Barcode Reader JS. needAutoGenerateSidebar: false --- diff --git a/barcode-reader/web/debug/resolve-magic-word.md b/barcode-reader/web/debug/resolve-magic-word.md index ae534d8..995d81d 100644 --- a/barcode-reader/web/debug/resolve-magic-word.md +++ b/barcode-reader/web/debug/resolve-magic-word.md @@ -1,8 +1,8 @@ --- layout: default-layout -title: How to resolve the expected magic word error that occurs when using DBR-JS? +title: Fix: WebAssembly.instantiate(): expected magic word | DBR-JS keywords: Dynamsoft Barcode Reader, FAQ, tech basic, Magic Word, MIME -description: How to resolve the expected magic word error that occurs when using DBR-JS? +description: Learn how to fix the "expected magic word" WebAssembly error in Dynamsoft Barcode Reader JS by properly configuring the .wasm MIME type and HTTPS. needAutoGenerateSidebar: false --- diff --git a/mrz-scanner/general/index.md b/mrz-scanner/general/index.md index 54c3e67..fb36647 100644 --- a/mrz-scanner/general/index.md +++ b/mrz-scanner/general/index.md @@ -1,6 +1,6 @@ --- layout: default-layout -title: MRZ Scanner FAQ +title: MRZ Scanner General Questions & Configuration Help keywords: faq, license, mrz, dynamsoft, mrz scanner, configuration description: Dynamsoft MRZ Scanner FAQ needAutoGenerateSidebar: false diff --git a/mrz-scanner/index.md b/mrz-scanner/index.md index f5428be..2ad35c3 100644 --- a/mrz-scanner/index.md +++ b/mrz-scanner/index.md @@ -1,6 +1,6 @@ --- layout: default-layout -title: MRZ Scanner FAQ +title: MRZ Scanner FAQ - Formats, Licensing, Usage & Integration keywords: faq, mrz, mrz scanner, dynamsoft, license, general description: Index page for the MRZ Scanner FAQ site with large navigation buttons. needAutoGenerateSidebar: true From 0638b7ba12af22a75d6329ab2f7060fe12ac8719 Mon Sep 17 00:00:00 2001 From: Jenny-Jiani <70129215+Jenny-Jiani@users.noreply.github.com> Date: Sat, 28 Feb 2026 09:51:34 +0800 Subject: [PATCH 4/4] Delete path_reference_alias.rb --- _plugins/path_reference_alias.rb | 77 -------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 _plugins/path_reference_alias.rb diff --git a/_plugins/path_reference_alias.rb b/_plugins/path_reference_alias.rb deleted file mode 100644 index 5ddde2a..0000000 --- a/_plugins/path_reference_alias.rb +++ /dev/null @@ -1,77 +0,0 @@ -module Jekyll - class PathReferenceAliasPage < Page - def initialize(site, source_dir, source_name, alias_dir) - @site = site - @base = site.source - @dir = alias_dir - @name = source_name - - process(@name) - read_yaml(File.join(@base, source_dir), @name) - end - end - - class PathReferenceAliasGenerator < Generator - safe true - priority :low - - def generate(site) - placeholder_files = detect_placeholders(site) - return if placeholder_files.empty? - - placeholder_paths = placeholder_files.map { |item| item[:relative_path] } - site.static_files.reject! { |file| placeholder_paths.include?(file.relative_path) } - - placeholder_files.each do |item| - create_alias_pages(site, item) - end - end - - private - - def detect_placeholders(site) - site.static_files.filter_map do |file| - next unless File.extname(file.relative_path).empty? - - file_path = File.join(site.source, file.relative_path) - next unless File.file?(file_path) - - raw = File.read(file_path, encoding: 'UTF-8').strip - next if raw.empty? - next unless raw.start_with?('./', '../') - - placeholder_dir = File.dirname(file.relative_path) - target_dir = File.expand_path(raw, File.join(site.source, placeholder_dir)) - source_root = File.expand_path(site.source) - - next unless target_dir.start_with?(source_root + File::SEPARATOR) - next unless Dir.exist?(target_dir) - - { - relative_path: file.relative_path, - placeholder_dir: placeholder_dir, - placeholder_name: File.basename(file.relative_path), - target_dir: target_dir - } - end - end - - def create_alias_pages(site, placeholder) - alias_root = File.join(placeholder[:placeholder_dir], placeholder[:placeholder_name]).tr('\\', '/') - source_root = File.expand_path(site.source) - - Dir.glob(File.join(placeholder[:target_dir], '**', '*.md')).sort.each do |source_file| - source_dir = File.dirname(source_file) - source_name = File.basename(source_file) - - source_rel_dir = source_dir.sub(/^#{Regexp.escape(source_root)}[\\\/]?/, '').tr('\\', '/') - alias_rel_dir = source_rel_dir.sub(/^#{Regexp.escape(placeholder[:target_dir].sub(/^#{Regexp.escape(source_root)}[\\\/]?/, '').tr('\\', '/'))}/, '').sub(%r{^/}, '') - - alias_dir = alias_root - alias_dir = File.join(alias_root, alias_rel_dir).tr('\\', '/') unless alias_rel_dir.empty? - - site.pages << PathReferenceAliasPage.new(site, source_rel_dir, source_name, alias_dir) - end - end - end -end