diff --git a/.gitea/workflows/debug.yml b/.gitea/workflows/debug.yml new file mode 100644 index 0000000..c5804a8 --- /dev/null +++ b/.gitea/workflows/debug.yml @@ -0,0 +1,11 @@ +name: Debug Context +on: workflow_dispatch +jobs: + debug: + runs-on: ubuntu-latest + steps: + - name: Print Gitea context + run: | + echo "server_url: ${{ gitea.server_url }}" + echo "api_url: ${{ gitea.api_url }}" + echo "repository: ${{ gitea.repository }}" diff --git a/.gitignore b/.gitignore index 9cff973..5e2b1f9 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,5 @@ pnpm-debug.log* # pagefind -public/pagefind \ No newline at end of file +public/pagefind +SETUP.md diff --git a/src/pages/index.astro b/src/pages/index.astro index e709158..2dd08cc 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -12,11 +12,25 @@ import IconArrowRight from "@/assets/icons/IconArrowRight.svg"; import { SITE } from "@/config"; import { SOCIALS } from "@/constants"; -const posts = await getCollection("blog"); +const events = await getCollection("events"); +const workshops = await getCollection("workshops"); +const news = await getCollection("news"); +const technical = await getCollection("technical"); -const sortedPosts = getSortedPosts(posts); -const featuredPosts = sortedPosts.filter(({ data }) => data.featured); -const recentPosts = sortedPosts.filter(({ data }) => !data.featured); +const sortedEvents = getSortedPosts(events); +const sortedWorkshops = getSortedPosts(workshops); +const sortedNews = getSortedPosts(news); +const sortedTechnical = getSortedPosts(technical); + +const featuredEvents = sortedEvents.filter(({ data }) => data.featured); +const featuredWorkshops = sortedWorkshops.filter(({ data }) => data.featured); +const featuredNews = sortedNews.filter(({ data }) => data.featured); +const featuredTechnical = sortedTechnical.filter(({ data }) => data.featured); + +const recentEvents = sortedEvents.slice(0, SITE.postPerIndex); +const recentWorkshops = sortedWorkshops.slice(0, SITE.postPerIndex); +const recentNews = sortedNews.slice(0, SITE.postPerIndex); +const recentTechnical = sortedTechnical.slice(0, SITE.postPerIndex); --- @@ -24,7 +38,7 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);

- Mingalaba + Welcome to HEC IA

!data.featured);

- AstroPaper is a minimal, responsive, accessible and SEO-friendly Astro - blog theme. This theme follows best practices and provides accessibility - out of the box. Light and dark mode are supported by default. Moreover, - additional color schemes can also be configured. + At HEC IA we make AI and technology more accessible to tomorrow's + managers. Our goal, make people on the campus able to leverage AI to its + full potential.

- Read the blog posts or check - - README - for more info. + Explore our events, workshops, latest news, and technical deep dives to + stay up-to-date with the latest in AI and in the tech world.

{ // only display if at least one social link is enabled @@ -68,44 +76,111 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);
{ - featuredPosts.length > 0 && ( + (featuredEvents.length > 0 || recentEvents.length > 0) && ( ) } { - recentPosts.length > 0 && ( -
-

Recent Posts

+ (featuredWorkshops.length > 0 || recentWorkshops.length > 0) && ( +
+

Workshops

    - {recentPosts.map( - (data, index) => - index < SITE.postPerIndex && - )} + {featuredWorkshops.map(data => ( + + ))} + {recentWorkshops + .slice(0, SITE.postPerIndex - featuredWorkshops.length) + .map(data => ( + + ))}
+
+ + All Workshops + + +
) } -
- - All Posts - - -
+ { + (featuredNews.length > 0 || recentNews.length > 0) && ( +
+

Latest News

+
    + {featuredNews.map(data => ( + + ))} + {recentNews + .slice(0, SITE.postPerIndex - featuredNews.length) + .map(data => ( + + ))} +
+
+ + All News + + +
+
+ ) + } + + { + (featuredTechnical.length > 0 || recentTechnical.length > 0) && ( +
+

+ Technical Deep Dives +

+
    + {featuredTechnical.map(data => ( + + ))} + {recentTechnical + .slice(0, SITE.postPerIndex - featuredTechnical.length) + .map(data => ( + + ))} +
+
+ + All Technical Articles + + +
+
+ ) + }