Browse Source

chore: add comment on docsite template

chore: add comment on docsite template
代强 3 năm trước cách đây
mục cha
commit
c003abcde5
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/templates/postTemplate.js

+ 3 - 1
src/templates/postTemplate.js

@@ -253,7 +253,9 @@ const components = {
     li: ({ children }) => {
     li: ({ children }) => {
         if (Array.isArray(children)) {
         if (Array.isArray(children)) {
             children = [...children];
             children = [...children];
-
+            
+            // For convience of adding new feature in different type, we use "if else" group instead of object or map.
+            
             if (children[0] === '【Feature】' || children[0] === '【Feat】') {
             if (children[0] === '【Feature】' || children[0] === '【Feat】') {
                 children[0] = <div className={'changelog-title'}>🎁【Feature】</div>;
                 children[0] = <div className={'changelog-title'}>🎁【Feature】</div>;
             }
             }