From ec61f2ff70680d677de2aa4c8c463cfca4c827e1 Mon Sep 17 00:00:00 2001 From: Firq Date: Wed, 8 Mar 2023 23:56:44 +0100 Subject: [PATCH] Fixed layout issues, added blog post, added date sorting, changed embed file, fixed old link --- .gitlab-ci.yml | 3 +- src/components/blogCard.astro | 15 +++-- src/layouts/Layout.astro | 2 +- src/layouts/basicSection.astro | 6 +- src/layouts/blogSection.astro | 13 ++++- src/pages/blog.astro | 7 ++- src/pages/blog/astro-usage.md | 100 +++++++++++++++++++++++++++++++++ static/embed.png | Bin 9145 -> 7168 bytes 8 files changed, 129 insertions(+), 17 deletions(-) create mode 100644 src/pages/blog/astro-usage.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0470731..a2c59b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,4 +28,5 @@ deploy-site: script: - echo "Connecting to proxmox machine" - - ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000" \ No newline at end of file + - ssh $DEPLOY_USER@$DEPLOY_HOST -o StrictHostKeyChecking=no IdentitiesOnly=yes "screen -X -S website-firq-npx kill; rm -r -f public/*; cd build; git reset --hard; git pull; rm -r -f node_modules; npm install; npm run build; cp -R public ~; cd ~; screen -S website-firq-npx -dm npx serve public/ -p 9000" + \ No newline at end of file diff --git a/src/components/blogCard.astro b/src/components/blogCard.astro index 8286454..0374438 100644 --- a/src/components/blogCard.astro +++ b/src/components/blogCard.astro @@ -16,7 +16,7 @@ const date = new Date(pubdate).toLocaleDateString('en-GB', options_date); --- -
+

{title}

{date}

{description}

@@ -26,6 +26,8 @@ const date = new Date(pubdate).toLocaleDateString('en-GB', options_date); \ No newline at end of file diff --git a/src/layouts/blogSection.astro b/src/layouts/blogSection.astro index d4630e8..70101ea 100644 --- a/src/layouts/blogSection.astro +++ b/src/layouts/blogSection.astro @@ -14,7 +14,7 @@ const { title } = Astro.props; \ No newline at end of file diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 372737c..64294e5 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -1,16 +1,17 @@ --- import Layout from '../layouts/Layout.astro'; import BlogCard from '../components/blogCard.astro'; -import BasicSection from '../layouts/basicSection.astro'; +import BlogSection from '../layouts/blogSection.astro'; const description = "My own small blog. Topics include FGO, TA, Programming, web technologies and more!" const allPosts = await Astro.glob("../pages/blog/*.md"); +allPosts.sort((a, b) => Date.parse(b.frontmatter.pubDate) - Date.parse(a.frontmatter.pubDate)); --- - + {allPosts.map((post) => )} - +