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
This commit is contained in:
parent
bea9cdfb0c
commit
bf2ee9c212
@ -434,7 +434,7 @@ class CodePressCMS {
|
|||||||
return $text; // Don't link existing links, current page title, or H1 headings
|
return $text; // Don't link existing links, current page title, or H1 headings
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<a href="?page=' . $pagePath . '" class="auto-link" title="Ga naar ' . htmlspecialchars($pageTitle) . '">' . $text . '</a>';
|
return '<a href="?page=' . $pagePath . '&lang=' . $this->currentLanguage . '" class="auto-link" title="Ga naar ' . htmlspecialchars($pageTitle) . '">' . $text . '</a>';
|
||||||
};
|
};
|
||||||
|
|
||||||
$content = preg_replace_callback($pattern, $replacement, $content);
|
$content = preg_replace_callback($pattern, $replacement, $content);
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $config = [
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Content Management
|
## Content Management {#content-management}
|
||||||
|
|
||||||
### File Structure
|
### File Structure
|
||||||
```
|
```
|
||||||
@ -90,7 +90,7 @@ CodePress automatically creates links to other pages when you mention page names
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Templates
|
## Templates {#templates}
|
||||||
|
|
||||||
### Template Structure
|
### Template Structure
|
||||||
CodePress uses Mustache-compatible templates:
|
CodePress uses Mustache-compatible templates:
|
||||||
@ -110,7 +110,7 @@ Available variables in templates:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Configuration
|
## Configuration {#configuration}
|
||||||
|
|
||||||
### Basic Settings
|
### Basic Settings
|
||||||
Edit `engine/core/config.php` for your website:
|
Edit `engine/core/config.php` for your website:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user