|
@@ -20,10 +20,20 @@ axios.get(contentApiUrl).then(({ data }) => {
|
|
|
mdContent += frontMatter + '\n';
|
|
|
}
|
|
|
for (var idx=0; idx<blockArray.length; idx++) {
|
|
|
- mdContent += `\n### **${_.get(blockArray[idx], 'title', '')}**\n`
|
|
|
+ if (_.get(blockArray[idx], 'title', '').includes('敘述')) {
|
|
|
+ mdContent += `\n<!-- ### **${_.get(blockArray[idx], 'title', '')}**-->\n`
|
|
|
+ } else {
|
|
|
+ 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', '')}`;
|
|
|
+ if (_.get(data, 'description.text', '').includes('\n')) {
|
|
|
+ for (const line of _.get(data, 'description.text', '').split('\n')) {
|
|
|
+ mdContent += `\n${line} `;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ mdContent += `\n${_.get(data, 'description.text', '')}`;
|
|
|
+ }
|
|
|
} else if (_.get(_.keys(data), 0) === 'image') {
|
|
|
ampImgForm = `\n<amp-img\
|
|
|
\n alt="${_.get(data, 'image.alt', '小寶優居')}"\
|