Skip to content

Commit

Permalink
Add content
Browse files Browse the repository at this point in the history
  • Loading branch information
PuruVJ committed Sep 16, 2023
1 parent ba46626 commit b0b5fbd
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions sites/svelte.dev/src/routes/blog/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,31 @@
<meta name="og:image" content="https://svelte.dev/blog/{$page.params.slug}/card.png" />
</svelte:head>

<article class="post listify text" use:copy_code_descendants>
<h1>{data.post.title}</h1>
<p class="standfirst">{data.post.description}</p>

<p class="byline">
<a href={data.post.author.url}>{data.post.author.name}</a>
<time datetime={data.post.date}>{data.post.date_formatted}</time>
</p>

<DocsOnThisPage
details={{
content: '',
file: '',
path: `/blog/${data.post.slug}`,
sections: data.post.sections,
slug: data.post.slug,
title: data.post.title
}}
orientation="inline"
/>

{@html data.post.content}
</article>
<div class="content">
<article class="post listify text" use:copy_code_descendants>
<h1>{data.post.title}</h1>
<p class="standfirst">{data.post.description}</p>

<p class="byline">
<a href={data.post.author.url}>{data.post.author.name}</a>
<time datetime={data.post.date}>{data.post.date_formatted}</time>
</p>

<DocsOnThisPage
details={{
content: '',
file: '',
path: `/blog/${data.post.slug}`,
sections: data.post.sections,
slug: data.post.slug,
title: data.post.title
}}
orientation="inline"
/>

{@html data.post.content}
</article>
</div>

<!-- the crawler doesn't understand twitter:image etc, so we have to add this hack. TODO fix in sveltekit -->
<img hidden src="/blog/{$page.params.slug}/card.png" alt="Social card for {data.post.title}" />
Expand Down

0 comments on commit b0b5fbd

Please sign in to comment.