-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues list clean up #156
base: production
Are you sure you want to change the base?
Issues list clean up #156
Changes from all commits
9290025
e7e4825
4a92afa
1bfcba6
635927e
637f234
f1031a1
35ba7fb
0db266e
9af8b82
9a70a10
048d873
5d92dfb
31e01f1
cbb68e2
04d452c
7833b79
0573418
fc03e28
c4ef358
bb73850
1ef18ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
|
||
legacy-peer-deps=true | ||
|
||
legacy-peer-deps=true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ h5 { | |
} | ||
|
||
a .link { | ||
background-color: #fff; | ||
background-color: #fff; | ||
} | ||
|
||
a:link { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import React from "react"; | ||
import marked from "marked"; | ||
|
||
// import ogImage from "../assets/images/opengraph-center-crop-helpcenter.png"; | ||
const ogImage = require("../assets/images/opengraph-center-crop-helpcenter.png"); | ||
import { Entry } from "./TocFrame"; | ||
import { Head } from "react-static"; | ||
|
||
|
@@ -23,11 +24,17 @@ export default function render( | |
|
||
let title:string; | ||
if(props.title){ | ||
title = props.title + " | SaaSquatch " + (props.categoryName || "Documentation"); | ||
title = props.title + " | SaaSquatch " + (props.categoryName || "Docs"); | ||
}else{ | ||
title = "SaaSquatch Help Center"; | ||
title = "SaaSquatch Docs"; | ||
} | ||
|
||
let ogImageURL:string; | ||
if(props?.fields?.ogFeaturedImage != null && Object.keys(props?.fields?.ogFeaturedImage).length > 0){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There must be a cleaner way to do this |
||
ogImageURL = props?.fields?.ogFeaturedImage[0]?.fields?.file?.url; | ||
} | ||
|
||
|
||
|
||
const plainHighlights = striptags(markdown(props.highlights)); | ||
return ( | ||
<Head> | ||
|
@@ -37,29 +44,20 @@ export default function render( | |
"docs sectionType-" + props.sectionType + " " + props.category | ||
} | ||
/> | ||
{/* SEO content */} | ||
<meta name="description" content={props.fields?.seoDescription || props?.highlights}/> | ||
|
||
<meta property="og:image" content={ogImageURL || ogImage} /> | ||
<meta name="twitter:image" content={ogImageURL || ogImage} /> | ||
|
||
<meta name="robots" content={props.fields?.robotsTag || props?.robots} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that the contentful default here is "FOLLOW", lets make sure that is handled appropriately There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also need to make sure this is handled well for the content within the code that does not have any robots information |
||
<link rel="canonical" href={props.fields?.canonicalUrl}/> | ||
|
||
|
||
|
||
<meta property="og:title" content={title} /> | ||
<meta | ||
className="swiftype" | ||
name="title" | ||
data-type="string" | ||
content={props.title} | ||
/> | ||
<meta | ||
className="swiftype" | ||
name="body" | ||
data-type="text" | ||
content={props.fields?.seoDescription || props.highlights} | ||
/> | ||
<meta name="description" content={plainHighlights} /> | ||
|
||
<meta property="og:description" content={plainHighlights} /> | ||
|
||
<meta | ||
className="swiftype" | ||
name="type" | ||
data-type="enum" | ||
content={props.sectionType} | ||
/> | ||
|
||
<meta | ||
name="docsSectionType" | ||
data-type="string" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ import TOC from "./TOC"; | |
*/ | ||
export type Entry = { | ||
title: string; | ||
robots?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we can change the usage of just the plain robots in the docs within the code so we don't need two types |
||
contents?: string; | ||
highlights?: string; | ||
hero?: boolean; | ||
|
@@ -22,7 +23,20 @@ export type Entry = { | |
category?: string; | ||
categoryName?: string; | ||
sectionType?: string; | ||
fields?: { seoDescription?: string }; | ||
fields?: { | ||
seoDescription?: string, | ||
ogFeaturedImage?: { | ||
fields?:{ | ||
file?:{ | ||
url?: string; | ||
} | ||
} | ||
} | ||
robotsTag?: string, | ||
canonicalUrl?: string; | ||
|
||
|
||
}; | ||
}; | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets fix this before sending it out