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 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
|
- In remote I read from remote vault and copy to content all that have tag publish=True
|
||||||
|
|
||||||
|
Current set up:
|
||||||
|

|
||||||
|
|
||||||
## Improvements
|
## Improvements
|
||||||
- scripts/publish.sh:
|
- scripts/publish.sh:
|
||||||
- [x] Skip copying files that already exist
|
- [x] Skip copying files that already exist
|
||||||
|
|
|
@ -38,7 +38,11 @@ async function compressImages(inputDir, outputDir) {
|
||||||
files.map(async (file) => {
|
files.map(async (file) => {
|
||||||
const inputFilePath = path.join(inputDir, file);
|
const inputFilePath = path.join(inputDir, file);
|
||||||
const relativeOutputPath = path.relative(inputDir, inputFilePath);
|
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 {
|
try {
|
||||||
// Check if the output WebP file already exists
|
// Check if the output WebP file already exists
|
||||||
|
|
Loading…
Reference in New Issue