desy-html 16.0.0 → 16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/index.html +4 -0
- package/package.json +1 -1
- package/vite.config.js +13 -13
package/docs/index.html
CHANGED
|
@@ -147,6 +147,10 @@ cd desy-html</code></pre>
|
|
|
147
147
|
|
|
148
148
|
<h2>Changelog (English)</h2>
|
|
149
149
|
<p>What's new in the latest version of desy-html</p>
|
|
150
|
+
<h3>v.16.0.1</h3>
|
|
151
|
+
<ul class="text-sm">
|
|
152
|
+
<li>Fixed a bug in header logos urls.</li>
|
|
153
|
+
</ul>
|
|
150
154
|
<h3>v.16.0.0</h3>
|
|
151
155
|
<ul class="text-sm">
|
|
152
156
|
<li>Added branding system to customize header and footer logos and texts.</li>
|
package/package.json
CHANGED
package/vite.config.js
CHANGED
|
@@ -577,7 +577,7 @@ async function rewriteCssImagePaths() {
|
|
|
577
577
|
const stylePath = path.resolve(process.cwd(), 'dist/css/styles.css');
|
|
578
578
|
if (!fs.existsSync(stylePath)) return;
|
|
579
579
|
let content = await fs.promises.readFile(stylePath, 'utf8');
|
|
580
|
-
content = content.replace(/url\((['"]?)\/images\//g, 'url($
|
|
580
|
+
content = content.replace(/url\((['"]?)\/images\//g, 'url($1images/');
|
|
581
581
|
await fs.promises.writeFile(stylePath, content);
|
|
582
582
|
}
|
|
583
583
|
|
|
@@ -592,23 +592,23 @@ async function rewriteHtmlImagePaths() {
|
|
|
592
592
|
const filePath = path.join(distDir, htmlFile);
|
|
593
593
|
let content = await fs.promises.readFile(filePath, 'utf8');
|
|
594
594
|
|
|
595
|
-
// Replace src="/images/ with src="
|
|
596
|
-
let modified = content.replace(/src="(\/images\/)/g, 'src="
|
|
595
|
+
// Replace src="/images/ with src="./images/
|
|
596
|
+
let modified = content.replace(/src="(\/images\/)/g, 'src="./images/');
|
|
597
597
|
|
|
598
|
-
// Replace srcset="/images/ with srcset="
|
|
599
|
-
modified = modified.replace(/srcset="(\/images\/)/g, 'srcset="
|
|
598
|
+
// Replace srcset="/images/ with srcset="./images/
|
|
599
|
+
modified = modified.replace(/srcset="(\/images\/)/g, 'srcset="./images/');
|
|
600
600
|
|
|
601
|
-
// Replace src="/branding/logos/ with src="
|
|
602
|
-
modified = modified.replace(/src="(\/branding\/logos\/)/g, 'src="
|
|
601
|
+
// Replace src="/branding/logos/ with src="./images/
|
|
602
|
+
modified = modified.replace(/src="(\/branding\/logos\/)/g, 'src="./images/');
|
|
603
603
|
|
|
604
|
-
// Replace srcset="/branding/logos/ with srcset="
|
|
605
|
-
modified = modified.replace(/srcset="(\/branding\/logos\/)/g, 'srcset="
|
|
604
|
+
// Replace srcset="/branding/logos/ with srcset="./images/
|
|
605
|
+
modified = modified.replace(/srcset="(\/branding\/logos\/)/g, 'srcset="./images/');
|
|
606
606
|
|
|
607
|
-
// Replace src="/branding/images/ with src="
|
|
608
|
-
modified = modified.replace(/src="(\/branding\/images\/)/g, 'src="
|
|
607
|
+
// Replace src="/branding/images/ with src="./images/
|
|
608
|
+
modified = modified.replace(/src="(\/branding\/images\/)/g, 'src="./images/');
|
|
609
609
|
|
|
610
|
-
// Replace srcset="/branding/images/ with srcset="
|
|
611
|
-
modified = modified.replace(/srcset="(\/branding\/images\/)/g, 'srcset="
|
|
610
|
+
// Replace srcset="/branding/images/ with srcset="./images/
|
|
611
|
+
modified = modified.replace(/srcset="(\/branding\/images\/)/g, 'srcset="./images/');
|
|
612
612
|
|
|
613
613
|
if (modified !== content) {
|
|
614
614
|
await fs.promises.writeFile(filePath, modified);
|