Skip to content

Commit

Permalink
update url to use env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmicius authored and Anmicius committed Mar 19, 2021
1 parent a1ee205 commit 6427c15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
title: `國立臺灣師範大學附屬高級中學`,
titleTemplate: "%s | hsnu.org",
description: `國立臺灣師範大學附屬高級中學,簡稱為HSNU,是一所位處臺北市大安區信義的高級中學,附屬於國立臺灣師範大學。`,
siteUrl: "https://hsnu.org", // No trailing slash allowed!
siteUrl: `${process.env.SITE_URL}`, // No trailing slash allowed!
image: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/The_Main_Gate_of_The_Affiliated_Senior_High_School_of_NTNU.jpg/1024px-The_Main_Gate_of_The_Affiliated_Senior_High_School_of_NTNU.jpg",
},
plugins: [
Expand Down Expand Up @@ -76,15 +76,15 @@ module.exports = {
{
resolve: `gatsby-plugin-canonical-urls`,
options: {
siteUrl: `https://hsnu.org`,
siteUrl: `${process.env.SITE_URL}`,
},
},
// robot.txt
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://hsnu.org",
sitemap: "https://hsnu.org/sitemap.xml",
host: `${process.env.SITE_URL}`,
sitemap: `${process.env.SITE_URL}/sitemap.xml`,
policy: [{ userAgent: "*", allow: "/" }],
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/layout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export const Header = () => {
},
{
name: "行事曆",
url: "https://hsnu.org/search/?search=%E8%A1%8C%E4%BA%8B%E6%9B%86",
url: `${process.env.SITE_URL}/search/?search=%E8%A1%8C%E4%BA%8B%E6%9B%86`,
},
{
name: "段考",
url: "https://hsnu.org/search?search=%E6%AE%B5%E8%80%83",
url: `${process.env.SITE_URL}/search?search=%E6%AE%B5%E8%80%83`,
},
{
name: "國中部",
Expand Down

0 comments on commit 6427c15

Please sign in to comment.