Basic adjustments for my own first blog

This commit is contained in:
Samuel Andert 2023-07-11 14:37:13 +02:00
parent fba0d5b678
commit ad7e4c8efe
9 changed files with 17 additions and 51 deletions

View File

@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="icon" href="https://fav.farm/🔥" />
<link rel="alternate" type="application/atom+xml" href="/rss.xml" />
<script type="module">
const theme = localStorage.getItem('color-scheme')

View File

@ -1,5 +1,5 @@
import { dev } from '$app/environment'
export const title = 'Shakespeare'
export const description = 'SvelteKit blog for poets'
export const url = dev ? 'http://localhost:5173' : 'https://joyofcode.xyz'
export const title = 'Samuel Andert'
export const description = 'on the journey to ignite humanities full potential towards a thriving life experience for every human'
export const url = dev ? 'http://localhost:5173' : 'https://blog.andert.me'

View File

@ -5,7 +5,7 @@ date: '2023-4-16'
categories:
- sveltekit
- svelte
published: true
published: false
---
<script>

View File

@ -35,6 +35,7 @@
main {
padding-block: var(--size-9);
padding: 2rem;
}
@media (min-width: 1440px) {

View File

@ -1,2 +1,8 @@
<h1>About</h1>
<p>I like long walks on the beach.</p>
<h1>Samuel Andert</h1>
<h4>
on the journey to ignite humanities full potential towards a thriving life experience for every
human
</h4>
<a href="https://twitter.com/samuelandert">Twitter</a>
<a href="https://mastodon.andert.me/@samuelandert">Mastodon</a>
<a href="https://www.linkedin.com/in/samuel-andert-797b6211b">LinkedIn</a>

View File

@ -1,2 +0,0 @@
<h1>Contact</h1>
<p>New phone, who dis?</p>

View File

@ -10,6 +10,7 @@
footer {
padding-block: var(--size-7);
border-top: 1px solid var(--border);
padding: 2rem;
}
p {

View File

@ -10,13 +10,10 @@
<ul class="links">
<li>
<a href="/about">About</a>
<a href="/about">About Me</a>
</li>
<li>
<a href="/contact">Contact</a>
</li>
<li>
<a href="/rss.xml" target="_blank">RSS</a>
<a href="/">Blog</a>
</li>
</ul>
@ -25,6 +22,7 @@
<style>
nav {
padding: 2rem;
padding-block: var(--size-7);
}

View File

@ -1,37 +0,0 @@
import * as config from '$lib/config'
import type { Post } from '$lib/types'
export const prerender = true
export async function GET({ fetch }) {
const response = await fetch('api/posts')
const posts: Post[] = await response.json()
const headers = { 'Content-Type': 'application/xml' }
const xml = `
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>${config.title}</title>
<description>${config.description}</description>
<link>${config.url}</link>
<atom:link href="${config.url}/rss.xml" rel="self" type="application/rss+xml"/>
${posts
.map(
(post) => `
<item>
<title>${post.title}</title>
<description>${post.description}</description>
<link>${config.url}/${post.slug}</link>
<guid isPermaLink="true">${config.url}/${post.slug}</guid>
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
</item>
`
)
.join('')}
</channel>
</rss>
`.trim()
return new Response(xml, { headers })
}