Skip to content

Commit b01937f

Browse files
committed
feat: add RSS icon
1 parent 7e9b059 commit b01937f

File tree

12 files changed

+1348
-22
lines changed

12 files changed

+1348
-22
lines changed
File renamed without changes.
File renamed without changes.

assets/svg/rss.svg

Lines changed: 16 additions & 0 deletions
Loading

components/common/Layout/Layout.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import Link from "next/link";
44
import { useRouter } from "next/router";
55
import { DarkModeSwitch } from "react-toggle-dark-mode";
66
import { useTheme } from "next-themes";
7+
import Image from "next/image";
8+
9+
import RSSIcon from "@assets/svg/rss.svg";
710

811
export function Layout({ children }) {
912
return (
@@ -49,11 +52,14 @@ const Header = () => {
4952
{isRoot ? <LargeTitle /> : <SmallTitle />}
5053
</div>
5154
{mounted && (
52-
<DarkModeSwitch
53-
checked={isDarkMode}
54-
onChange={toggleDarkMode}
55-
className={isRoot ? 28 : 24}
56-
/>
55+
<div className="flex space-x-4">
56+
<DarkModeSwitch checked={isDarkMode} onChange={toggleDarkMode} />
57+
<Link href="/rss.xml" passHref>
58+
<a target="__blank" rel="noreferrer noopener">
59+
<RSSIcon className={isDarkMode ? "text-white" : "text-black"} />
60+
</a>
61+
</Link>
62+
</div>
5763
)}
5864
</header>
5965
);

config/seo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"link": "https://jfelix.info"
88
},
99
"description": "A blog created with Next.js and Tailwind.css",
10-
"siteUrl": "https://nextjs-starter-blog-demo.netlify.app/",
10+
"siteUrl": "https://nextjs-starter-blog-new-demo.vercel.app/",
1111
"language": "en-US",
1212
"social": {
1313
"twitter": "Jose_R_Felix"

next.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
webpack(config) {
3+
config.module.rules.push({
4+
test: /\.svg$/,
5+
use: ["@svgr/webpack"],
6+
});
7+
8+
return config;
9+
},
10+
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"start": "next start"
1313
},
1414
"dependencies": {
15+
"@svgr/webpack": "^6.1.1",
1516
"clsx": "^1.1.1",
1617
"feed": "^4.2.2",
1718
"next": "12.0.7",

pages/_app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ThemeProvider } from "next-themes";
22

3-
import "@assets/main.css";
3+
import "@assets/css/main.css";
44

55
import "typeface-open-sans";
66
import "typeface-merriweather";

public/rss.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
33
<channel>
44
<title>Next.js Starter Blog</title>
5-
<link>https://nextjs-starter-blog-demo.netlify.app/</link>
5+
<link>https://nextjs-starter-blog-new-demo.vercel.app/</link>
66
<description>undefined</description>
7-
<lastBuildDate>Mon, 06 Dec 2021 19:06:22 GMT</lastBuildDate>
7+
<lastBuildDate>Mon, 06 Dec 2021 19:32:09 GMT</lastBuildDate>
88
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
99
<generator>https://github.com/jpmonette/feed</generator>
1010
<language>en-US</language>
1111
<copyright>Copyright © 2021 Jose Felix</copyright>
1212
<item>
1313
<title><![CDATA[Long Post]]></title>
14-
<link>https://nextjs-starter-blog-demo.netlify.app//posts/long-post</link>
14+
<link>https://nextjs-starter-blog-new-demo.vercel.app/posts/long-post</link>
1515
<guid>long-post</guid>
1616
<pubDate>Tue, 28 Jul 2020 04:00:00 GMT</pubDate>
1717
<description><![CDATA[Who doesn't like a long post showcasing the different headings?]]></description>
@@ -121,7 +121,7 @@ for their projects again and again.]]></content:encoded>
121121
</item>
122122
<item>
123123
<title><![CDATA[Coding Post]]></title>
124-
<link>https://nextjs-starter-blog-demo.netlify.app//posts/coding-post</link>
124+
<link>https://nextjs-starter-blog-new-demo.vercel.app/posts/coding-post</link>
125125
<guid>coding-post</guid>
126126
<pubDate>Sun, 19 Apr 2020 04:00:00 GMT</pubDate>
127127
<description><![CDATA[Coding is such a blissful activity.]]></description>
@@ -137,7 +137,7 @@ export default CoolComponent;
137137
</item>
138138
<item>
139139
<title><![CDATA[Second post]]></title>
140-
<link>https://nextjs-starter-blog-demo.netlify.app//posts/second-post</link>
140+
<link>https://nextjs-starter-blog-new-demo.vercel.app/posts/second-post</link>
141141
<guid>second-post</guid>
142142
<pubDate>Fri, 17 Apr 2020 04:00:00 GMT</pubDate>
143143
<description><![CDATA[The second post is the least memorable.]]></description>
@@ -153,7 +153,7 @@ Normal text
153153
</item>
154154
<item>
155155
<title><![CDATA[First post]]></title>
156-
<link>https://nextjs-starter-blog-demo.netlify.app//posts/first-post</link>
156+
<link>https://nextjs-starter-blog-new-demo.vercel.app/posts/first-post</link>
157157
<guid>first-post</guid>
158158
<pubDate>Thu, 16 Apr 2020 04:00:00 GMT</pubDate>
159159
<description><![CDATA[The first post is the most memorable one.]]></description>

0 commit comments

Comments
 (0)