Skip to content

Commit

Permalink
add static meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinBeczak committed Jan 23, 2024
1 parent f699bfa commit 84d4bee
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
15 changes: 7 additions & 8 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#23395B">

<meta name="title" content="MapRoulette" />
<meta name="description" content="Navigate to Maproulette.org" />
<meta property="og:image" content="https://www.youtube.com/img/desktop/yt_1200.png" />
<meta name="description" content="Be an instant contributor to the world’s maps" />
<meta property="og:image" content="https://openstreetmap.us/img/pages/maproulette/sign.png" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://staging.maproulette.org/challenge/40012/task/169368684" />
<meta property="og:url" content="" />
<meta property="og:title" content="MapRoulette" />
<meta property="og:description" content="Navigate to Maproulette.org" />
<meta property="twitter:site" content="@YourTwitterUsername" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://staging.maproulette.org/challenge/40012/task/169368684" />
<meta property="og:description" content="Be an instant contributor to the world’s maps" />
<meta property="twitter:title" content="MapRoulette" />
<meta property="twitter:description" content="twitter description" />
<meta property="twitter:image" content="https://metatags.io/images/meta-tags.png" />
<meta property="twitter:image" content="https://openstreetmap.us/img/pages/maproulette/sign.png" />

<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import MobileNotSupported
import CheckForToken from './components/CheckForToken/CheckForToken'
import './components/Widgets/widget_registry'
import './App.scss'
import { HeadTitle } from './components/Head/Head'

// Setup child components with necessary HOCs
const TopNav = withRouter(WithCurrentUser(Navbar))
Expand Down Expand Up @@ -165,6 +166,7 @@ export const CachedRoute = ({ component: Component, ...rest }) => {
resetCache()
return (
<>
<HeadTitle />
<Component {...props} />
</>

Expand Down
2 changes: 2 additions & 0 deletions src/components/AdminPane/AdminPane.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import BusySpinner from "../BusySpinner/BusySpinner";
import EmailRequirementNotice from "./Manage/EmailRequirementNotice/EmailRequirementNotice";
import "./Manage/Widgets/widget_registry.js";
import "./AdminPane.scss";
import { HeadTitle } from "../Head/Head";

/**
* AdminPane is the top-level component for administration functions. It has a
Expand Down Expand Up @@ -130,6 +131,7 @@ export const CustomRoute = ({ component: Component, ...rest }) => {
render={props => {
return (
<>
<HeadTitle />
<Component {...props} />
</>

Expand Down
12 changes: 0 additions & 12 deletions src/components/Head/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,6 @@ export const HeadTitle = (props) => {
<Helmet>
<title>{formatTitle(props)}</title>
<meta name="title" content="MapRoulette" />
<meta name="description" content="Navigate to Maproulette.org" />
<meta property="og:image" content="https://www.youtube.com/img/desktop/yt_1200.png" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://staging.maproulette.org/challenge/40012/task/169368684" />
<meta property="og:title" content="MapRoulette" />
<meta property="og:description" content="Navigate to Maproulette.org" />
<meta property="twitter:site" content="@YourTwitterUsername" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://staging.maproulette.org/challenge/40012/task/169368684" />
<meta property="twitter:title" content="MapRoulette" />
<meta property="twitter:description" content="twitter description" />
<meta property="twitter:image" content="https://metatags.io/images/meta-tags.png" />
</Helmet>
)
}
Expand Down

0 comments on commit 84d4bee

Please sign in to comment.