Skip to content

Commit

Permalink
Merge pull request #804 from zirreal/robonomics-wiki-test
Browse files Browse the repository at this point in the history
images generator fix
  • Loading branch information
zirreal authored Mar 11, 2024
2 parents 9f5d41b + 69b408e commit 6605731
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gridsome.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ module.exports = function (api) {

// Using the same filename as the file for easy frontmatter
const imgName = node.fileInfo.name;
// const imgLang = 'ar';
let locale = node.fileInfo.path.slice(0,2);
let locale = '';

if(!locales.includes(locale)) {
if (node.fileInfo.path.includes('/')) {
locale = node.fileInfo.path.slice(0,2);
} else {
locale = "en";
}


const output = `${options.outputDir}${imgName}-${locale}.png`;
// Only generate images for files that don't exist already
Expand Down

0 comments on commit 6605731

Please sign in to comment.