Skip to content

Commit

Permalink
fix image and add some new draft post
Browse files Browse the repository at this point in the history
  • Loading branch information
ludusrusso committed Jun 25, 2022
1 parent b3396b2 commit c78c863
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 270 deletions.
18 changes: 8 additions & 10 deletions .obsidian/workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
"type": "split",
"children": [
{
"id": "258c2602133fbda8",
"id": "513f31c2cae1e151",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "courses/nextjs-megatutorial/00006-creating-blogs/index.md",
"mode": "source",
"source": false
}
"type": "empty",
"state": {}
}
}
],
Expand Down Expand Up @@ -53,7 +49,7 @@
}
],
"direction": "horizontal",
"width": 300
"width": 490.5
},
"right": {
"id": "31de3ce749f11789",
Expand All @@ -69,7 +65,6 @@
"state": {
"type": "backlink",
"state": {
"file": "courses/nextjs-megatutorial/00006-creating-blogs/index.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -87,8 +82,11 @@
"width": 300,
"collapsed": true
},
"active": "258c2602133fbda8",
"active": "513f31c2cae1e151",
"lastOpenFiles": [
"content/blog/it/2022-06-0004-telegram-bot-node-4/main.png",
"content/blog/it/2022-06-0004-telegram-bot-node-preparazione-deploy/index.md",
"content/blog/it/2022-06-0004-telegram-bot-node-preparazione-deploy/main.jpg",
"courses/nextjs-megatutorial/00006-creating-blogs/index.md",
"courses/nextjs-megatutorial/00006-creating-blogs/home-simple.png",
"courses/nextjs-megatutorial/00006-creating-blogs/home.png"
Expand Down
22 changes: 17 additions & 5 deletions components/seo.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
import Head from 'next/head';
import { config } from '../utils/config';
import Head from "next/head";
import { config } from "../utils/config";

interface SEOProps {
description?: string;
title?: string;
image?: string;
type?: 'website' | 'article';
type?: "website" | "article";
author?: string;
date?: Date;
}

export const SEO = ({ description, title, image, type = 'website', author = 'ludusrusso', date }: SEOProps) => {
export const SEO = ({
description,
title,
image,
type = "website",
author = "ludusrusso",
date,
}: SEOProps) => {
const siteTitle = title ? `${title} | ${config.title}` : config.title;
image = image || config.image;
if (!image.startsWith("http")) {
image = new URL(image, "https://" + config.baseUrl).href;
}
description = description || config.description;

return (
Expand All @@ -30,7 +40,9 @@ export const SEO = ({ description, title, image, type = 'website', author = 'lud
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta name="author" content={author} />
{date && <meta property="article:published_time" content={date.toISOString()} />}
{date && (
<meta property="article:published_time" content={date.toISOString()} />
)}
</Head>
);
};
247 changes: 0 additions & 247 deletions content/blog/it/2022-06-0004-telegram-bot-node-4/index.mdx

This file was deleted.

Loading

1 comment on commit c78c863

@vercel
Copy link

@vercel vercel bot commented on c78c863 Jun 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.