1
0
Fork 0
forked from remote/pelican

feat: add Open Graph, add Tailwind badge class

This commit is contained in:
Oliver Ladner 2026-06-26 14:01:36 +02:00
commit 243e4b0857
5 changed files with 71 additions and 8 deletions

12
package-lock.json generated
View file

@ -6,7 +6,7 @@
"": {
"devDependencies": {
"@tailwindcss/typography": "^0.5.15",
"tailwindcss": "^3.4.17"
"tailwindcss": "^3.4.19"
}
},
"node_modules/@alloc/quick-lru": {
@ -1324,9 +1324,9 @@
}
},
"node_modules/tailwindcss": {
"version": "3.4.17",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
"integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
"version": "3.4.19",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.19.tgz",
"integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -1338,7 +1338,7 @@
"fast-glob": "^3.3.2",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
"jiti": "^1.21.6",
"jiti": "^1.21.7",
"lilconfig": "^3.1.3",
"micromatch": "^4.0.8",
"normalize-path": "^3.0.0",
@ -1347,7 +1347,7 @@
"postcss": "^8.4.47",
"postcss-import": "^15.1.0",
"postcss-js": "^4.0.1",
"postcss-load-config": "^4.0.2",
"postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
"postcss-nested": "^6.2.0",
"postcss-selector-parser": "^6.1.2",
"resolve": "^1.22.8",

View file

@ -67,6 +67,12 @@
code {
@apply bg-rp-dawn-highlight-low dark:bg-rp-moon-highlight-low;
}
.badge {
@apply inline-block px-1.5 py-0.5 text-xs font-mono font-semibold bg-rp-dawn-highlight-low dark:bg-rp-moon-highlight-med text-rp-dawn-gold dark:text-rp-moon-gold align-middle ml-1;
}
.badge a {
@apply no-underline hover:no-underline;
}
}
/*Hide heading anchor links unless hovering over them*/

View file

@ -107,7 +107,7 @@
}
/*
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/
/*
@ -243,7 +243,7 @@ code,
kbd,
samp,
pre {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-family: ui-monospace, monospace;
/* 1 */
font-feature-settings: normal;
/* 2 */
@ -1221,6 +1221,41 @@ code {
}
}
.badge {
margin-left: 0.25rem;
display: inline-block;
--tw-bg-opacity: 1;
background-color: rgb(244 237 232 / var(--tw-bg-opacity, 1));
padding-left: 0.375rem;
padding-right: 0.375rem;
padding-top: 0.125rem;
padding-bottom: 0.125rem;
vertical-align: middle;
font-family: ui-monospace, monospace;
font-size: 0.75rem;
line-height: 1rem;
font-weight: 600;
--tw-text-opacity: 1;
color: rgb(234 157 52 / var(--tw-text-opacity, 1));
}
@media (prefers-color-scheme: dark) {
.badge {
--tw-bg-opacity: 1;
background-color: rgb(68 65 90 / var(--tw-bg-opacity, 1));
--tw-text-opacity: 1;
color: rgb(246 193 119 / var(--tw-text-opacity, 1));
}
}
.badge a {
text-decoration-line: none;
}
.badge a:hover {
text-decoration-line: none;
}
.absolute {
position: absolute;
}

View file

@ -9,6 +9,7 @@ module.exports = {
fontFamily: {
texts: ["Erode", "serif"],
headings: ["Fira Sans", "sans-serif"],
mono: ["ui-monospace", "monospace"],
},
extend: {
// NOTE: this is for non-prose (so not Markdown rendered with typography plugin)
@ -123,4 +124,6 @@ module.exports = {
// preflight: false,
divideStyle: true,
},
// needed to generate the .badge class from in.css
safelist: ["badge"],
};

View file

@ -10,6 +10,25 @@
<meta name="description" content="{{ SITESUBTITLE }}" />
{% endif %}
<meta name="abuseipdb-verification" content="RrusxCrq" />
{% if article is defined %}
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
<meta property="og:title" content="{{ article.title | replace("\"", "&quot;") }}" />
<meta property="og:description" content="{{ article.summary | striptags | replace("\"", "&quot;") }}" />
<meta property="og:image" content="{{ SITEURL }}/img/{% if article.opengraph_image is defined %}{{ article.opengraph_image }}{% else %}logo_og.jpg{% endif %}" />
{% elif page is defined %}
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
<meta property="og:title" content="{{ page.title | replace("\"", "&quot;") }}" />
<meta property="og:description" content="{{ page.content | striptags | replace("\"", "&quot;") | truncate(196, False, '...') }}" />
<meta property="og:image" content="{{ SITEURL }}/img/{% if page.opengraph_image is defined %}{{ page.opengraph_image }}{% else %}logo_og.jpg{% endif %}" />
{% else %}
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ SITEURL }}/{{ output_file }}" />
<meta property="og:title" content="{{ SITENAME }}" />
<meta property="og:description" content="{{ SITESUBTITLE }}" />
<meta property="og:image" content="{{ SITEURL }}/img/logo_og.jpg" />
{% endif %}
{% if STYLESHEET_URL %}
<link rel="stylesheet" type="text/css" href="{{ STYLESHEET_URL }}" />
{% endif %}