Compare commits

...

2 Commits

Author SHA1 Message Date
Gal 3e162637f5
Add diagram of current setup 2024-03-02 08:58:14 +01:00
Gal 6bdb536366
🐛 Fix links to broken images 2024-03-02 08:50:28 +01:00
3 changed files with 8 additions and 1 deletions

View File

@ -25,6 +25,9 @@ make publish
- In local I read from local vault and copy to content all that have tag publish=True
- In remote I read from remote vault and copy to content all that have tag publish=True
Current set up:
![Diagram](flow.png)
## Improvements
- scripts/publish.sh:
- [x] Skip copying files that already exist

BIN
flow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@ -38,7 +38,11 @@ async function compressImages(inputDir, outputDir) {
files.map(async (file) => {
const inputFilePath = path.join(inputDir, file);
const relativeOutputPath = path.relative(inputDir, inputFilePath);
const outputWebpPath = path.join(outputDir, relativeOutputPath.replace(/\.(jpg|png)$/, '.webp'));
const outputWebpPath = path.join(
outputDir,
relativeOutputPath.replace(/\.(jpg|png)$/, '.webp')
.replace(/\s+/g, '-') // Replace spaces with hyphens
);
try {
// Check if the output WebP file already exists