mirror of
https://github.com/kogakure/website-astro-stefanimhoff.de.git
synced 2026-02-04 04:25:28 +00:00
feat: add schema.org data
This commit is contained in:
@@ -1,9 +1,30 @@
|
||||
---
|
||||
import { site } from '../data/site';
|
||||
|
||||
import GridLayout from './GridLayout.astro';
|
||||
import PageTitle from '../components/PageTitle.astro';
|
||||
import Picture from '../components/Picture.astro';
|
||||
|
||||
const { frontmatter } = Astro.props;
|
||||
const schema = JSON.stringify({
|
||||
'@context': 'https://schema.org/',
|
||||
'@type': 'Person',
|
||||
name: site.author,
|
||||
url: site.url,
|
||||
image: site.url + '/assets/images/ai-portrait-stefan-imhoff.png',
|
||||
jobTitle: 'Senior Software Engineer',
|
||||
worksFor: {
|
||||
'@type': 'Organization',
|
||||
name: 'NEW WORK SE',
|
||||
},
|
||||
sameAs: [
|
||||
'https://twitter.com/kogakure',
|
||||
'https://www.instagram.com/kogakure/',
|
||||
'https://www.youtube.com/@kogakure',
|
||||
'https://www.linkedin.com/in/kogakure/',
|
||||
'https://github.com/kogakure',
|
||||
],
|
||||
});
|
||||
---
|
||||
|
||||
<GridLayout title={frontmatter.title} grid="narrow" {...frontmatter}>
|
||||
@@ -22,4 +43,5 @@ const { frontmatter } = Astro.props;
|
||||
/>
|
||||
</div>
|
||||
<slot />
|
||||
<script type="application/ld+json" set:html={schema} />
|
||||
</GridLayout>
|
||||
|
||||
@@ -35,6 +35,13 @@ const fullTitle = `${title} · ${site.description}`;
|
||||
const fullDescription = description || site.description;
|
||||
const fullUrl = site.url + currentPath;
|
||||
const fullImage = site.url + cover;
|
||||
|
||||
const schema = JSON.stringify({
|
||||
'@context': 'https://schema.org/',
|
||||
'@type': 'WebSite',
|
||||
name: site.author,
|
||||
url: site.url,
|
||||
});
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -167,6 +174,7 @@ const fullImage = site.url + cover;
|
||||
'👋 I see you’re interested in the source code of this site? You can find it here 👉 https://github.com/kogakure/website-astro-stefanimhoff.de'
|
||||
);
|
||||
</script>
|
||||
<script type="application/ld+json" set:html={schema} />
|
||||
<style is:global>
|
||||
.astro-code {
|
||||
@apply overflow-auto rounded-2 p-[1em] font-mono text-code mbe-10 mbs-0;
|
||||
|
||||
Reference in New Issue
Block a user