From bf2ee9c212e50a93b11792dc0a3d2b7b88d5185c Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Sat, 22 Nov 2025 16:28:19 +0100 Subject: [PATCH] Fix internal markdown links and auto-linking language persistence - Add language parameter to autoLinkPageTitles() method - Fix internal links to include current language (?page=x&lang=en) - Remove broken header ID syntax from English guide - Ensure all auto-generated internal links maintain language context - Internal page links now work correctly across language switches --- engine/core/class/CodePressCMS.php | 2 +- guide/en.codepress.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/core/class/CodePressCMS.php b/engine/core/class/CodePressCMS.php index 4901408..1623671 100644 --- a/engine/core/class/CodePressCMS.php +++ b/engine/core/class/CodePressCMS.php @@ -434,7 +434,7 @@ class CodePressCMS { return $text; // Don't link existing links, current page title, or H1 headings } - return '' . $text . ''; + return '' . $text . ''; }; $content = preg_replace_callback($pattern, $replacement, $content); diff --git a/guide/en.codepress.md b/guide/en.codepress.md index 9935362..2c6fba4 100644 --- a/guide/en.codepress.md +++ b/guide/en.codepress.md @@ -40,7 +40,7 @@ $config = [ --- -## Content Management +## Content Management {#content-management} ### File Structure ``` @@ -90,7 +90,7 @@ CodePress automatically creates links to other pages when you mention page names --- -## Templates +## Templates {#templates} ### Template Structure CodePress uses Mustache-compatible templates: @@ -110,7 +110,7 @@ Available variables in templates: --- -## Configuration +## Configuration {#configuration} ### Basic Settings Edit `engine/core/config.php` for your website: