From 0bc0ef3ba86325da93428667c0c9af8c84cbd187 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sun, 6 Oct 2024 17:31:31 -0500 Subject: [PATCH] Change landing page --- Jenkinsfile | 50 ++++++++++++++------------ src/components/Card.astro | 2 +- src/components/Navigation.astro | 23 +++--------- src/components/Sidebar.astro | 18 ++++------ src/components/index/EsBlogIndex.astro | 32 +++++++++++++++++ src/layouts/BlogLayout.astro | 19 +++------- src/pages/index.astro | 8 ++--- 7 files changed, 76 insertions(+), 76 deletions(-) create mode 100644 src/components/index/EsBlogIndex.astro diff --git a/Jenkinsfile b/Jenkinsfile index 0f076fb..d722feb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,26 +1,30 @@ pipeline { - agent any - environment { - PATH = "/var/lib/jenkins/.nvm/versions/node/v20.9.0/bin:/var/lib/jenkins/bin:${env.PATH}" - } +agent { + docker { + image 'node:22' + } + } stages { - stage('Install deps') { - steps { - sh 'pnpm i' - } - } - stage('Build') { - environment { - PATH = "${env.WORKSPACE}/node_modules/.bin:${env.PATH}" - } - steps { - sh 'pnpm build' - } - } - stage('Deploy') { - steps { - sh 'cp -r ./dist/* /var/www/araozu.dev/' - } - } - } + stage('Install pnpm') { + steps { + sh 'npm i -g pnpm' + } + } + stage('Install dependencies') { + steps { + sh 'pnpm i' + } + } + stage('Buid') { + steps { + sh 'pnpm build' + } + } + stage('Deploy') { + steps { + sh 'rm -rf /var/www/dev.araozu/*' + sh 'mv -f dist/* /var/www/dev.araozu/' + } + } + } } diff --git a/src/components/Card.astro b/src/components/Card.astro index c4e16af..0214596 100644 --- a/src/components/Card.astro +++ b/src/components/Card.astro @@ -4,7 +4,7 @@ const { title } = Astro.props;

diff --git a/src/components/Sidebar.astro b/src/components/Sidebar.astro index e8c20ce..51b0830 100644 --- a/src/components/Sidebar.astro +++ b/src/components/Sidebar.astro @@ -1,18 +1,12 @@
-

- Hi 👋! I'm -
- Fernando Araoz -

-

- I'm a (human) software engineer passionate about web technologies. I - love building things and learning new stuff. + +

+ Fernando Araoz +

+

+ Human software engineer based in Peru

-
diff --git a/src/components/index/EsBlogIndex.astro b/src/components/index/EsBlogIndex.astro new file mode 100644 index 0000000..cd133e2 --- /dev/null +++ b/src/components/index/EsBlogIndex.astro @@ -0,0 +1,32 @@ +--- +import Card from "../Card.astro" + +const allPosts = await Astro.glob("../../pages/blog/en/*.md"); +--- + + +
+

+ Things I've thought about, about programming. +

+ +
    + { + allPosts + .toSorted((x, y) => + x.frontmatter.pubDate > y.frontmatter.pubDate ? -1 : 1, + ) + .map((post) => { + return ( +
  • + {post.frontmatter.pubDate} - + + {post.frontmatter.title} + +
  • + ); + }) + } +
+
+
diff --git a/src/layouts/BlogLayout.astro b/src/layouts/BlogLayout.astro index 1ba5bf4..341e9a0 100644 --- a/src/layouts/BlogLayout.astro +++ b/src/layouts/BlogLayout.astro @@ -32,7 +32,7 @@ lang = lang ?? "en";
{ frontmatter?.title && ( -

+

{frontmatter.title}

) @@ -62,26 +62,15 @@ lang = lang ?? "en"; }
-
+
-
-

Comments/Comentarios

-
- -
-
-
- diff --git a/src/pages/index.astro b/src/pages/index.astro index 6d806e1..0b1ee7f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,9 +1,7 @@ --- import Sidebar from "../components/Sidebar.astro"; -import Languages from "../components/index/Languages.astro"; -import Learning from "../components/index/Learning.astro"; -import Tools from "../components/index/Tools.astro"; import NavigationLayout from "../layouts/NavigationLayout.astro"; +import EsBlogIndex from "../components/index/EsBlogIndex.astro"; --- @@ -33,9 +31,7 @@ import NavigationLayout from "../layouts/NavigationLayout.astro"; >
- - - +