Skip to content

Commit 3643296

Browse files
Merge pull request #1 from mudassirgithub/0-0-1
added robots.txt, sitemap.xml files
2 parents c1365fb + d0c8917 commit 3643296

File tree

13 files changed

+14
-21
lines changed

13 files changed

+14
-21
lines changed

containers/Home/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export default function Home({ children }) {
77
const { theme, setTheme } = useContext(ThemeContext);
88

99
const handleThemeToggle = () => {
10-
if (theme === "light") {
11-
setTheme("dark");
12-
} else {
10+
if (theme === "dark") {
1311
setTheme("light");
12+
} else {
13+
setTheme("dark");
1414
}
1515
};
1616

lib/context/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export const ThemeContext = React.createContext({
66
});
77

88
const ThemeContextProvider = ({ children }) => {
9-
const [theme, setTheme] = useState("dark");
9+
const [theme, setTheme] = useState("light");
1010

1111
useEffect(() => {
1212
function loadTheme() {
1313
const theme = localStorage.getItem("theme");
14-
return theme || "dark";
14+
return theme || "light";
1515
}
1616
setTheme(loadTheme());
1717
}, []);

lib/data/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const metaData = {
22
title: "Basic Blog - JAMstack Theme",
33
description:
44
"A JAMstack Theme of Basic Blog Site with dark/light theme toggle support built using Nextjs, Tailwindcss and Markdown Files.",
5-
url: "",
5+
url: "https://next-basic-blog.vercel.app",
66
image: "/assets/meta/blogSimple.jpg",
77
};
88

pages/_document.js

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
User-agent: *
2+
Allow: /
3+
Sitemap: https://next-basic-blog.vercel.app/sitemap.xml
File renamed without changes.

public/sitemap.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
2+
<url>
3+
<loc>https://next-basic-blog.vercel.app</loc>
4+
</url>
5+
</urlset>

0 commit comments

Comments
 (0)