devfolio-page 0.2.8 → 0.2.9
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/schemas/portfolio.schema.js +12 -0
- package/dist/generator/builder.js +16 -0
- package/dist/generator/themes/dark-academia/templates/about.html +2 -2
- package/dist/generator/themes/dark-academia/templates/experiments-index.html +2 -2
- package/dist/generator/themes/dark-academia/templates/projects-index.html +2 -2
- package/dist/generator/themes/dark-academia/templates/writing-index.html +2 -2
- package/dist/generator/themes/modern/templates/about.html +2 -2
- package/dist/generator/themes/modern/templates/experiments-index.html +2 -2
- package/dist/generator/themes/modern/templates/projects-index.html +2 -2
- package/dist/generator/themes/modern/templates/writing-index.html +2 -2
- package/package.json +1 -1
- package/src/generator/themes/dark-academia/templates/about.html +2 -2
- package/src/generator/themes/dark-academia/templates/experiments-index.html +2 -2
- package/src/generator/themes/dark-academia/templates/projects-index.html +2 -2
- package/src/generator/themes/dark-academia/templates/writing-index.html +2 -2
- package/src/generator/themes/modern/templates/about.html +2 -2
- package/src/generator/themes/modern/templates/experiments-index.html +2 -2
- package/src/generator/themes/modern/templates/projects-index.html +2 -2
- package/src/generator/themes/modern/templates/writing-index.html +2 -2
|
@@ -220,6 +220,16 @@ const layoutSchema = z.object({
|
|
|
220
220
|
show_experiments: z.boolean().optional(),
|
|
221
221
|
show_timeline: z.boolean().optional(),
|
|
222
222
|
});
|
|
223
|
+
const pageContentSchema = z.object({
|
|
224
|
+
title: z.string().optional().nullable(),
|
|
225
|
+
description: z.string().optional().nullable(),
|
|
226
|
+
});
|
|
227
|
+
const pagesSchema = z.object({
|
|
228
|
+
projects: pageContentSchema.optional().nullable(),
|
|
229
|
+
about: pageContentSchema.optional().nullable(),
|
|
230
|
+
experiments: pageContentSchema.optional().nullable(),
|
|
231
|
+
writing: pageContentSchema.optional().nullable(),
|
|
232
|
+
});
|
|
223
233
|
// =============================================================================
|
|
224
234
|
// Main Portfolio Schema
|
|
225
235
|
// =============================================================================
|
|
@@ -271,6 +281,8 @@ export const portfolioSchema = z.object({
|
|
|
271
281
|
layout: layoutSchema.optional().nullable(),
|
|
272
282
|
// Settings
|
|
273
283
|
settings: settingsSchema.optional().nullable(),
|
|
284
|
+
// Page content customization
|
|
285
|
+
pages: pagesSchema.optional().nullable(),
|
|
274
286
|
});
|
|
275
287
|
// =============================================================================
|
|
276
288
|
// Helper Functions
|
|
@@ -235,6 +235,8 @@ async function generateProjectsIndex(portfolio, themePath, outputDir, theme) {
|
|
|
235
235
|
projects: portfolio.projects || [],
|
|
236
236
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
237
237
|
nav_links: generateNavLinks(portfolio, true, 'projects'),
|
|
238
|
+
page_title: portfolio.pages?.projects?.title,
|
|
239
|
+
page_description: portfolio.pages?.projects?.description,
|
|
238
240
|
};
|
|
239
241
|
const html = Mustache.render(template, data);
|
|
240
242
|
await fs.writeFile(path.join(outputDir, 'projects/index.html'), html);
|
|
@@ -273,6 +275,8 @@ async function generateAboutPage(portfolio, themePath, outputDir, theme) {
|
|
|
273
275
|
hasEducation: (portfolio.sections?.education?.length ?? 0) > 0,
|
|
274
276
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
275
277
|
nav_links: generateNavLinks(portfolio, true, 'about'),
|
|
278
|
+
page_title: portfolio.pages?.about?.title,
|
|
279
|
+
page_description: portfolio.pages?.about?.description,
|
|
276
280
|
};
|
|
277
281
|
const html = Mustache.render(template, data);
|
|
278
282
|
await fs.writeFile(path.join(outputDir, 'about/index.html'), html);
|
|
@@ -296,6 +300,8 @@ async function generateExperimentsIndex(portfolio, themePath, outputDir, theme)
|
|
|
296
300
|
experiments: portfolio.experiments || [],
|
|
297
301
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
298
302
|
nav_links: generateNavLinks(portfolio, true, 'experiments'),
|
|
303
|
+
page_title: portfolio.pages?.experiments?.title,
|
|
304
|
+
page_description: portfolio.pages?.experiments?.description,
|
|
299
305
|
};
|
|
300
306
|
const html = Mustache.render(template, data);
|
|
301
307
|
await fs.writeFile(path.join(outputDir, 'experiments/index.html'), html);
|
|
@@ -319,6 +325,8 @@ async function generateWritingIndex(portfolio, themePath, outputDir, theme) {
|
|
|
319
325
|
writing: portfolio.sections.writing || [],
|
|
320
326
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
321
327
|
nav_links: generateNavLinks(portfolio, true, 'writing'),
|
|
328
|
+
page_title: portfolio.pages?.writing?.title,
|
|
329
|
+
page_description: portfolio.pages?.writing?.description,
|
|
322
330
|
};
|
|
323
331
|
const html = Mustache.render(template, data);
|
|
324
332
|
await fs.writeFile(path.join(outputDir, 'writing/index.html'), html);
|
|
@@ -824,6 +832,8 @@ async function generateProjectsIndexInMemory(portfolio, themePath, theme, files)
|
|
|
824
832
|
projects: portfolio.projects || [],
|
|
825
833
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
826
834
|
nav_links: generateNavLinks(portfolio, true, 'projects'),
|
|
835
|
+
page_title: portfolio.pages?.projects?.title,
|
|
836
|
+
page_description: portfolio.pages?.projects?.description,
|
|
827
837
|
};
|
|
828
838
|
const html = Mustache.render(template, data);
|
|
829
839
|
files.set('projects/index.html', Buffer.from(html, 'utf-8'));
|
|
@@ -860,6 +870,8 @@ async function generateAboutPageInMemory(portfolio, themePath, theme, files) {
|
|
|
860
870
|
hasEducation: (portfolio.sections?.education?.length ?? 0) > 0,
|
|
861
871
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
862
872
|
nav_links: generateNavLinks(portfolio, true, 'about'),
|
|
873
|
+
page_title: portfolio.pages?.about?.title,
|
|
874
|
+
page_description: portfolio.pages?.about?.description,
|
|
863
875
|
};
|
|
864
876
|
const html = Mustache.render(template, data);
|
|
865
877
|
files.set('about/index.html', Buffer.from(html, 'utf-8'));
|
|
@@ -881,6 +893,8 @@ async function generateExperimentsIndexInMemory(portfolio, themePath, theme, fil
|
|
|
881
893
|
experiments: portfolio.experiments || [],
|
|
882
894
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
883
895
|
nav_links: generateNavLinks(portfolio, true, 'experiments'),
|
|
896
|
+
page_title: portfolio.pages?.experiments?.title,
|
|
897
|
+
page_description: portfolio.pages?.experiments?.description,
|
|
884
898
|
};
|
|
885
899
|
const html = Mustache.render(template, data);
|
|
886
900
|
files.set('experiments/index.html', Buffer.from(html, 'utf-8'));
|
|
@@ -902,6 +916,8 @@ async function generateWritingIndexInMemory(portfolio, themePath, theme, files)
|
|
|
902
916
|
writing: portfolio.sections.writing || [],
|
|
903
917
|
colorScheme: settings.color_scheme || defaultColorScheme,
|
|
904
918
|
nav_links: generateNavLinks(portfolio, true, 'writing'),
|
|
919
|
+
page_title: portfolio.pages?.writing?.title,
|
|
920
|
+
page_description: portfolio.pages?.writing?.description,
|
|
905
921
|
};
|
|
906
922
|
const html = Mustache.render(template, data);
|
|
907
923
|
files.set('writing/index.html', Buffer.from(html, 'utf-8'));
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>About</h1>
|
|
51
|
-
{{#tagline}}<p>{{tagline}}</p>{{/tagline}}
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}About{{/page_title}}</h1>
|
|
51
|
+
{{#page_description}}<p>{{page_description}}</p>{{/page_description}}{{^page_description}}{{#tagline}}<p>{{tagline}}</p>{{/tagline}}{{/page_description}}
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="about-content">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Experiments</h1>
|
|
51
|
-
<p>Explorations, studies, and curious investigations
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Experiments{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Explorations, studies, and curious investigations.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="experiments-list">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Complete Works</h1>
|
|
51
|
-
<p>A collection of projects spanning research, development, and creative endeavors
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Complete Works{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}A collection of projects spanning research, development, and creative endeavors.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="projects-list">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Publications</h1>
|
|
51
|
-
<p>Articles, essays, and scholarly writings
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Publications{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Articles, essays, and scholarly writings.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="writing-list">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>About</h1>
|
|
50
|
-
{{#tagline}}<p>{{tagline}}</p>{{/tagline}}
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}About{{/page_title}}</h1>
|
|
50
|
+
{{#page_description}}<p>{{page_description}}</p>{{/page_description}}{{^page_description}}{{#tagline}}<p>{{tagline}}</p>{{/tagline}}{{/page_description}}
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="about-content">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Experiments</h1>
|
|
50
|
-
<p>Side projects, explorations, and things I'm tinkering with
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Experiments{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Side projects, explorations, and things I'm tinkering with.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="experiments-grid">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Projects</h1>
|
|
50
|
-
<p>A collection of work spanning product development, open source, and research
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Projects{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}A collection of work spanning product development, open source, and research.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="projects-grid">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Writing</h1>
|
|
50
|
-
<p>Articles, blog posts, and technical writing
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Writing{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Articles, blog posts, and technical writing.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="writing-list">
|
package/package.json
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>About</h1>
|
|
51
|
-
{{#tagline}}<p>{{tagline}}</p>{{/tagline}}
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}About{{/page_title}}</h1>
|
|
51
|
+
{{#page_description}}<p>{{page_description}}</p>{{/page_description}}{{^page_description}}{{#tagline}}<p>{{tagline}}</p>{{/tagline}}{{/page_description}}
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="about-content">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Experiments</h1>
|
|
51
|
-
<p>Explorations, studies, and curious investigations
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Experiments{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Explorations, studies, and curious investigations.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="experiments-list">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Complete Works</h1>
|
|
51
|
-
<p>A collection of projects spanning research, development, and creative endeavors
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Complete Works{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}A collection of projects spanning research, development, and creative endeavors.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="projects-list">
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<main class="page-content">
|
|
48
48
|
<header class="page-header">
|
|
49
49
|
<div class="header-ornament"></div>
|
|
50
|
-
<h1>Publications</h1>
|
|
51
|
-
<p>Articles, essays, and scholarly writings
|
|
50
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Publications{{/page_title}}</h1>
|
|
51
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Articles, essays, and scholarly writings.{{/page_description}}</p>
|
|
52
52
|
</header>
|
|
53
53
|
|
|
54
54
|
<div class="writing-list">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>About</h1>
|
|
50
|
-
{{#tagline}}<p>{{tagline}}</p>{{/tagline}}
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}About{{/page_title}}</h1>
|
|
50
|
+
{{#page_description}}<p>{{page_description}}</p>{{/page_description}}{{^page_description}}{{#tagline}}<p>{{tagline}}</p>{{/tagline}}{{/page_description}}
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="about-content">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Experiments</h1>
|
|
50
|
-
<p>Side projects, explorations, and things I'm tinkering with
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Experiments{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Side projects, explorations, and things I'm tinkering with.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="experiments-grid">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Projects</h1>
|
|
50
|
-
<p>A collection of work spanning product development, open source, and research
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Projects{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}A collection of work spanning product development, open source, and research.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="projects-grid">
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
<main class="main-content">
|
|
48
48
|
<header class="page-header">
|
|
49
|
-
<h1>Writing</h1>
|
|
50
|
-
<p>Articles, blog posts, and technical writing
|
|
49
|
+
<h1>{{#page_title}}{{page_title}}{{/page_title}}{{^page_title}}Writing{{/page_title}}</h1>
|
|
50
|
+
<p>{{#page_description}}{{page_description}}{{/page_description}}{{^page_description}}Articles, blog posts, and technical writing.{{/page_description}}</p>
|
|
51
51
|
</header>
|
|
52
52
|
|
|
53
53
|
<div class="writing-list">
|