Skip to content

Commit be5a3cb

Browse files
authored
feat: Update sitemap with last modified dates and change frequencies; remove redundant PDF metadata section and hide specific elements in PDF output
1 parent 6c9f2a1 commit be5a3cb

File tree

4 files changed

+207
-12
lines changed

4 files changed

+207
-12
lines changed

public/sitemap.xml

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,194 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://yourselftoscience.org/</loc>
5+
<lastmod>2025-05-01</lastmod>
6+
<changefreq>weekly</changefreq>
57
<priority>1.0</priority>
68
</url>
79
<url>
810
<loc>https://yourselftoscience.org/resources</loc>
11+
<lastmod>2025-05-01</lastmod>
12+
<changefreq>weekly</changefreq>
913
<priority>0.9</priority>
1014
</url>
1115
<url>
1216
<loc>https://yourselftoscience.org/yourselftoscience.pdf</loc>
17+
<lastmod>2025-05-01</lastmod>
18+
<changefreq>weekly</changefreq>
19+
<priority>0.8</priority>
20+
</url>
21+
<url>
22+
<loc>https://yourselftoscience.org/resource/1</loc>
23+
<lastmod>2025-05-01</lastmod>
24+
<changefreq>monthly</changefreq>
25+
<priority>0.8</priority>
26+
</url>
27+
<url>
28+
<loc>https://yourselftoscience.org/resource/2</loc>
29+
<lastmod>2025-05-01</lastmod>
30+
<changefreq>monthly</changefreq>
31+
<priority>0.8</priority>
32+
</url>
33+
<url>
34+
<loc>https://yourselftoscience.org/resource/3</loc>
35+
<lastmod>2025-05-01</lastmod>
36+
<changefreq>monthly</changefreq>
37+
<priority>0.8</priority>
38+
</url>
39+
<url>
40+
<loc>https://yourselftoscience.org/resource/4</loc>
41+
<lastmod>2025-05-01</lastmod>
42+
<changefreq>monthly</changefreq>
43+
<priority>0.8</priority>
44+
</url>
45+
<url>
46+
<loc>https://yourselftoscience.org/resource/5</loc>
47+
<lastmod>2025-05-01</lastmod>
48+
<changefreq>monthly</changefreq>
49+
<priority>0.8</priority>
50+
</url>
51+
<url>
52+
<loc>https://yourselftoscience.org/resource/6</loc>
53+
<lastmod>2025-05-01</lastmod>
54+
<changefreq>monthly</changefreq>
55+
<priority>0.8</priority>
56+
</url>
57+
<url>
58+
<loc>https://yourselftoscience.org/resource/7</loc>
59+
<lastmod>2025-05-01</lastmod>
60+
<changefreq>monthly</changefreq>
61+
<priority>0.8</priority>
62+
</url>
63+
<url>
64+
<loc>https://yourselftoscience.org/resource/8</loc>
65+
<lastmod>2025-05-01</lastmod>
66+
<changefreq>monthly</changefreq>
67+
<priority>0.8</priority>
68+
</url>
69+
<url>
70+
<loc>https://yourselftoscience.org/resource/9</loc>
71+
<lastmod>2025-05-01</lastmod>
72+
<changefreq>monthly</changefreq>
73+
<priority>0.8</priority>
74+
</url>
75+
<url>
76+
<loc>https://yourselftoscience.org/resource/10</loc>
77+
<lastmod>2025-05-01</lastmod>
78+
<changefreq>monthly</changefreq>
79+
<priority>0.8</priority>
80+
</url>
81+
<url>
82+
<loc>https://yourselftoscience.org/resource/11</loc>
83+
<lastmod>2025-05-01</lastmod>
84+
<changefreq>monthly</changefreq>
85+
<priority>0.8</priority>
86+
</url>
87+
<url>
88+
<loc>https://yourselftoscience.org/resource/12</loc>
89+
<lastmod>2025-05-01</lastmod>
90+
<changefreq>monthly</changefreq>
91+
<priority>0.8</priority>
92+
</url>
93+
<url>
94+
<loc>https://yourselftoscience.org/resource/13</loc>
95+
<lastmod>2025-05-01</lastmod>
96+
<changefreq>monthly</changefreq>
97+
<priority>0.8</priority>
98+
</url>
99+
<url>
100+
<loc>https://yourselftoscience.org/resource/14</loc>
101+
<lastmod>2025-05-01</lastmod>
102+
<changefreq>monthly</changefreq>
103+
<priority>0.8</priority>
104+
</url>
105+
<url>
106+
<loc>https://yourselftoscience.org/resource/15</loc>
107+
<lastmod>2025-05-01</lastmod>
108+
<changefreq>monthly</changefreq>
109+
<priority>0.8</priority>
110+
</url>
111+
<url>
112+
<loc>https://yourselftoscience.org/resource/16</loc>
113+
<lastmod>2025-05-01</lastmod>
114+
<changefreq>monthly</changefreq>
115+
<priority>0.8</priority>
116+
</url>
117+
<url>
118+
<loc>https://yourselftoscience.org/resource/17</loc>
119+
<lastmod>2025-05-01</lastmod>
120+
<changefreq>monthly</changefreq>
121+
<priority>0.8</priority>
122+
</url>
123+
<url>
124+
<loc>https://yourselftoscience.org/resource/18</loc>
125+
<lastmod>2025-05-01</lastmod>
126+
<changefreq>monthly</changefreq>
127+
<priority>0.8</priority>
128+
</url>
129+
<url>
130+
<loc>https://yourselftoscience.org/resource/19</loc>
131+
<lastmod>2025-05-01</lastmod>
132+
<changefreq>monthly</changefreq>
133+
<priority>0.8</priority>
134+
</url>
135+
<url>
136+
<loc>https://yourselftoscience.org/resource/20</loc>
137+
<lastmod>2025-05-01</lastmod>
138+
<changefreq>monthly</changefreq>
139+
<priority>0.8</priority>
140+
</url>
141+
<url>
142+
<loc>https://yourselftoscience.org/resource/21</loc>
143+
<lastmod>2025-05-01</lastmod>
144+
<changefreq>monthly</changefreq>
145+
<priority>0.8</priority>
146+
</url>
147+
<url>
148+
<loc>https://yourselftoscience.org/resource/22</loc>
149+
<lastmod>2025-05-01</lastmod>
150+
<changefreq>monthly</changefreq>
151+
<priority>0.8</priority>
152+
</url>
153+
<url>
154+
<loc>https://yourselftoscience.org/resource/23</loc>
155+
<lastmod>2025-05-01</lastmod>
156+
<changefreq>monthly</changefreq>
157+
<priority>0.8</priority>
158+
</url>
159+
<url>
160+
<loc>https://yourselftoscience.org/resource/24</loc>
161+
<lastmod>2025-05-01</lastmod>
162+
<changefreq>monthly</changefreq>
163+
<priority>0.8</priority>
164+
</url>
165+
<url>
166+
<loc>https://yourselftoscience.org/resource/25</loc>
167+
<lastmod>2025-05-01</lastmod>
168+
<changefreq>monthly</changefreq>
169+
<priority>0.8</priority>
170+
</url>
171+
<url>
172+
<loc>https://yourselftoscience.org/resource/26</loc>
173+
<lastmod>2025-05-01</lastmod>
174+
<changefreq>monthly</changefreq>
175+
<priority>0.8</priority>
176+
</url>
177+
<url>
178+
<loc>https://yourselftoscience.org/resource/27</loc>
179+
<lastmod>2025-05-01</lastmod>
180+
<changefreq>monthly</changefreq>
181+
<priority>0.8</priority>
182+
</url>
183+
<url>
184+
<loc>https://yourselftoscience.org/resource/28</loc>
185+
<lastmod>2025-05-01</lastmod>
186+
<changefreq>monthly</changefreq>
187+
<priority>0.8</priority>
188+
</url>
189+
<url>
190+
<loc>https://yourselftoscience.org/resource/29</loc>
191+
<lastmod>2025-05-01</lastmod>
192+
<changefreq>monthly</changefreq>
13193
<priority>0.8</priority>
14194
</url>
15195
</urlset>

