Skip to content

Commit

Permalink
add starlog (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMapleLeaf authored Jan 2, 2024
1 parent 76e8517 commit 027db03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Binary file added public/previews/starlog.webp
Binary file not shown.
13 changes: 11 additions & 2 deletions src/data/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ const TITLES = new Map([
['framework-multiple', 'Kitchen Sink (Multiple Frameworks)'],
['basics', 'Just the Basics'],
[toStarlightName('basics'), 'Starlight'],
['starlog', 'Starlog'],
['minimal', 'Empty Project'],
]);
export const TOP_SECTION = 'Getting Started';
const TOP_SECTION_ORDER = ['basics', 'blog', toStarlightName('basics'), 'portfolio', 'minimal'];
const TOP_SECTION_ORDER = [
'basics',
'blog',
toStarlightName('basics'),
'starlog',
'portfolio',
'minimal',
];

const FEATURED_INTEGRATIONS = new Set(['tailwindcss']);
const FRAMEWORK_ORDER = ['react', 'preact', 'vue', 'svelte', 'lit', 'solid'].map(
Expand Down Expand Up @@ -90,7 +98,7 @@ function groupExamplesByCategory(examples: ExampleData[], ref: string) {
gettingStartedItems.push(data);
} else if (example.name.startsWith('with-')) {
if (FEATURED_INTEGRATIONS.has(example.name.replace('with-', ''))) {
integrations.splice(0, 0, data);
integrations.unshift(data);
} else {
integrations.push(data);
}
Expand Down Expand Up @@ -132,6 +140,7 @@ export async function getExamples(ref = 'latest') {
try {
await fetch(githubRequest(astroContentUrl(ref)));
} catch (e) {
console.error(`Failed to fetch examples for ref "${ref}" -`, e);
// `next` branch is missing, fallback to `main`
ref = 'main';
}
Expand Down

0 comments on commit 027db03

Please sign in to comment.