diff --git a/examples/starlog/README.md b/examples/starlog/README.md new file mode 100644 index 0000000000..0ccf2dcefe --- /dev/null +++ b/examples/starlog/README.md @@ -0,0 +1,6 @@ +# Starlog +## Release notes theme for Astro + +![starlog-gh](https://github.com/doodlemarks/starlog/assets/2244813/9c5c2e46-665a-437e-a971-053db4dbff63) + +Built with Astro and Sass. Supports both dark and light modes. diff --git a/examples/starlog/astro.config.mjs b/examples/starlog/astro.config.mjs new file mode 100644 index 0000000000..eed4cdda8d --- /dev/null +++ b/examples/starlog/astro.config.mjs @@ -0,0 +1,6 @@ +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + site: "https://example.com", +}); diff --git a/examples/starlog/package.json b/examples/starlog/package.json new file mode 100644 index 0000000000..a602acfdaf --- /dev/null +++ b/examples/starlog/package.json @@ -0,0 +1,17 @@ +{ + "name": "@example/starlog", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "astro": "^4.0.5", + "sass": "^1.69.5", + "sharp": "^0.32.5" + } +} \ No newline at end of file diff --git a/examples/starlog/public/favicon.svg b/examples/starlog/public/favicon.svg new file mode 100644 index 0000000000..f157bd1c5e --- /dev/null +++ b/examples/starlog/public/favicon.svg @@ -0,0 +1,9 @@ + + + + diff --git a/examples/starlog/src/assets/starlog-placeholder-1.jpg b/examples/starlog/src/assets/starlog-placeholder-1.jpg new file mode 100644 index 0000000000..846bdcd452 Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-1.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-14.jpg b/examples/starlog/src/assets/starlog-placeholder-14.jpg new file mode 100644 index 0000000000..e2e0acb9ef Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-14.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-18.jpg b/examples/starlog/src/assets/starlog-placeholder-18.jpg new file mode 100644 index 0000000000..211c85cf54 Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-18.jpg differ diff --git a/examples/starlog/src/assets/starlog-placeholder-2.jpg b/examples/starlog/src/assets/starlog-placeholder-2.jpg new file mode 100644 index 0000000000..2251c1c49d Binary files /dev/null and b/examples/starlog/src/assets/starlog-placeholder-2.jpg differ diff --git a/examples/starlog/src/components/BaseHead.astro b/examples/starlog/src/components/BaseHead.astro new file mode 100644 index 0000000000..40c0baefc9 --- /dev/null +++ b/examples/starlog/src/components/BaseHead.astro @@ -0,0 +1,21 @@ +--- +import { ViewTransitions } from 'astro:transitions'; +import SEO, { type Props as SEOProps } from './SEO.astro'; +import { SiteTitle, SiteDescription } from '../consts'; + +export type Props = Partial +const { + title = SiteTitle, + name = SiteTitle, + description = SiteDescription, + ...seo +} = Astro.props +--- + + + + + + + + diff --git a/examples/starlog/src/components/Footer.astro b/examples/starlog/src/components/Footer.astro new file mode 100644 index 0000000000..6c93cd8eda --- /dev/null +++ b/examples/starlog/src/components/Footer.astro @@ -0,0 +1,12 @@ +--- +import '../styles/global.scss'; +--- + + diff --git a/examples/starlog/src/components/FormattedDate.astro b/examples/starlog/src/components/FormattedDate.astro new file mode 100644 index 0000000000..3cc0d768fc --- /dev/null +++ b/examples/starlog/src/components/FormattedDate.astro @@ -0,0 +1,25 @@ +--- +import type { HTMLAttributes } from 'astro/types'; + +type Props = HTMLAttributes<'time'> & { + date: Date; +} + +const { date, ...attrs } = Astro.props; +--- + + + + diff --git a/examples/starlog/src/components/Header.astro b/examples/starlog/src/components/Header.astro new file mode 100644 index 0000000000..90caab23ee --- /dev/null +++ b/examples/starlog/src/components/Header.astro @@ -0,0 +1,24 @@ +--- +import '../styles/global.scss'; +import { SiteTitle } from '../consts'; +--- + +
+ +
+ + diff --git a/examples/starlog/src/components/SEO.astro b/examples/starlog/src/components/SEO.astro new file mode 100644 index 0000000000..7533f85280 --- /dev/null +++ b/examples/starlog/src/components/SEO.astro @@ -0,0 +1,87 @@ +--- +import type { ImageMetadata } from 'astro' +type Image = { + src: string | ImageMetadata, + alt: string +} + +type SEOMetadata = { + name: string + title: string + description: string + image?: Image | undefined + canonicalURL?: URL | string | undefined + locale?: string +} + +type OpenGraph = Partial & { + type?: string +} + +type Twitter = Partial & { + handle?: string + card?: 'summary' | 'summary_large_image' +} + +export type Props = SEOMetadata & { + og?: OpenGraph + twitter?: Twitter +} + +const { + name, + title, + description, + image, + locale = 'en', + canonicalURL = new URL(Astro.url.pathname, Astro.site), +} = Astro.props + +const og = { + name, + title, + description, + canonicalURL, + image, + locale, + type: "website", + ...Astro.props.og ?? {}, +} satisfies OpenGraph + +const twitter = { + name, + title, + description, + canonicalURL, + image, + locale, + card: "summary_large_image", + ...Astro.props.twitter, +} + +function normalizeImageUrl(image: string | ImageMetadata) { + return typeof image === 'string' ? image : image.src +} +--- + + + + + + + + + + + + +{og.image && } +{og.image && } + + + + + + +{twitter.image && } +{twitter.image && } diff --git a/examples/starlog/src/consts.ts b/examples/starlog/src/consts.ts new file mode 100644 index 0000000000..4541a150d6 --- /dev/null +++ b/examples/starlog/src/consts.ts @@ -0,0 +1,6 @@ +// Place any global data in this file. +// You can import this data from anywhere in your site by using the `import` keyword. + +export const SiteTitle = 'Starlog'; +export const SiteDescription = 'Welcome to my website!'; + diff --git a/examples/starlog/src/content/config.ts b/examples/starlog/src/content/config.ts new file mode 100644 index 0000000000..ae9e67cdca --- /dev/null +++ b/examples/starlog/src/content/config.ts @@ -0,0 +1,19 @@ +import { defineCollection, z } from "astro:content" + +const releases = defineCollection({ + // Type-check frontmatter using a schema + schema: ({ image }) => z.object({ + title: z.string(), + description: z.string(), + versionNumber: z.string(), + image: z.object({ + src: image(), + alt: z.string() + }), + // Transform string to Date object + date: z.date({ coerce: true }), + }) +}) + +export const collections = { releases }; + diff --git a/examples/starlog/src/content/releases/1_0.md b/examples/starlog/src/content/releases/1_0.md new file mode 100644 index 0000000000..4d977f19c7 --- /dev/null +++ b/examples/starlog/src/content/releases/1_0.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.0!' +date: '2022-03-21' +versionNumber: '1.0' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-1.jpg' + alt: 'The full Astro logo.' +--- + +## A New World with 1.0 + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-1.jpg) + +Hey there, Nebulous users! We're back with some exciting updates that will turbocharge your Nebulous experience. Here's the lowdown: + +### ๐Ÿฟ New Features & Enhancements + +* __NebulaProtect Supercharged:__ Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable. +* __NebulaConnect for Teams:__ Collaboration is a breeze with integrated project management tools. +* __Speed Boost Galore:__ We've fine-tuned Nebulous for ultimate speed and responsiveness. + +### ๐Ÿž Bug Fixes + +* Kicked pesky crashes out the door for NebulaSync. +* Fixed rare data hiccups during file transfers. +* Nebulous is now even friendly with older devices. + +Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level! diff --git a/examples/starlog/src/content/releases/1_4.md b/examples/starlog/src/content/releases/1_4.md new file mode 100644 index 0000000000..aca421d785 --- /dev/null +++ b/examples/starlog/src/content/releases/1_4.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.8!' +date: '2022-04-16' +versionNumber: '1.4' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-14.jpg' + alt: 'The full Astro logo.' +--- + +## Go further with 1.4 + +![Nebulous 1.4 Release](../../assets/starlog-placeholder-14.jpg) + +Hello, Nebulous enthusiasts! It's that time againโ€”time for us to unveil the latest and greatest in our tech universe. Buckle up as we introduce you to the future of Nebulous: + +### ๐Ÿฟ New Features & Enhancements + +* __NebulaSync Quantum:__ Prepare for a mind-blowing file syncing experience. It's faster, smarter, and more intuitive than ever before. +* __NebulaAI Odyssey:__ Welcome to the era of NebulaAI Odysseyโ€”a journey into the boundless possibilities of artificial intelligence. From image manipulation to language translation, Odyssey empowers you like never before. + +### ๐Ÿž Bug Fixes + +* Squashed even more bugs, making NebulaSync and other features more reliable than ever. +* Streamlined data transfer processes for flawless file exchanges. +* Extended support for older devices to ensure everyone enjoys Nebulous. +* Elevating error handling to the next level, ensuring a hiccup-free experience. + +Thank you for being a part of the Nebulous journey. Your feedback fuels our innovation, so don't hesitate to share your thoughts or report any hiccups with our dedicated support team. Together, we're shaping the future of tech with Nebulous! diff --git a/examples/starlog/src/content/releases/1_8.md b/examples/starlog/src/content/releases/1_8.md new file mode 100644 index 0000000000..b1fdd93d6f --- /dev/null +++ b/examples/starlog/src/content/releases/1_8.md @@ -0,0 +1,29 @@ +--- +title: 'Introducing Nebulous 1.8!' +date: '2022-06-01' +versionNumber: '1.8' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-18.jpg' + alt: 'The full Astro logo.' +--- + +## Faster, Stronger, Betterer + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-18.jpg) + +Hey there, Nebulous users! We're back with some exciting updates that will turbocharge your Nebulous experience. Here's the lowdown: + +### New Features & Enhancements + +* __NebulaProtect Supercharged:__ Enjoy beefed-up security and real-time monitoring to keep your digital fortress unbreachable. +* __NebulaConnect for Teams:__ Collaboration is a breeze with integrated project management tools. +* __Speed Boost Galore:__ We've fine-tuned Nebulous for ultimate speed and responsiveness. + +### ๐Ÿž Bug Fixes + +* Kicked pesky crashes out the door for NebulaSync. +* Fixed rare data hiccups during file transfers. +* Nebulous is now even friendly with older devices. + +Thank you for making Nebulous your tech partner. We thrive on your feedback, so if you have ideas or run into bumps, don't hesitate to drop a line to our support wizards. Together, we're taking Nebulous to the next level! diff --git a/examples/starlog/src/content/releases/2_0.md b/examples/starlog/src/content/releases/2_0.md new file mode 100644 index 0000000000..5316e5a755 --- /dev/null +++ b/examples/starlog/src/content/releases/2_0.md @@ -0,0 +1,37 @@ +--- +title: 'Introducing Nebulous 2.0!' +date: '2022-07-01' +versionNumber: '2.0' +description: 'This is the first post of my new Astro blog.' +image: + src: '../../assets/starlog-placeholder-2.jpg' + alt: 'The full Astro logo.' +--- + +## Introducing Nebulous 2.0! + +![Nebulous 2.0 Release](../../assets/starlog-placeholder-2.jpg) + +Greetings, Nebulous users! We're excited to bring you the latest updates in our [ever-evolving tech ecosystem](#). In this release, we're introducing some exciting new features and squashing a few pesky bugs. Let's dive in! + +### ๐Ÿฟ New Features & Enhancements + +* __NebulaSync v2.0:__ We're thrilled to introduce NebulaSync 2.0, our revamped file synchronization tool. It now offers blazing-fast sync speeds, improved reliability, and enhanced cross-device compatibility. +* __Enhanced NebulaProtect:__ NebulaProtect, our comprehensive security suite, has received a major update. Enjoy advanced threat detection, and real-time monitoring. +* __NebulaConnect for Teams:__ Collaborate effortlessly with NebulaConnect for Teams. This powerful feature allows seamless integration with your favorite project management tools, enabling you to manage tasks, share documents, and track progress in real-time. + +### ๐Ÿž Bug Fixes + +* Resolved occasional crashing issues when using NebulaSync. +* Fixed a bug causing data corruption in rare cases during file transfers. +* Improved compatibility with older devices to ensure a seamless experience for all users. +* Enhanced error handling and reporting for a smoother user experience. + +### ๐Ÿ‘€ Coming Soon + +We can't spill all the beans just yet, but we're thrilled to give you a sneak peek of what's coming in the next Nebulous release: +* __NebulaWallet:__ A secure and user-friendly cryptocurrency wallet integrated directly into Nebulous for seamless digital asset management. +* __NebulaConnect Mobile:__ Take your collaboration to the next level with our upcoming mobile app, enabling you to work on the go. +* __NebulaLabs:__ Our developer tools and API enhancements, providing you with even more customization options and possibilities. + +If you have any suggestions or encounter any issues, don't hesitate to reach out to our support team. Together, we'll continue to make Nebulous the ultimate tech solution for you. diff --git a/examples/starlog/src/layouts/IndexLayout.astro b/examples/starlog/src/layouts/IndexLayout.astro new file mode 100644 index 0000000000..faa083b96f --- /dev/null +++ b/examples/starlog/src/layouts/IndexLayout.astro @@ -0,0 +1,23 @@ +--- +import BaseHead, { type Props as HeadProps } from "../components/BaseHead.astro"; +import Header from "../components/Header.astro"; +import Footer from "../components/Footer.astro"; + +type Props = HeadProps + +const { ...head } = Astro.props +--- + + + + + + + +
+
+ +