{title}
43 |52 |
├── .nvmrc
├── src
├── content
│ ├── topic
│ │ ├── docs.md
│ │ ├── front-end.md
│ │ ├── user-experience.md
│ │ └── ai.md
│ ├── author
│ │ ├── anonymous.md
│ │ └── eddy-vinck.md
│ ├── config.ts
│ └── blog
│ │ ├── using-mdx.mdx
│ │ ├── third-post.md
│ │ ├── second-post.md
│ │ ├── first-post.md
│ │ ├── markdown-style-guide.md
│ │ ├── enabling-emoji-reactions.md
│ │ └── engineering-blog.md
├── assets
│ └── images
│ │ ├── author
│ │ ├── anonymous.jpg
│ │ └── eddy-vinck.jpg
│ │ └── blog
│ │ ├── readme
│ │ └── readme.jpg
│ │ └── enabling-emoji-reactions
│ │ ├── post-reactions-collection.png
│ │ ├── post-reactions-for-article.png
│ │ └── markdown-and-appwrite-matching-id.png
├── components
│ ├── Heading.astro
│ ├── Footer.astro
│ ├── FormattedDate.astro
│ ├── Searchbar.astro
│ ├── HeaderDropdownLink.astro
│ ├── PostList.astro
│ ├── LatestPosts.astro
│ ├── HeaderLink.astro
│ ├── Post.astro
│ ├── HeaderDropdown.astro
│ ├── backend-services
│ │ ├── EmojiReactions.astro
│ │ ├── RankedPost.astro
│ │ └── EmojiReactionsButtons.tsx
│ ├── PostListItem.tsx
│ ├── BaseHead.astro
│ ├── TopicList.astro
│ ├── AuthorList.astro
│ ├── DarkModeToggle.astro
│ ├── AuthorInfo.astro
│ ├── Search.tsx
│ └── Header.astro
├── pages
│ ├── search.astro
│ ├── 404.astro
│ ├── topics
│ │ ├── index.astro
│ │ ├── uncategorized.astro
│ │ └── [...slug].astro
│ ├── rss.xml.js
│ ├── authors
│ │ └── index.astro
│ ├── blog
│ │ ├── [post].astro
│ │ └── [...page].astro
│ ├── api
│ │ ├── post-reactions-ranked.ts
│ │ └── post-reactions
│ │ │ └── [post].ts
│ ├── index.astro
│ ├── blog-ranking.astro
│ └── about.md
├── consts.ts
├── env.d.ts
├── layouts
│ ├── Page.astro
│ ├── TransitionContent.astro
│ └── BlogPost.astro
├── lib
│ ├── ratelimit.ts
│ └── appwrite
│ │ └── appwrite.server.ts
└── styles
│ └── global.css
├── public
├── placeholder-hero.jpg
├── placeholder-about.jpg
├── placeholder-social.jpg
└── favicon.svg
├── .vscode
├── extensions.json
└── launch.json
├── .netlify
└── v1
│ └── config.json
├── tsconfig.json
├── .env.example
├── .gitignore
├── astro.config.mjs
├── tailwind.config.cjs
├── LICENSE
├── package.json
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | 18.18.0
--------------------------------------------------------------------------------
/src/content/topic/docs.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Documentation
3 | ---
4 |
--------------------------------------------------------------------------------
/src/content/topic/front-end.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Front-end
3 | ---
4 |
5 | Front-end web development
6 |
--------------------------------------------------------------------------------
/src/content/topic/user-experience.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: User Experience
3 | ---
4 |
5 | User Experience is important
6 |
--------------------------------------------------------------------------------
/public/placeholder-hero.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/public/placeholder-hero.jpg
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["astro-build.astro-vscode"],
3 | "unwantedRecommendations": []
4 | }
5 |
--------------------------------------------------------------------------------
/public/placeholder-about.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/public/placeholder-about.jpg
--------------------------------------------------------------------------------
/public/placeholder-social.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/public/placeholder-social.jpg
--------------------------------------------------------------------------------
/src/assets/images/author/anonymous.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/author/anonymous.jpg
--------------------------------------------------------------------------------
/src/assets/images/author/eddy-vinck.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/author/eddy-vinck.jpg
--------------------------------------------------------------------------------
/src/assets/images/blog/readme/readme.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/blog/readme/readme.jpg
--------------------------------------------------------------------------------
/.netlify/v1/config.json:
--------------------------------------------------------------------------------
1 | {"images":{"remote_images":[]},"headers":[{"for":"/_astro/*","values":{"Cache-Control":"public, max-age=31536000, immutable"}}]}
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "astro/tsconfigs/strictest",
3 | "compilerOptions": {
4 | "strictNullChecks": true,
5 | "jsx": "preserve",
6 | "jsxImportSource": "solid-js"
7 | }
8 | }
--------------------------------------------------------------------------------
/src/assets/images/blog/enabling-emoji-reactions/post-reactions-collection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/blog/enabling-emoji-reactions/post-reactions-collection.png
--------------------------------------------------------------------------------
/src/assets/images/blog/enabling-emoji-reactions/post-reactions-for-article.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/blog/enabling-emoji-reactions/post-reactions-for-article.png
--------------------------------------------------------------------------------
/src/assets/images/blog/enabling-emoji-reactions/markdown-and-appwrite-matching-id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EddyVinck/astro-engineering-blog/HEAD/src/assets/images/blog/enabling-emoji-reactions/markdown-and-appwrite-matching-id.png
--------------------------------------------------------------------------------
/src/components/Heading.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const H: any = `h${Astro.props.headingLevel}`;
3 |
4 | type Props = {
5 | headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
6 | class?: string;
7 | };
8 | ---
9 |
10 | Search for any title, description or post contentSearch
8 | 404 - not found :(
10 | All the topics from our blog
11 |
No posts yet.
} 20 | { 21 | uncategorizedPost.length > 0 && ( 22 | <> 23 |18 | Welcome to the Engineering Blog Starter template for Astro. This template serves as a starting point for engineering blogs with 21 | multiple contributors. 22 |
23 |24 | Have fun! If you get stuck, remember to read the docs or join us on Discord to ask questions. 27 |
28 |29 | This theme was made by Eddy Vinck. 30 |
31 |{description}
18 |Written by {authors.join(" & ")}
20 | 21 |Topics: {topicsList}
31 |No posts yet.
} 35 | { 36 | topicPosts.length > 0 && ( 37 | <> 38 |22 | 25 | { 26 | rank < 4 ? ( 27 | 28 | {rank === 1 29 | ? "🥇" 30 | : rank === 2 31 | ? "🥈" 32 | : rank === 3 33 | ? "🥉" 34 | : `#${rank}`} 35 | 36 | ) : ( 37 | #{rank} 38 | ) 39 | } 40 | 41 |
42 |My posts ({authorPosts.length})
55 |My links
75 |Based on the emoji reactions for each post
71 | { 72 | SHOW_DEBUG_INFO && ( 73 |Post data from markdown files from Astro:
76 |{JSON.stringify(debugPostData, null, 2)}
77 | Post reaction data from Appwrite:
78 |{JSON.stringify(debugPostReactionData, null, 2)}
79 | Combined ranking data of {debugRankingData?.length ?? 0} posts:
80 |{JSON.stringify(debugRankingData, null, 2)}
81 | Test
74 | 75 | 76 | ``` 77 | 78 | ## List Types 79 | 80 | ### Ordered List 81 | 82 | 1. First item 83 | 2. Second item 84 | 3. Third item 85 | 86 | ### Unordered List 87 | 88 | - List item 89 | - Another item 90 | - And another item 91 | 92 | ### Nested list 93 | 94 | - Fruit 95 | - Apple 96 | - Orange 97 | - Banana 98 | - Dairy 99 | - Milk 100 | - Cheese 101 | 102 | ## Other Elements — abbr, sub, sup, kbd, mark 103 | 104 | GIF is a bitmap image format. 105 | 106 | H2O 107 | 108 | Xn + Yn = Zn 109 | 110 | Press CTRL+ALT+Delete to end the session. 111 | 112 | Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. 113 | -------------------------------------------------------------------------------- /src/pages/blog/[...page].astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Layout from "../../layouts/TransitionContent.astro"; 3 | import { type CollectionEntry, getCollection } from "astro:content"; 4 | import type { GetStaticPaths, Page } from "astro"; 5 | import PostList from "../../components/PostList.astro"; 6 | import { PAGINATION_POSTS_PER_PAGE } from "../../consts"; 7 | import { tryInitNewBlogPostsReactionsInDatabaseCollection } from "../../lib/appwrite/appwrite.server"; 8 | import { AppwriteException } from "node-appwrite"; 9 | 10 | export const prerender = true; 11 | 12 | export const getStaticPaths: GetStaticPaths = async ({ paginate }) => { 13 | const posts = (await getCollection("blog")) 14 | .filter((post) => post.data.draft === false) 15 | .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()); 16 | 17 | // This only runs if Appwrite is setup, which is entirely optional for this Astro template 18 | if (import.meta.env.SECRET_APPWRITE_API_KEY) { 19 | try { 20 | await tryInitNewBlogPostsReactionsInDatabaseCollection(posts); 21 | } catch (error: unknown) { 22 | if (error instanceof AppwriteException) { 23 | console.log( 24 | `⚠️ There was a problem intiializing your posts in Appwrite, the (optional) backend services will not work. Message: ${error.message}` 25 | ); 26 | } 27 | } 28 | } 29 | 30 | return paginate(posts, { 31 | pageSize: PAGINATION_POSTS_PER_PAGE, 32 | }); 33 | }; 34 | 35 | export type Props = { 36 | page: Page48 | Browse blog posts by{" "} 49 | topic. 50 |
51 | { 52 | !!import.meta.env.SECRET_APPWRITE_API_KEY && ( 53 |54 | Or check out the blog post{" "} 55 | 56 | ranking page 57 | 58 | 🏆 59 |
60 | ) 61 | } 62 |