chore: post name only for posts

This commit is contained in:
Cory Dransfeldt 2024-04-14 18:39:14 -07:00
parent 790f7ddfff
commit ae2d9399a3
No known key found for this signature in database
3 changed files with 13 additions and 3 deletions

View file

@ -43,6 +43,10 @@ export default {
const normalizedPage = page.includes('.html') ? page.replace('.html', '/') : page const normalizedPage = page.includes('.html') ? page.replace('.html', '/') : page
return !!normalizedPage && normalizedPage.includes(category) && !/\d+/.test(normalizedPage); return !!normalizedPage && normalizedPage.includes(category) && !/\d+/.test(normalizedPage);
}, },
isPost: (url) => {
if (url.includes('post')) return true;
return false
},
// analytics // analytics
getPopularPosts: (posts, analytics) => { getPopularPosts: (posts, analytics) => {

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "10.2.3", "version": "10.3.3",
"description": "The source for my personal site. Built using 11ty.", "description": "The source for my personal site. Built using 11ty.",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -1,5 +1,11 @@
{%- capture fullUrl %}{{ meta.url }}{{ page.url }}{% endcapture -%} {%- capture fullUrl -%}{{ meta.url }}{{ page.url }}{%- endcapture -%}
{%- capture pageTitle %}{% if title %}{{ title }} • {% endif %}{{meta.siteName}}{% endcapture -%} {%- capture pageTitle -%}
{% if page.url | isPost %}
{{ title }}
{% else %}
{{ title }} • {{meta.siteName}}
{% endif %}
{%- endcapture -%}
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>