feat: hide blog posts
This commit is contained in:
parent
94ca2a8a2a
commit
c891a924cd
6 changed files with 49 additions and 6 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script lang="ts">
|
||||||
import ThemeSwitcher from '../components/ThemeSwitcher.svelte';
|
import ThemeSwitcher from '../components/ThemeSwitcher.svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { mdiCopyright } from '@mdi/js';
|
import { mdiCopyright } from '@mdi/js';
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
import MoveUpButton from '../components/MoveUpButton.svelte';
|
import MoveUpButton from '../components/MoveUpButton.svelte';
|
||||||
|
|
||||||
const NAV_ITEMS = [
|
const NAV_ITEMS = [
|
||||||
|
{ href: '/', label: 'Home' },
|
||||||
{ href: '/blog', label: 'Blog' },
|
{ href: '/blog', label: 'Blog' },
|
||||||
{ href: '/contact', label: 'Contact' },
|
{ href: '/contact', label: 'Contact' },
|
||||||
];
|
];
|
||||||
|
|
@ -19,8 +20,13 @@
|
||||||
|
|
||||||
<svelte:head
|
<svelte:head
|
||||||
><title>{$page.stuff.title} - AlexDaichendt</title>
|
><title>{$page.stuff.title} - AlexDaichendt</title>
|
||||||
<meta name="description" content={$page.stuff.description} />
|
{#if $page.stuff.description}
|
||||||
|
<meta name="description" content={$page.stuff.description} />
|
||||||
|
{/if}
|
||||||
<meta name="author" content="Alexander Daichendt" />
|
<meta name="author" content="Alexander Daichendt" />
|
||||||
|
{#if $page.stuff.keywords}
|
||||||
|
<meta name="keywords" content={$page.stuff.keywords.join(',')} />
|
||||||
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<div class="container upper">
|
<div class="container upper">
|
||||||
|
|
@ -35,7 +41,12 @@
|
||||||
<nav>
|
<nav>
|
||||||
<ol>
|
<ol>
|
||||||
{#each NAV_ITEMS as navItem}
|
{#each NAV_ITEMS as navItem}
|
||||||
<li class="navItem {$page.url.pathname.includes(navItem.href) ? 'active' : ''}">
|
<li
|
||||||
|
class="navItem {$page.url.pathname === navItem.href ||
|
||||||
|
(navItem.href === '/blog' && $page.url.pathname.includes('/blog'))
|
||||||
|
? 'active'
|
||||||
|
: ''}"
|
||||||
|
>
|
||||||
<a href={navItem.href}>{navItem.label}</a>
|
<a href={navItem.href}>{navItem.label}</a>
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
|
||||||
1
src/routes/admin/index.svelte
Normal file
1
src/routes/admin/index.svelte
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<h1>Administration Area</h1>
|
||||||
|
|
@ -10,10 +10,12 @@ export async function GET() {
|
||||||
|
|
||||||
resolved.forEach(({ metadata }, index) => {
|
resolved.forEach(({ metadata }, index) => {
|
||||||
const path = Object.keys(modules)[index].replace('.svx', '');
|
const path = Object.keys(modules)[index].replace('.svx', '');
|
||||||
posts.push({ ...metadata, href: `blog/${path}` });
|
if (!metadata.hidden) posts.push({ ...metadata, href: `blog/${path}` });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
posts.sort((a, b) => new Date(b.date).valueOf() - new Date(a.date).valueOf());
|
||||||
|
|
||||||
return {
|
return {
|
||||||
body: { posts }
|
body: { posts },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
date: '22-05-08'
|
date: '2022-05-08'
|
||||||
title: 'Arrow OS on Redmi Note 7'
|
title: 'Arrow OS on Redmi Note 7'
|
||||||
description: 'Learn how to install ArrowOS, based on Android 12 on your Redmi Note 7 (lavender) phone! Also installs root and microG for a BigTech free phone.'
|
description: 'Learn how to install ArrowOS, based on Android 12 on your Redmi Note 7 (lavender) phone! Also installs root and microG for a BigTech free phone.'
|
||||||
keywords:
|
keywords:
|
||||||
26
src/routes/blog/software-recommendations.svx
Normal file
26
src/routes/blog/software-recommendations.svx
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
date: '2022-07-26'
|
||||||
|
title: 'Software recommendations for a privacy conscious digital life'
|
||||||
|
description: ''
|
||||||
|
keywords:
|
||||||
|
- privacy
|
||||||
|
hidden: true
|
||||||
|
---
|
||||||
|
|
||||||
|
<script context="module" lang="ts">
|
||||||
|
export async function load() {
|
||||||
|
return {
|
||||||
|
stuff: {
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
keywords,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
# Useful software I like
|
||||||
|
|
||||||
|
Moving away from BigTech is not an easy task. However, in these days, there are plenty polished
|
||||||
|
alternatives out there. Over the years I tried out many different services and software. I will
|
||||||
|
formulate some of my opinions here.
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
export interface BlogPostFrontmatter {
|
export interface BlogPostFrontmatter {
|
||||||
date: string;
|
date: string;
|
||||||
title: string;
|
title: string;
|
||||||
|
description: string;
|
||||||
|
keywords: string[];
|
||||||
|
hidden: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BlogPostMeta extends BlogPostFrontmatter {
|
export interface BlogPostMeta extends BlogPostFrontmatter {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue