Skip to content

Commit c44584f

Browse files
committed
URL Review tweaks + Schema
Schema now added from the "Page" metadata if it doesn't exist on the "subpage"
1 parent b9b6157 commit c44584f

5 files changed

Lines changed: 29 additions & 4 deletions

File tree

docs/index.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<meta name="revisit-after" content="14 days">
2424
<meta name="fragment" content="!">
2525
<!-- Note : connical, description, & keywords update with page changes -->
26-
<link rel="canonical" href="https://procstack.github.io/Init.htm" id="canonicalLink">
26+
<link rel="canonical" href="https://procstack.github.io/" id="canonicalLink">
2727
<meta name="description" content="ProcStack's GitHub Portfolio">
2828
<meta name="keywords" content="ProcStack, Kevin Edzenga, Trancor, Technical Artist, Technical Director, Creative Technologist, 3d modeling, 3d rendering, texturing, shading, scripting, 3d programming, graphics developer, 3d development, 3d art, 3d graphics, visual effects">
2929
<meta name="author" content="Kevin Edzenga">

docs/js/procPages/PageMetaData.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ export class PageMetaData {
1111
this.keywords = metaOptions.keywords || '';
1212
this.image = metaOptions.image || '';
1313
this.url = metaOptions.url || '';
14+
this.schemaData = metaOptions.schemaData || {
15+
"@context": "https://schema.org",
16+
"@type": "WebPage",
17+
"name": this.page,
18+
"description": this.description,
19+
"keywords": this.keywords,
20+
"url": this.url,
21+
"image": this.image
22+
};
1423
this.metaTagList = {
1524
'title':['title', 'og:title', 'twitter:title'],
1625
'description':['description', 'og:description', 'twitter:description'],

docs/js/procPages/ProcPage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,8 @@ export class ProcPage {
442442
ytEmbed.src = "https://www.youtube-nocookie.com/embed/"+vidId;
443443
ytEmbed.title = mediaData.alt;
444444
ytEmbed.setAttribute( "frameborder", 0 );
445-
ytEmbed.allow = "encrypted-media; picture-in-picture; web-share";
445+
//ytEmbed.allow = "encrypted-media; picture-in-picture; web-share"; // Google was flagging 'web-share' unrecognized
446+
ytEmbed.allow = "encrypted-media; picture-in-picture";
446447
ytEmbed.setAttribute( "referrerpolicy", "strict-origin-when-cross-origin" );
447448
ytEmbed.setAttribute( "allowfullscreen", true );
448449
this.applyStyle( mediaData, ytEmbed );

docs/js/procPages/ProcPageManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ export class ProcPageManager {
601601
}
602602
const subPageData = pageObj.pageData.sectionData[ prevSection ];
603603

604-
const schemaData = subPageData.schemaData || pageObj.pageData.schemaData || {};
604+
const schemaData = subPageData.schemaData || pageObj.metaData.schemaData || {};
605605
if( schemaData && Object.keys(schemaData).length > 0 ){
606606
let schemaScript = document.querySelector("script[type='application/ld+json']");
607607
if( !schemaScript ){

docs/pages/init.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,22 @@ const metaDataInput = {
77
'description': 'The personal portfolio of Kevin Edzenga',
88
'keywords': ['Kevin Edzenga', 'Portfolio', 'ProcStack', 'ProcStack.GitHub.io'],
99
'image': 'https://procstack.github.io/images/ProcStack_th.jpg',
10-
'url': 'Init.htm'
10+
'url': 'Init.htm',
11+
'schemaData': {
12+
"@context": "https://schema.org",
13+
"@type": "WebPage",
14+
"name": "Init.",
15+
"description": "The personal portfolio of Kevin Edzenga",
16+
"keywords": "Kevin Edzenga, Portfolio, ProcStack, ProcStack.GitHub.io",
17+
"url": "https://procstack.github.io/Init.htm",
18+
"image": "https://procstack.github.io/images/ProcStack_th.jpg",
19+
"author": {
20+
"@type": "Person",
21+
"name": "Kevin Edzenga",
22+
"alternateName": ["ProcStack", "Trancor"],
23+
"url": "https://procstack.github.io"
24+
}
25+
}
1126
};
1227

1328
const pageContentObject = {

0 commit comments

Comments
 (0)