Compare commits
2 Commits
5ffd94d9ca
...
3e162637f5
Author | SHA1 | Date |
---|---|---|
|
3e162637f5 | |
|
6bdb536366 |
|
@ -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:
|
||||

|
||||
|
||||
## Improvements
|
||||
- scripts/publish.sh:
|
||||
- [x] Skip copying files that already exist
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue