mirror of
https://github.com/mleem97/gregWiki.git
synced 2026-04-11 03:29:19 +02:00
Merge Docusaurus site: all content under docs/, align with gregFramework split layout
- Move markdown and wiki-import tree into docs/; keep app shell at repo root - Point docusaurus docs path to docs/; edit links to mleem97/gregWiki - Sync and i18n scripts use gregWiki root and ../.wiki under gregFramework - Sidebars: workspace layout from root docs ids; plugins under mods/extensions - Fix redirects, module catalog URLs, release note paths, and wiki-import category keys - Update repo inventory for split repos; Dockerfile for single-repo context Made-with: Cursor
This commit is contained in:
4
static/img/logo.svg
Normal file
4
static/img/logo.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none">
|
||||
<rect width="100" height="100" rx="20" fill="#1b2a44"/>
|
||||
<path d="M20 30h60v10H20zM20 45h40v10H20zM20 60h60v10H20z" fill="#67e8f9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 218 B |
3
static/js/auto-locale.js
Normal file
3
static/js/auto-locale.js
Normal file
@@ -0,0 +1,3 @@
|
||||
(function () {
|
||||
// Locale redirects intentionally disabled.
|
||||
})();
|
||||
63
static/js/canonical-host.js
Normal file
63
static/js/canonical-host.js
Normal file
@@ -0,0 +1,63 @@
|
||||
(function () {
|
||||
try {
|
||||
var allowedDomainRoots = [
|
||||
'gregframework.eu',
|
||||
'gregframework',
|
||||
'datacentermods.com',
|
||||
'datacentermods',
|
||||
'frikadellental.de',
|
||||
];
|
||||
|
||||
var currentHost = window.location.hostname.toLowerCase();
|
||||
var currentOrigin = window.location.origin;
|
||||
var path = window.location.pathname + window.location.search;
|
||||
|
||||
function isAllowedHost(host, root) {
|
||||
return host === root || host.endsWith('.' + root);
|
||||
}
|
||||
|
||||
var hostAllowed = allowedDomainRoots.some(function (root) {
|
||||
return isAllowedHost(currentHost, root);
|
||||
});
|
||||
|
||||
var fallbackOrigin = 'https://frikadellental.de';
|
||||
var canonicalNode = document.querySelector('link[rel="canonical"]');
|
||||
if (canonicalNode) {
|
||||
try {
|
||||
fallbackOrigin = new URL(canonicalNode.getAttribute('href')).origin;
|
||||
} catch (error) {
|
||||
// keep default fallback
|
||||
}
|
||||
}
|
||||
|
||||
var chosenOrigin = hostAllowed ? currentOrigin : fallbackOrigin;
|
||||
var currentUrl = chosenOrigin + path;
|
||||
|
||||
if (canonicalNode) {
|
||||
canonicalNode.setAttribute('href', currentUrl);
|
||||
}
|
||||
|
||||
var ogUrl = document.querySelector('meta[property="og:url"]');
|
||||
if (ogUrl) {
|
||||
ogUrl.setAttribute('content', currentUrl);
|
||||
}
|
||||
|
||||
var alternates = document.querySelectorAll('link[rel="alternate"]');
|
||||
alternates.forEach(function (node) {
|
||||
var href = node.getAttribute('href');
|
||||
if (!href) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
var parsed = new URL(href);
|
||||
var normalized = chosenOrigin + parsed.pathname + parsed.search;
|
||||
node.setAttribute('href', normalized);
|
||||
} catch (error) {
|
||||
// ignore malformed URLs
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
// no-op
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user