Compare commits
No commits in common. "3e162637f5f56bf93e0f6b5bf43f1a4b2ac328d0" and "5ffd94d9cab6e464fa7a866282e3f8b66f11eeb0" have entirely different histories.
3e162637f5
...
5ffd94d9ca
|
@ -25,9 +25,6 @@ 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,11 +38,7 @@ 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(
|
const outputWebpPath = path.join(outputDir, relativeOutputPath.replace(/\.(jpg|png)$/, '.webp'));
|
||||||
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