|
@@ -20,10 +20,10 @@ axios.get(contentApiUrl).then(({ data }) => {
|
|
|
mdContent += frontMatter + '\n';
|
|
|
}
|
|
|
for (var idx=0; idx<blockArray.length; idx++) {
|
|
|
- mdContent += `\n## **${_.get(blockArray[idx], 'title', '')}**`
|
|
|
+ mdContent += `\n### **${_.get(blockArray[idx], 'title', '')}**\n`
|
|
|
for (var data of _.get(blockArray[idx], 'data', [])) {
|
|
|
if (_.get(_.keys(data), 0) === 'description') {
|
|
|
- mdContent += '\n' + _.get(data, 'description.text', '');
|
|
|
+ mdContent += `\n${_.get(data, 'description.text', '')}`;
|
|
|
} else if (_.get(_.keys(data), 0) === 'image') {
|
|
|
ampImgForm = `\n<amp-img\
|
|
|
\n alt="${_.get(data, 'image.alt', '小寶優居')}"\
|
|
@@ -31,7 +31,7 @@ axios.get(contentApiUrl).then(({ data }) => {
|
|
|
\n height="${_.get(data, 'image.height', 300)}"\
|
|
|
\n width="${_.get(data, 'image.width', 400)}"\
|
|
|
\n layout="${_.get(data, 'image.layout', 'responsive')}">\
|
|
|
-\n</amp-img>`;
|
|
|
+\n</amp-img>\n`;
|
|
|
mdContent += ampImgForm;
|
|
|
}
|
|
|
}
|