1+ // Page Meta Data Objects
2+ // Written by Kevin Edzenga; 2024
3+ // -- -- --
4+ // Just a way to keep track of page meta tag updates to aid in SEO / web crawlers and social media sharing.
5+
6+ class PageMetaData {
7+ constructor ( page = "Default" , title = "" , description = "" , keywords = "" , image = "" , url = "" ) {
8+ this . page = page ;
9+ this . title = title ;
10+ this . description = description ;
11+ this . keywords = keywords ;
12+ this . image = image ;
13+ this . url = url ;
14+ this . metaTagList = {
15+ 'title' :[ 'title' , 'og:title' , 'twitter:title' ] ,
16+ 'description' :[ 'description' , 'og:description' , 'twitter:description' ] ,
17+ 'keywords' :[ 'keywords' ] ,
18+ 'image' :[ 'og:image' , 'twitter:image' ] ,
19+ 'url' :[ 'og:url' ]
20+ }
21+ }
22+ setAttribute ( attribute , value ) {
23+ attribute = attribute . toLowerCase ( ) ;
24+ if ( this . hasOwnProperty ( attribute ) ) {
25+ this [ attribute ] = value ;
26+ }
27+ }
28+ }
29+
30+ // -- -- --
31+
32+ const initMetaData = new PageMetaData ( ) ;
33+ initMetaData . setAttribute ( 'page' , "Init" ) ;
34+ initMetaData . setAttribute ( 'title' , "ProcStack's GitHub Portfolio" ) ;
35+ initMetaData . setAttribute ( 'description' , 'The personal portfolio of Kevin Edzenga' ) ;
36+ initMetaData . setAttribute ( 'keywords' , 'Kevin Edzenga, Portfolio, ProcStack, ProcStack.GitHub.io' ) ;
37+ initMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
38+ initMetaData . setAttribute ( 'url' , 'Init.htm' ) ;
39+
40+ // -- -- --
41+
42+ const pxlNavMetaData = new PageMetaData ( ) ;
43+ pxlNavMetaData . setAttribute ( 'page' , 'pxlNav' ) ;
44+ pxlNavMetaData . setAttribute ( 'title' , 'pxlNav Breakdown' ) ;
45+ pxlNavMetaData . setAttribute ( 'description' , 'Explore what pxlNav offers as a javascript player controller & room manager for Three.js' ) ;
46+ pxlNavMetaData . setAttribute ( 'keywords' , 'pxlNav, player controller, javascript, room manager, threejs, three.js, Kevin Edzenga, ProcStack' ) ;
47+ pxlNavMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
48+ pxlNavMetaData . setAttribute ( 'url' , 'pxlNav.htm' ) ;
49+
50+ // -- -- --
51+
52+ const reposMetaData = new PageMetaData ( ) ;
53+ reposMetaData . setAttribute ( 'page' , 'Repos' ) ;
54+ reposMetaData . setAttribute ( 'title' , "Proc's GitHub Repositories" ) ;
55+ reposMetaData . setAttribute ( 'description' , "A selection of GitHub repositories by ProcStack / Kevin Edzenga" ) ;
56+ reposMetaData . setAttribute ( 'keywords' , 'ProcStack, Kevin Edzenga, GitHub, Repositories, Portfolio' ) ;
57+ reposMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
58+ reposMetaData . setAttribute ( 'url' , 'Repos.htm' ) ;
59+
60+ // -- -- --
61+
62+ const projectMetaData = new PageMetaData ( ) ;
63+ projectMetaData . setAttribute ( 'page' , 'ProjectsLinks' ) ;
64+ projectMetaData . setAttribute ( 'title' , "Proc's Projects & Socials" ) ;
65+ projectMetaData . setAttribute ( 'description' , "See a collection of projects and links by ProcStack / Kevin Edzenga" ) ;
66+ projectMetaData . setAttribute ( 'keywords' , 'ProcStack, Kevin Edzenga, Projects, Socials, Portfolio, Plushie, Plushies, neural network, neural networks, ESN, GRU, GAT' ) ;
67+ projectMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
68+ projectMetaData . setAttribute ( 'url' , 'ProjectsLinks.htm' ) ;
69+
70+ // -- -- --
71+
72+ const blogMetaData = new PageMetaData ( ) ;
73+ blogMetaData . setAttribute ( 'page' , 'Blog' ) ;
74+ blogMetaData . setAttribute ( 'title' , "Proc's Random Ramblings" ) ;
75+ blogMetaData . setAttribute ( 'description' , "A collection of mental vomit written by ProcStack / Kevin Edzenga" ) ;
76+ blogMetaData . setAttribute ( 'keywords' , 'ProcStack, Kevin Edzenga, Blog, Portfolio' ) ;
77+ blogMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
78+ blogMetaData . setAttribute ( 'url' , 'Blog.htm' ) ;
79+
80+ // -- -- --
81+
82+ const aboutMeMetaData = new PageMetaData ( ) ;
83+ aboutMeMetaData . setAttribute ( 'page' , 'AboutMe' ) ;
84+ aboutMeMetaData . setAttribute ( 'title' , "About Kevin Edzenga" ) ;
85+ aboutMeMetaData . setAttribute ( 'description' , "Who am I? What do I do? Why do I do the things I do?" ) ;
86+ aboutMeMetaData . setAttribute ( 'keywords' , 'Kevin Edzenga, About, Portfolio' ) ;
87+ aboutMeMetaData . setAttribute ( 'image' , 'https://procstack.github.io/images/ProcStack_th.jpg' ) ;
88+ aboutMeMetaData . setAttribute ( 'url' , 'AboutMe.htm' ) ;
89+
90+ // -- -- --
91+
92+ const PageMetaDataObjects = {
93+ 'Init' : initMetaData ,
94+ 'pxlNav' : pxlNavMetaData ,
95+ 'Repos' : reposMetaData ,
96+ 'ProjectsLinks' : projectMetaData ,
97+ 'Blog' : blogMetaData ,
98+ 'AboutMe' : aboutMeMetaData
99+ } ;
100+
101+ export { PageMetaDataObjects } ;
0 commit comments