0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-31 19:32:47 +00:00

add 'lang' as a brew metadata property

This commit is contained in:
Gazook89
2022-09-21 12:21:32 -05:00
parent 8c6fd3086c
commit bce7cf41af
4 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ const splitTextStyleAndMetadata = (brew)=>{
const index = brew.text.indexOf('```\n\n');
const metadataSection = brew.text.slice(12, index - 1);
const metadata = yaml.load(metadataSection);
Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme']));
Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']));
brew.text = brew.text.slice(index + 5);
}
if(brew.text.startsWith('```css')) {
@@ -173,6 +173,7 @@ app.get('/user/:username', async (req, res, next)=>{
'pageCount',
'description',
'authors',
'lang',
'published',
'views',
'shareId',