diff --git a/examples/social-feed/public/avatar.webp b/examples/social-feed/src/assets/avatar.webp
similarity index 100%
rename from examples/social-feed/public/avatar.webp
rename to examples/social-feed/src/assets/avatar.webp
diff --git a/examples/social-feed/src/components/ArticleHeader.astro b/examples/social-feed/src/components/ArticleHeader.astro
new file mode 100644
index 000000000..ed3c838e8
--- /dev/null
+++ b/examples/social-feed/src/components/ArticleHeader.astro
@@ -0,0 +1,131 @@
+---
+import type { HTMLAttributes } from 'astro/types';
+import { Image } from 'astro:assets';
+import { CollectionEntry } from 'astro:content';
+import getReadingTime from 'reading-time';
+import FormattedDate from './FormattedDate.astro';
+import Icon from './Icon.astro';
+import TagList from './TagList.astro';
+import settings from '../settings.js';
+
+interface Props extends HTMLAttributes<'header'> {
+ article: CollectionEntry<'posts'>;
+}
+
+const { article, ...attrs } = Astro.props;
+
+const { text: readingTime } = await getReadingTime(article.body);
+---
+
+{article.data.title}
+
+ {article.data.tags?.length > 0 &&
-
-
-
-
+
+
+
+
@@ -89,4 +90,10 @@ const { page } = Astro.props; header > * + * { margin-top: 0.625rem; } + .u-avatar { + width: 3.75rem; + height: 3.75rem; + border-radius: var(--theme-radius-full); + background-color: var(--theme-shade-subtle); + } diff --git a/examples/social-feed/src/settings.ts b/examples/social-feed/src/settings.ts index 130359db6..d8746748c 100644 --- a/examples/social-feed/src/settings.ts +++ b/examples/social-feed/src/settings.ts @@ -1,24 +1,26 @@ +import avatar from './assets/avatar.webp' + export default { - name: 'Houston Astro', - username: '@houston', - avatar: { - src: '/avatar.webp', - alt: 'Astro mascot Houston smiling', - }, - rss: { - title: 'Houston Astroโs Feed', - description: 'Stay up-to-date with the latest posts from Houston Astro!', - }, - pronouns: 'They/Them', - location: 'Space', - homepage: 'https://astro.build', - social: { - twitter: 'https://twitter.com/astrodotbuild', - twitch: 'https://www.twitch.tv/bholmesdev', - github: 'https://github.com/withastro', - devto: 'https://dev.to/search?q=astro', - codepen: 'https://codepen.io/delucis', - mastodon: 'https://m.webtoo.ls/@astro', - youtube: 'https://www.youtube.com/@astrodotbuild', - }, + name: 'Houston Astro', + username: '@houston', + avatar: { + src: avatar, + alt: 'Astro mascot Houston smiling', + }, + rss: { + title: 'Houston Astroโs Feed', + description: 'Stay up-to-date with the latest posts from Houston Astro!', + }, + pronouns: 'They/Them', + location: 'Space', + homepage: 'https://astro.build', + social: { + twitter: 'https://twitter.com/astrodotbuild', + twitch: 'https://www.twitch.tv/bholmesdev', + github: 'https://github.com/withastro', + devto: 'https://dev.to/search?q=astro', + codepen: 'https://codepen.io/delucis', + mastodon: 'https://m.webtoo.ls/@astro', + youtube: 'https://www.youtube.com/@astrodotbuild', + }, } as const;