diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78d8813f624..7688c8b9883 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: node-version: 14 - run: npm install - - run: npm run create:html + - run: npm run build - run: npm run create:ast - name: Deploy @@ -26,14 +26,13 @@ jobs: - name: Create Tag id: create_tag - uses: jaywcjlove/create-tag-action@v1.2.1 + uses: jaywcjlove/create-tag-action@v1.3.6 with: - token: ${{ secrets.GITHUB_TOKEN }} package-path: ./package.json - name: Generate Changelog id: changelog - uses: jaywcjlove/changelog-generator@v1.4.8 + uses: jaywcjlove/changelog-generator@v1.5.3 with: token: ${{ secrets.GITHUB_TOKEN }} head-ref: ${{steps.create_tag.outputs.version}} diff --git a/.gitignore b/.gitignore index fa0acbd83b5..47e928cfc6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules/ dist/*.html dist/*.json +dist npm-debug.log* package-lock.json diff --git a/README-zh.md b/README-zh.md index c2d5233f551..300e9d863cb 100755 --- a/README-zh.md +++ b/README-zh.md @@ -16,6 +16,8 @@ Awesome Mac ![App Store][app-store Icon] 表示 **App store** 连接地址;\ ![Awesome List][awesome-list Icon] 表示项目的相应 **Awesome list** 的超链接; + + ## 目录 - [Awesome Mac](#awesome-mac) @@ -81,6 +83,7 @@ Awesome Mac - [License](#license) + ## 开发者工具 @@ -1054,3 +1057,9 @@ Support this project by becoming a sponsor. Your logo will show up here with a l [![Creative Commons License](http://i.creativecommons.org/l/by/4.0/88x31.png)](https://creativecommons.org/licenses/by/4.0/) This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).Ax + + + \ No newline at end of file diff --git a/README.md b/README.md index fe5a6a0b1c8..9c3cfccc3f4 100755 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ Any comments, suggestions? [Let us know!](https://github.com/jaywcjlove/awesome- [![Get it on macOS](http://jaywcjlove.github.io/sb/download/macos.svg)](https://github.com/jaywcjlove/amac/releases) + + ## Contents - [Awesome Mac](#awesome-mac) @@ -96,6 +98,7 @@ Any comments, suggestions? [Let us know!](https://github.com/jaywcjlove/awesome- - [License](#license) + ## Reading and Writing Tools @@ -1100,3 +1103,9 @@ This work is licensed under a [Creative Commons Attribution 4.0 International Li [Freeware Icon]: https://jaywcjlove.github.io/sb/ico/min-free.svg "Freeware" [app-store Icon]: https://jaywcjlove.github.io/sb/ico/min-app-store.svg "App Store Software" [awesome-list Icon]: https://jaywcjlove.github.io/sb/ico/min-awesome.svg "Awesome List" + + + \ No newline at end of file diff --git a/build/ast.mjs b/build/ast.mjs index d3bb088d352..5167a21da07 100644 --- a/build/ast.mjs +++ b/build/ast.mjs @@ -1,5 +1,5 @@ import { toVFile } from 'to-vfile' -import remark from 'remark' +import { remark } from 'remark' import gfm from 'remark-gfm' import FS from 'fs-extra' diff --git a/build/create.mjs b/build/create.mjs deleted file mode 100644 index 278aeb723e0..00000000000 --- a/build/create.mjs +++ /dev/null @@ -1,154 +0,0 @@ -import FS from 'fs-extra'; -import { create } from 'markdown-to-html-cli'; - -const gitalk = [ - { - type: 'element', - tagName: 'div', - properties: { id: 'gitalk-container' }, - children: [], - }, { - type: 'element', - tagName: 'script', - properties: { - src: 'https://utteranc.es/client.js', - repo: 'jaywcjlove/awesome-mac', - 'issue-term': 'homepage', - crossorigin: true, - async: true, - theme: 'github-light', - }, - children: [], - }, { - type: 'element', - tagName: 'a', - properties: { className: 'totop', href: '#totop' }, - children: [{ type: 'text', value: 'Top' }], - } -]; - -const topmenuElm = { - type: 'element', - tagName: 'div', - properties: { className: 'topmenu' }, - children: [ - { - type: 'element', - tagName: 'a', - properties: { href: 'index.html' }, - children: [{ type: 'text', value: 'Home' }], - }, { - type: 'element', - tagName: 'a', - properties: { href: 'https://github.com/jaywcjlove/awesome-mac/issues' }, - children: [{ type: 'text', value: 'Recommended' }], - }, { - type: 'element', - tagName: 'a', - properties: { href: 'https://github.com/jaywcjlove/awesome-mac/issues' }, - children: [{ type: 'text', value: 'Link failure Report' }], - } - ] -} - -const style = ` -a { text-decoration: none; } -.totop { position: fixed; bottom: 20px; right: 20px; display: inline-block; background: rgba(0, 0, 0, 0.74); padding: 10px; border-radius: 3px; z-index: 9999; color: #fff; font-size: 10px; } -.topmenu { position: fixed; left: 5px; top: 5px; display: flex; } -.topmenu a { background: #00000073; padding: 1px 5px; font-size: 12px; border-radius: 2px; margin-right: 5px; color: #fff; } -.topmenu a:hover, .totop:hover { background: #2186ff; color: #fff; } -.markdown-body { max-width: 760px; } -`; - -const options = { - 'github-corners': 'https://github.com/jaywcjlove/awesome-mac.git', - document: { - style, - link: [ - { rel: 'shortcut icon', href: './favicon.ico' }, - { rel: 'stylesheet', href: '//unpkg.com/gitalk/dist/gitalk.css' } - ] - }, - reurls: { - 'editor-plugin.md': 'editor-plugin.html', - 'editor-plugin.md#atom-plugin': 'editor-plugin.html#atom-plugin', - 'editor-plugin.md#vim-plugin': 'editor-plugin.html#vim-plugin', - 'editor-plugin-zh.md': 'editor-plugin-zh.html', - 'editor-plugin-zh.md#atom-plugin': 'editor-plugin-zh.html#atom-plugin', - 'editor-plugin-zh.md#vim-plugin': 'editor-plugin-zh.html#vim-plugin', - 'editor-plugin-zh.md#sublime-text-plugin': 'editor-plugin-zh.html#sublime-text-plugin', - 'editor-plugin-zh.md#vscode-plugin': 'editor-plugin-zh.html#vscode-plugin', - 'README-zh.md': 'index.zh.html', - 'README.md': 'index.html' - }, - rewrite: (node) => { - if (node.type === 'element' && node.tagName === 'body') { - node.properties = { ...node.properties, id: 'totop' }; - node.children = [topmenuElm, ...node.children, ...gitalk]; - } - } -} - -;(async () => { - await FS.ensureDir('./dist'); - let markdown = await FS.readFile('./README.md'); - let html = create({ - markdown, ...options, - document: { - title: "Awesome Mac application sharing recommendation - Awesome Mac", - ...options.document, - meta: [ - { description: 'A curated list of awesome applications, softwares, tools and shiny things for Mac osx. - Awesome Mac' }, - { keywords: 'mac,osx,app,softwares,applications,mac softwares,awesome mac,free softwares,Freeware' } - ] - } - }); - await FS.writeFile('./dist/index.html', html); - console.log(' create file: \x1b[32;1m ./dist/index.html \x1b[0m'); - - markdown = await FS.readFile('./README-zh.md'); - html = create({ - markdown, ...options, - document: { - title: "Awesome Mac 应用分享推荐 - Awesome Mac", - ...options.document, - meta: [ - { description: '收集分享大量非常好用的Mac应用程序、软件以及工具,主要面向开发者和设计师。 - Awesome Mac' }, - { keywords: 'mac,osx,app,mac软件,awesome mac,苹果软件下载,免费软件,mac免费软件下载,精品mac应用' } - ] - } - }); - await FS.writeFile('./dist/index.zh.html', html); - console.log(' create file: \x1b[32;1m ./dist/index.zh.html \x1b[0m'); - - markdown = await FS.readFile('./editor-plugin.md'); - html = create({ - markdown, ...options, - document: { - title: "Editors Plugin Sharing Recommendation - Awesome Mac", - ...options.document, - meta: [ - { description: 'Editors Plugin Sharing Recommendation' }, - { keywords: 'mac,osx,app,softwares,applications,editor,plugin,editor-plugin,mac softwares,awesome mac,free softwares,Freeware' } - ] - } - }); - await FS.writeFile('./dist/editor-plugin.html', html); - console.log(' create file: \x1b[32;1m ./dist/editor-plugin.html \x1b[0m'); - - markdown = await FS.readFile('./editor-plugin-zh.md'); - html = create({ - markdown, ...options, - document: { - title: "Editors Plugin 分享推荐 - Awesome Mac", - ...options.document, - meta: [ - { description: 'Editors Plugin 分享推荐。 - Awesome Mac' }, - { keywords: 'mac,osx,app,softwares,applications,editor,plugin,editor-plugin,mac softwares,awesome mac,free softwares,Freeware' } - ] - } - }); - await FS.writeFile('./dist/editor-plugin-zh.html', html); - console.log(' create file: \x1b[32;1m ./dist/editor-plugin-zh.html \x1b[0m'); - -})(); diff --git a/editor-plugin-zh.md b/editor-plugin-zh.md index c2cf467560c..2e18b1f9e55 100644 --- a/editor-plugin-zh.md +++ b/editor-plugin-zh.md @@ -8,7 +8,6 @@ Editors Plugin ## Atom Plugin * 通用 - * [relative-numbers](https://atom.io/packages/relative-numbers) - 显示相对行号。 * [trailing-spaces](https://atom.io/packages/trailing-spaces) - 高亮多余的空格。 * [terminal-plus](https://atom.io/packages/terminal-plus) - 内嵌式全功能控制台。 @@ -29,9 +28,7 @@ Editors Plugin * [project-plus](https://atom.io/packages/project-plus) - 项目管理, 可以快速切换不同项目,多项目同时工作利器。 * [regex-railroad-diagram](https://atom.io/packages/regex-railroad-diagram) - 可以图形化显示正则表达式。 * [tree-view-search-bar](https://atom.io/packages/tree-view-search-bar/) - 文件列表快速查找工具。 - * 前端 - * [Nuclide](http://nuclide.io) - 用于编写 React Native,代码提示各种很厉害的样子。[![Open-Source Software][OSS Icon]](https://github.com/facebook/nuclide) * [TypeScript](https://github.com/TypeStrong/atom-typescript) - 支持TypeScript编译。 * [Emmet](https://atom.io/packages/emmet) - 快速编写HTML。 @@ -42,9 +39,7 @@ Editors Plugin * [pigments](https://atom.io/packages/pigments) - 把你文件中的颜色代码展示出来。 * [atom-html-preview](https://atom.io/packages/atom-html-preview) - 内置Chrome浏览器写移动端非常棒。 * [tree-view-copy-relative-path](https://atom.io/packages/tree-view-copy-relative-path) - 可以跟当前文件输出目标文件的相对路径,适合多文件相互调用。 - * Python - * [autocomplete-python](https://atom.io/packages/autocomplete-python) - 对Python提示进行增强。 * [linter-flake8](https://atom.io/packages/linter-flake8) - Python 语法检查。 * [python-tools](https://atom.io/packages/python-tools) - 一些有用的 Python 开发工具集。 @@ -138,3 +133,9 @@ Editors Plugin [OSS Icon]: https://jaywcjlove.github.io/sb/ico/min-oss.svg [Freeware Icon]: https://jaywcjlove.github.io/sb/ico/min-free.svg [app-store Icon]: https://jaywcjlove.github.io/sb/ico/min-app-store.svg + + + diff --git a/editor-plugin.md b/editor-plugin.md index 87194d1b494..1178306f78b 100644 --- a/editor-plugin.md +++ b/editor-plugin.md @@ -115,3 +115,8 @@ Editors Plugin [OSS Icon]: https://jaywcjlove.github.io/sb/ico/min-oss.svg [Freeware Icon]: https://jaywcjlove.github.io/sb/ico/min-free.svg [app-store Icon]: https://jaywcjlove.github.io/sb/ico/min-app-store.svg + + \ No newline at end of file diff --git a/idoc.yml b/idoc.yml new file mode 100644 index 00000000000..6b011251a8b --- /dev/null +++ b/idoc.yml @@ -0,0 +1,14 @@ +site: Awesome Mac + +description:  This repo is a collection of awesome Mac applications and tools for developers and designers. +keywords: mac,osx,app,softwares,applications,mac softwares,awesome mac,free softwares,Freeware + +favicon: ./logo.svg +logo: ./logo.svg + +dir: ./doc + +sideEffectFiles: + - README-zh.md + - editor-plugin.md + - editor-plugin-zh.md \ No newline at end of file diff --git a/logo.svg b/logo.svg new file mode 100644 index 00000000000..725be0556d0 --- /dev/null +++ b/logo.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/package.json b/package.json index 8220503fc60..b4ea0b2315f 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,9 @@ "homepage": "https://jaywcjlove.github.io/awesome-mac", "main": "dist/awesome-mac.json", "scripts": { - "start": "npm run create:html && npm run create:ast", - "create:html": "node build/create.mjs", + "start": "npm run build && npm run create:ast", + "doc": "idoc --watch", + "build": "idoc", "create:ast": "node build/ast.mjs" }, "repository": { @@ -30,10 +31,10 @@ "url": "https://github.com/jaywcjlove/awesome-mac/issues" }, "devDependencies": { - "fs-extra": "10.0.0", - "remark": "13.0.0", - "remark-gfm": "1.0.0", - "markdown-to-html-cli": "3.1.5", - "to-vfile": "7.0.0" + "fs-extra": "^10.1.0", + "idoc": "^1.18.0", + "remark": "^14.0.2", + "remark-gfm": "^3.0.1", + "to-vfile": "^7.2.3" } }