diff --git a/.github/readme-generate.js b/.github/readme-generate.js index 0bf9727..a97a26e 100644 --- a/.github/readme-generate.js +++ b/.github/readme-generate.js @@ -29,7 +29,7 @@ const categories = { }, condiment: { title: '酱料和其它材料', - template:'', + template: '', }, dessert: { title: '甜品', @@ -69,7 +69,7 @@ let README_TEMPLATE = `# 程序员做饭指南 async function main() { try { - let BEFORE = MAIN = AFTER = ''; + let BEFORE = (MAIN = AFTER = ''); const markdownObj = await getAllMarkdown('.'); for (const markdown of markdownObj) { if (markdown.path.includes('tips/advanced')) { @@ -94,9 +94,12 @@ async function main() { MAIN += categoryTemplate(category.title, category.template); } - await writeFile('./README.md', README_TEMPLATE.replace('{{before}}', BEFORE) - .replace('{{main}}', MAIN) - .replace('{{after}}', AFTER)); + await writeFile( + './README.md', + README_TEMPLATE.replace('{{before}}', BEFORE) + .replace('{{main}}', MAIN) + .replace('{{after}}', AFTER), + ); } catch (error) { console.error(error); } @@ -105,6 +108,15 @@ async function main() { async function getAllMarkdown(path) { const paths = []; const files = await readdir(path); + // chinese alphabetic order + files.sort((a, b) => a.localeCompare(b, 'zh-CN')); + + // mtime order + // files.sort(async (a, b) => { + // const aStat = await stat(`${path}/${a}`); + // const bStat = await stat(`${path}/${b}`); + // return aStat.mtime - bStat.mtime; + // }); for (const file of files) { const filePath = `${path}/${file}`; if (ignorePaths.includes(file)) continue; diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 000000000..93de41e --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,28 @@ +# Configuration for probot-stale - https://github.com/probot/stale +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 30 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - "Type: Bug" +# Label to use when marking an issue as stale +staleLabel: "Resolution: Stale" +issues: + # Comment to post when marking an issue as stale. + markComment: > + This issue has been automatically marked as stale. + **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. + We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! + # Comment to post when closing a stale issue. + closeComment: > + Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! +pulls: + # Comment to post when marking a pull request as stale. + markComment: > + This pull request has been automatically marked as stale. + **If this pull request is still relevant, please leave any comment** (for example, "bump"), and we'll keep it open. + We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. + # Comment to post when closing a stale pull request. + closeComment: > + Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you! diff --git a/README.md b/README.md deleted file mode 100644 index 893f393..000000000 --- a/README.md +++ /dev/null @@ -1,182 +0,0 @@ -# 程序员做饭指南 - -[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/Anduin2017/HowToCook/Continuous%20Integration/master)](https://github.com/Anduin2017/HowToCook/actions/workflows/ci.yml) -[![License](https://img.shields.io/github/license/Anduin2017/HowToCook)](./LICENSE) -[![GitHub contributors](https://img.shields.io/github/contributors/Anduin2017/HowToCook)](https://github.com/Anduin2017/HowToCook/graphs/contributors) - -最近在家隔离,出不了门。只能宅在家做饭了。作为程序员,我偶尔在网上找找菜谱和做法。但是这些菜谱往往写法千奇百怪,经常中间莫名出来一些材料。对于习惯了形式语言的程序员来说极其不友好。 - -所以,我计划自己搜寻菜谱和并结合实际做菜的经验,准备用更清晰精准的描述来整理常见菜的做法,以方便程序员在家做饭。 - -同样,我希望它是一个由社区驱动和维护的开源项目,使更多人能够一起做一个有趣的仓库。所以非常欢迎大家贡献它~ - -## 如何贡献 - -针对发现的问题,直接修改并提交 Pull request 即可。 - -在写新菜谱时,请复制并修改已有的菜谱模板: [示例菜](https://github.com/Anduin2017/HowToCook/blob/master/dishes/template/%E7%A4%BA%E4%BE%8B%E8%8F%9C/%E7%A4%BA%E4%BE%8B%E8%8F%9C.md?plain=1)。 -在提交 Pull Request 前更新一下 README.md 里的引用。 - -## 做菜之前 - -* [学习炒与煎](./tips/learn/学习炒与煎.md) -* [学习焯水](./tips/learn/学习焯水.md) -* [学习煮](./tips/learn/学习煮.md) -* [学习腌](./tips/learn/学习腌.md) -* [学习蒸](./tips/learn/学习蒸.md) -* [食品安全](./tips/learn/食品安全.md) -* [高压力锅](./tips/learn/高压力锅.md) -* [厨房准备](./tips/厨房准备.md) -* [如何选择现在吃什么](./tips/如何选择现在吃什么.md) - -## 菜谱 - -### 家常菜 - -* [上汤娃娃菜](./dishes/home-cooking/上汤娃娃菜/上汤娃娃菜.md) -* [冷吃兔](./dishes/home-cooking/冷吃兔.md) -* [凉拌黄瓜](./dishes/home-cooking/凉拌黄瓜.md) -* [凉粉](./dishes/home-cooking/凉粉/凉粉.md) -* [口水鸡](./dishes/home-cooking/口水鸡/口水鸡.md) -* [可乐鸡翅](./dishes/home-cooking/可乐鸡翅.md) -* [咕噜肉](./dishes/home-cooking/咕噜肉.md) -* [咖喱炒蟹](./dishes/home-cooking/咖喱炒蟹.md) -* [回锅肉](./dishes/home-cooking/回锅肉.md) -* [地三鲜](./dishes/home-cooking/地三鲜.md) -* [孜然牛肉](./dishes/home-cooking/孜然牛肉.md) -* [宫保鸡丁](./dishes/home-cooking/宫保鸡丁/宫保鸡丁.md) -* [小炒肉](./dishes/home-cooking/小炒肉.md) -* [小炒黄牛肉](./dishes/home-cooking/小炒黄牛肉/小炒黄牛肉.md) -* [尖椒炒牛肉](./dishes/home-cooking/尖椒炒牛肉.md) -* [榄菜肉末四季豆](./dishes/home-cooking/榄菜肉末四季豆/榄菜肉末四季豆.md) -* [水油焖蔬菜](./dishes/home-cooking/水油焖蔬菜.md) -* [水煮牛肉](./dishes/home-cooking/水煮牛肉/水煮牛肉.md) -* [水煮肉片](./dishes/home-cooking/水煮肉片.md) -* [洋葱炒猪肉](./dishes/home-cooking/洋葱炒猪肉.md) -* [烤鱼](./dishes/home-cooking/混合烤鱼/烤鱼.md) -* [清蒸生蚝](./dishes/home-cooking/清蒸生蚝.md) -* [清蒸鲈鱼](./dishes/home-cooking/清蒸鲈鱼/清蒸鲈鱼.md) -* [炒青菜](./dishes/home-cooking/炒青菜.md) -* [白灼虾](./dishes/home-cooking/白灼虾/白灼虾.md) -* [白菜猪肉炖粉条](./dishes/home-cooking/白菜猪肉炖粉条.md) -* [糖拌西红柿](./dishes/home-cooking/糖拌西红柿/糖拌西红柿.md) -* [糖醋里脊](./dishes/home-cooking/糖醋里脊.md) -* [糖醋鲤鱼](./dishes/home-cooking/糖醋鲤鱼/糖醋鲤鱼.md) -* [红烧猪蹄](./dishes/home-cooking/红烧猪蹄/红烧猪蹄.md) -* [南派红烧肉](./dishes/home-cooking/红烧肉/南派红烧肉.md) -* [简易红烧肉](./dishes/home-cooking/红烧肉/简易红烧肉.md) -* [红烧茄子](./dishes/home-cooking/红烧茄子.md) -* [红烧鱼头](./dishes/home-cooking/红烧鱼头.md) -* [红烧鲤鱼](./dishes/home-cooking/红烧鲤鱼.md) -* [老式锅包肉](./dishes/home-cooking/老式锅包肉/老式锅包肉.md) -* [茄子炖土豆](./dishes/home-cooking/茄子炖土豆.md) -* [菠菜炒鸡蛋](./dishes/home-cooking/菠菜炒鸡蛋/菠菜炒鸡蛋.md) -* [萝卜炖羊排](./dishes/home-cooking/萝卜炖羊排.md) -* [葱煎豆腐](./dishes/home-cooking/葱煎豆腐.md) -* [蒜苔炒肉末](./dishes/home-cooking/蒜苔炒肉末.md) -* [血浆鸭](./dishes/home-cooking/血浆鸭/血浆鸭.md) -* [西红柿炒鸡蛋](./dishes/home-cooking/西红柿炒鸡蛋.md) -* [西红柿牛腩](./dishes/home-cooking/西红柿牛腩/西红柿牛腩.md) -* [辣椒炒肉](./dishes/home-cooking/辣椒炒肉.md) -* [酱牛肉](./dishes/home-cooking/酱牛肉/酱牛肉.md) -* [酸辣土豆丝](./dishes/home-cooking/酸辣土豆丝.md) -* [韩式拌饭](./dishes/home-cooking/韩式拌饭/韩式拌饭.md) -* [香干肉丝](./dishes/home-cooking/香干肉丝.md) -* [香干芹菜炒肉](./dishes/home-cooking/香干芹菜炒肉/香干芹菜炒肉.md) -* [香菇滑鸡](./dishes/home-cooking/香菇滑鸡/香菇滑鸡.md) -* [鱼香肉丝](./dishes/home-cooking/鱼香肉丝.md) -* [鱼香茄子](./dishes/home-cooking/鱼香茄子/鱼香茄子.md) -* [鳊鱼炖豆腐](./dishes/home-cooking/鳊鱼炖豆腐/鳊鱼炖豆腐.md) -* [微波炉鸡蛋羹](./dishes/home-cooking/鸡蛋羹/微波炉鸡蛋羹.md) -* [鸡蛋羹](./dishes/home-cooking/鸡蛋羹/鸡蛋羹.md) -* [麻辣香锅](./dishes/home-cooking/麻辣香锅.md) -* [黄油煎虾](./dishes/home-cooking/黄油煎虾/黄油煎虾.md) -* [黄瓜炒肉](./dishes/home-cooking/黄瓜炒肉.md) - -### 早餐 - -* [吐司果酱](./dishes/breakfast/吐司果酱.md) -* [太阳蛋](./dishes/breakfast/太阳蛋.md) -* [微波炉蛋糕](./dishes/breakfast/微波炉蛋糕.md) -* [水煮玉米](./dishes/breakfast/水煮玉米.md) -* [溏心蛋](./dishes/breakfast/溏心蛋.md) -* [牛奶燕麦](./dishes/breakfast/牛奶燕麦.md) -* [美式炒蛋](./dishes/breakfast/美式炒蛋.md) -* [茶叶蛋](./dishes/breakfast/茶叶蛋.md) -* [蒸花卷](./dishes/breakfast/蒸花卷.md) - -### 主食 - -* [披萨饼皮](./dishes/staple/pizza/披萨饼皮.md) -* [微波炉腊肠煲仔饭](./dishes/staple/微波炉腊肠煲仔饭/微波炉腊肠煲仔饭.md) -* [手工水饺](./dishes/staple/手工水饺.md) -* [日式咖喱饭](./dishes/staple/日式咖喱饭/日式咖喱饭.md) -* [炒方便面](./dishes/staple/炒方便面.md) -* [炒河粉](./dishes/staple/炒河粉.md) -* [炒馍](./dishes/staple/炒馍.md) -* [炸酱面](./dishes/staple/炸酱面.md) -* [烙饼](./dishes/staple/烙饼/烙饼.md) -* [热干面](./dishes/staple/热干面.md) -* [煮泡面加蛋](./dishes/staple/煮泡面加蛋.md) -* [米饭](./dishes/staple/米饭/米饭.md) -* [老友猪肉粉](./dishes/staple/老友猪肉粉/老友猪肉粉.md) -* [老干妈拌面](./dishes/staple/老干妈拌面.md) -* [蛋炒饭](./dishes/staple/蛋炒饭.md) -* [醪糟小汤圆](./dishes/staple/醪糟小汤圆.md) -* [麻油拌面](./dishes/staple/麻油拌面.md) -* [麻辣减脂荞麦面](./dishes/staple/麻辣减脂荞麦面.md) - -### 半成品加工 - -* [凉皮](./dishes/semi-finished/凉皮.md) -* [懒人蛋挞](./dishes/semi-finished/懒人蛋挞/懒人蛋挞.md) -* [速冻水饺](./dishes/semi-finished/速冻水饺.md) -* [速冻汤圆](./dishes/semi-finished/速冻汤圆/速冻汤圆.md) -* [速冻馄饨](./dishes/semi-finished/速冻馄饨.md) - -### 汤与粥 - -* [小米粥](./dishes/soup/小米粥.md) -* [昂刺鱼豆腐汤](./dishes/soup/昂刺鱼豆腐汤/昂刺鱼豆腐汤.md) -* [皮蛋瘦肉粥](./dishes/soup/皮蛋瘦肉粥.md) -* [米粥](./dishes/soup/米粥.md) -* [紫菜蛋花汤](./dishes/soup/紫菜蛋花汤.md) -* [罗宋汤](./dishes/soup/罗宋汤.md) -* [菌菇炖乳鸽](./dishes/soup/菌菇炖乳鸽/菌菇炖乳鸽.md) -* [西红柿土豆炖牛肉(腩)](./dishes/soup/西红柿土豆炖牛肉/西红柿土豆炖牛肉(腩).md) -* [西红柿鸡蛋汤](./dishes/soup/西红柿鸡蛋汤.md) -* [金针菇汤](./dishes/soup/金针菇汤.md) - -### 饮料 - -* [B52轰炸机](./dishes/drink/B52轰炸机.md) -* [奶茶](./dishes/drink/奶茶.md) -* [杨枝甘露](./dishes/drink/杨枝甘露.md) -* [百香果橙子特调](./dishes/drink/百香果橙子特调/百香果橙子特调.md) -* [耙耙柑茶](./dishes/drink/耙耙柑茶/耙耙柑茶.md) -* [酸梅汁](./dishes/drink/酸梅汁.md) -* [酸梅汤](./dishes/drink/酸梅汤/酸梅汤.md) -* [金汤力](./dishes/drink/金汤力/金汤力.md) -* [金菲士](./dishes/drink/金菲士/金菲士.md) - -### 酱料和其它材料 - -* [油泼辣子](./dishes/condiment/油泼辣子.md) -* [油酥](./dishes/condiment/油酥.md) -* [炸串酱料](./dishes/condiment/炸串酱料.md) -* [糖色](./dishes/condiment/糖色.md) -* [糖醋汁](./dishes/condiment/糖醋汁.md) -* [蒜香酱油](./dishes/condiment/蒜香酱油.md) -* [蔗糖糖浆](./dishes/condiment/蔗糖糖浆/蔗糖糖浆.md) - -### 甜品 - -* [提拉米苏](./dishes/dessert/提拉米苏/提拉米苏.md) -* [烤蛋挞](./dishes/dessert/烤蛋挞/烤蛋挞.md) - -## 进阶知识学习 - -如果你已经做了许多上面的菜,对于厨艺已经入门,并且想学习更加高深的烹饪技巧,请继续阅读下面的内容: - -* [油温判断技巧](./tips/advanced/油温判断技巧.md) -* [辅料技巧](./tips/advanced/辅料技巧.md)