Skip to content

Commit ca8ebb0

Browse files
committed
Add about.html to build process and reorder contact links (about above email)
1 parent 7507772 commit ca8ebb0

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

build.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,33 @@ async function buildYear(year) {
8989
console.log(`Generated ${year}.html`);
9090
}
9191

92+
async function buildAbout() {
93+
console.log('Building about...');
94+
const template = fs.readFileSync('templates/index.html', 'utf8');
95+
const aboutContent = '<section class="about">\n <div class="photo-placeholder" style="width: 200px; height: 200px; border: 2px solid #4a148c; margin-bottom: 30px; display: flex; align-items: center; justify-content: center; color: #6a1b9a;">\n [photo goes here]\n </div>\n \n <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>\n \n <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>\n \n <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p>\n \n <p>Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p>\n</section>';
96+
97+
const html = ejs.render(template, {
98+
year: 'about',
99+
content: aboutContent,
100+
lastUpdated: new Date().toLocaleDateString('en-US', {
101+
year: 'numeric',
102+
month: 'long',
103+
day: 'numeric'
104+
})
105+
});
106+
107+
fs.writeFileSync('about.html', html);
108+
console.log('Generated about.html');
109+
}
110+
92111
async function build() {
93112
console.log('Starting build...');
94113
await buildYear('2022');
95114
await buildYear('2023');
96115
await buildYear('2024');
97116
await buildYear('2025');
98117
await buildYear('2026');
118+
await buildAbout();
99119

100120
// Create index.html that redirects to current year (2026)
101121
const redirectHtml = `<!DOCTYPE html>

templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ <h1>read watch listen</h1>
5151
</ul>
5252
</nav>
5353
<div class="contact">
54-
<p><a href="mailto:jcrtll@protonmail.com">email</a></p>
5554
<p><a href="about.html">about</a></p>
55+
<p><a href="mailto:jcrtll@protonmail.com">email</a></p>
5656
</div>
5757
</aside>
5858

0 commit comments

Comments
 (0)