devfolio-page 0.1.3 → 0.1.4
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/dist/cli/index.js +1 -1
- package/dist/generator/builder.js +6 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const program = new Command();
|
|
|
9
9
|
program
|
|
10
10
|
.name('devfolio-page')
|
|
11
11
|
.description('Your portfolio as code. Version control it like software.')
|
|
12
|
-
.version('0.1.
|
|
12
|
+
.version('0.1.4');
|
|
13
13
|
program
|
|
14
14
|
.command('init')
|
|
15
15
|
.description('Create a new portfolio.yaml with interactive prompts')
|
|
@@ -474,6 +474,10 @@ async function copyFonts(outputDir) {
|
|
|
474
474
|
async function copyUserImages(portfolio, outputDir) {
|
|
475
475
|
const imagePaths = extractAllImagePaths(portfolio);
|
|
476
476
|
for (const imgPath of imagePaths) {
|
|
477
|
+
// Skip undefined or empty paths
|
|
478
|
+
if (!imgPath) {
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
477
481
|
// Skip absolute URLs
|
|
478
482
|
if (imgPath.startsWith('http://') || imgPath.startsWith('https://')) {
|
|
479
483
|
continue;
|
|
@@ -503,7 +507,8 @@ function extractAllImagePaths(portfolio) {
|
|
|
503
507
|
paths.push(meta.hero_image);
|
|
504
508
|
// Extract from rich projects
|
|
505
509
|
portfolio.projects?.forEach((project) => {
|
|
506
|
-
|
|
510
|
+
if (project.thumbnail)
|
|
511
|
+
paths.push(project.thumbnail);
|
|
507
512
|
if (project.hero)
|
|
508
513
|
paths.push(project.hero);
|
|
509
514
|
project.sections.forEach((section) => {
|