mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
Fix _ images being recorded wrong in metadata
This commit is contained in:
parent
55af1c61e5
commit
37fb8d5977
@ -37,10 +37,6 @@ module.exports = exports = function () {
|
|||||||
dimensions.orientation = 'wide';
|
dimensions.orientation = 'wide';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (basename[0] === '_') {
|
|
||||||
basename = basename.slice(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
const filetype = {
|
const filetype = {
|
||||||
'.jpeg': 'jpeg',
|
'.jpeg': 'jpeg',
|
||||||
'.jpg': 'jpeg',
|
'.jpg': 'jpeg',
|
||||||
@ -48,6 +44,21 @@ module.exports = exports = function () {
|
|||||||
'.gif': 'gif',
|
'.gif': 'gif',
|
||||||
}[ext];
|
}[ext];
|
||||||
|
|
||||||
|
if (basename[0] === '_') {
|
||||||
|
basename = basename.slice(1);
|
||||||
|
return {
|
||||||
|
name: basename,
|
||||||
|
type: 'image',
|
||||||
|
sizes: [
|
||||||
|
{
|
||||||
|
url: path.join(siteDir, `${basename}${ext}`),
|
||||||
|
width: dimensions.width,
|
||||||
|
height: dimensions.height,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const sizes = [
|
const sizes = [
|
||||||
{
|
{
|
||||||
url: path.join(siteDir, `${basename}.${filetype}`),
|
url: path.join(siteDir, `${basename}.${filetype}`),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user