This commit is contained in:
Zoey 2023-12-21 01:44:13 +01:00
parent e68abd92a1
commit f5d83163eb
3 changed files with 8 additions and 4 deletions

View file

@ -52,7 +52,7 @@ const articles = [
function extractTitleAndSubtitle(markdownContent) { function extractTitleAndSubtitle(markdownContent) {
const lines = markdownContent.split('\n'); const lines = markdownContent.split('\n');
const title = lines[0] ? lines[0].replace(/^#+\s*/, '').trim() : 'Untitled'; const title = lines[0] ? lines[0].replace(/^#+\s*/, '').trim() : 'Untitled';
const subtitle = lines[3] ? lines[3].trim() : ''; const subtitle = lines[3] ? lines[3].replace(/^#+\s*/, '').trim() : '';
return { title, subtitle }; return { title, subtitle };
} }

View file

@ -1,4 +1,6 @@
# Electron # Electron
###### 21th December 2023 - Zoey ###### 21th December 2023 - Zoey
<br> <br>
### Electron is awful and here's why. ### Electron is awful and here's why.
<br>
Lorem ipsum motherfuckerssss

View file

@ -1,4 +1,6 @@
# Wayland # Wayland
######22th December 2023 ######22th December 2023 - Zoey
<br> <br>
### Insane defaults. ### Insane defaults.
<br>
Lorem ipsum motherfuckerssss