{"id":17242802,"url":"https://github.com/imcuttle/moka","last_synced_at":"2025-08-03T14:12:47.905Z","repository":{"id":12107278,"uuid":"71033826","full_name":"imcuttle/moka","owner":"imcuttle","description":"A powerful Service For SPA Blog.","archived":false,"fork":false,"pushed_at":"2022-01-07T14:25:10.000Z","size":24635,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T14:09:39.793Z","etag":null,"topics":["moka","spa-blog"],"latest_commit_sha":null,"homepage":"https://imcuttle.github.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imcuttle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-16T06:19:54.000Z","updated_at":"2021-08-25T13:24:43.000Z","dependencies_parsed_at":"2022-08-07T06:16:44.970Z","dependency_job_id":null,"html_url":"https://github.com/imcuttle/moka","commit_stats":null,"previous_names":["moyuyc/moka"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imcuttle/moka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fmoka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fmoka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fmoka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fmoka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imcuttle","download_url":"https://codeload.github.com/imcuttle/moka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imcuttle%2Fmoka/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268554912,"owners_count":24269064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["moka","spa-blog"],"created_at":"2024-10-15T06:14:06.440Z","updated_at":"2025-08-03T14:12:47.852Z","avatar_url":"https://github.com/imcuttle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moka (SPA Blog For Everyone)\n\n[English Quick Starter Here](https://moyuyc.github.io/#/article/set-up-yourself-blog)\n\n如今,单页应用\"横行霸道\", 而且新时代知识信息海量,我们更需要自己的Blog来沉淀知识。\n综上,`Moka`走入了我们的视线。\n\n\n## Usage\n\n为了第一眼能看到效果, 我先把如何安装使用说一下。\n\n1. 一切从`npm`开始\n\n        $ npm i -g moka-cli\n2. 安装完成后\n\n    ```sh    \n    $ moka -h # 帮助\n    $ moka -v # 版本\n    \n    $ mkdir myBlog\n    $ cd myBlog\n    $ moka i  # 开启自己的spa Blog\n    $ moka g  # generate static pages\n    $ moka s  # 开启本地服务，动态更新_articles\n    $ moka ss  # 开启本地静态服务，需要先generate\n    $ moka n abc # 新建一个article\n    \n    $ moka d  # 根据 moka.config.json deploy 发布\n    $ moka b  # 根据 moka.config.json bak 发布\n    ``` \n\n3. 线上效果\n\n    [moyuyc.github.io](https://moyuyc.github.io/)\n\n4. 详细解释\n\n    在当前目录下产生一套文件目录结构。如下：\n\n    ```\n    moka-blog/\n    ├── moka.config.json # moka配置，包括全局配置，如deploy，bak信息，主题选择\n    ├── package.json     # 可以无视\n    ├── source/          # moka g 会将该目录下非`_articles`文件夹放入static\n    │   ├── _articles/   # moka g 将`_articles`下的markdown文件解析到static中\n    │   └── ...\n    ├── static/          # moka g 产生的最终发布的目录，deploy便是发布该目录\n    │   └── ...   \n    ├── template/\n    │   └── article.md   # moka n 命令产生新文章的模板\n    ├── hooks/           # 钩子, 注意各个钩子的cwd还是`moka-blog`, 如果pre钩子exit code!=0，将会终止process\n    │   ├── pre-generate.sample\n    │   ├── post-generate.sample\n    │   ├── pre-bak.sample\n    │   ├── post-bak.sample\n    │   ├── pre-deploy.sample   # deploy之前调用，必须executable，去除`.sample`后缀\n    │   └── post-deploy.sample  # deploy之后调用\n    └── themes/          # moka g 将配置中选中对应的主题 `themeBuild`目录 拷贝到static\n         └── moka/       # 主题文件夹，其中包含theme.config.json, 根据主题要求自行配置\n\n    ```    \n\n## More\n\n主题开发者请看 [Document](DOCUMENT.md)\n\n默认主题说明请看 [Theme Config](THEME_README.md)\n\n## Upgrade\n\n添加hooks, 支持用户自定义脚本。比如pre-generate/post-generate/post-deploy的发送邮件等\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fmoka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimcuttle%2Fmoka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimcuttle%2Fmoka/lists"}