public/yourselftoscience.pdf

-17.5 KB
Binary file not shown.

scripts/temp-extract.mjs

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/updatePdfPage.js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,18 @@ function getLatestDoi() {
357357

358358
}, currentDate, year, siteUrl, doiLink, latestDoi);
359359

360-
// Add scholarly metadata to the PDF
360+
// --- REMOVED Redundant Metadata Section ---
361+
// The following block was removed as the information is already present
362+
// in the header and citation formats for Google Scholar.
363+
/*
361364
await page.evaluate(() => {
362365
// Add metadata in a format Google Scholar can extract
363366
const metaSection = document.createElement('div');
364367
metaSection.style.cssText = `
365368
font-size: 16px;
366369
line-height: 1.6;
367-
margin-top: 15px; /* Adjust margin */
368-
margin-bottom: 15px; /* Adjust margin */
370+
margin-top: 15px; // Adjust margin
371+
margin-bottom: 15px; // Adjust margin
369372
text-align: center;
370373
width: 100%;
371374
box-sizing: border-box;
@@ -395,6 +398,27 @@ function getLatestDoi() {
395398
mainContent.parentNode.insertBefore(metaSection, mainContent);
396399
}
397400
});
401+
*/
402+
// --- END REMOVED Section ---
403+
404+
// --- Hide Search and Mobile Filter Button in PDF ---
405+
await page.evaluate(() => {
406+
// Hide the search input container
407+
const searchInputContainer = document.querySelector('main > div:first-child'); // Adjust selector if needed
408+
if (searchInputContainer && searchInputContainer.querySelector('input[type="text"]')) {
409+
searchInputContainer.style.display = 'none';
410+
}
411+
412+
// Hide the mobile filter button specifically (it might be inside the same container)
413+
const mobileFilterButton = document.querySelector('button.lg\\:hidden'); // Selector for the mobile filter button
414+
if (mobileFilterButton && mobileFilterButton.textContent.includes('Filters')) {
415+
// If the button is not inside the already hidden container, hide it separately
416+
if (!searchInputContainer || !searchInputContainer.contains(mobileFilterButton)) {
417+
mobileFilterButton.style.display = 'none';
418+
}
419+
}
420+
});
421+
// --- END Hide Elements ---
398422

399423
// Wait for the content modifications to complete using setTimeout instead of deprecated waitForTimeout
400424
await new Promise(r => setTimeout(r, 3000)); // Wait after DOM manipulation

0 commit comments

Comments
 (0)