{"id":13671714,"url":"https://github.com/laoqiren/yohe","last_synced_at":"2025-04-27T18:31:36.304Z","repository":{"id":80880020,"uuid":"105555802","full_name":"laoqiren/yohe","owner":"laoqiren","description":":smiling_imp: powerful static blog generator","archived":false,"fork":false,"pushed_at":"2017-10-13T03:25:08.000Z","size":104,"stargazers_count":69,"open_issues_count":0,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-11T09:44:01.755Z","etag":null,"topics":["blog","static-site-generator"],"latest_commit_sha":null,"homepage":"http://luoxia.me/yohe_site/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laoqiren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-02T16:11:26.000Z","updated_at":"2024-01-02T02:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"7006b2f8-3b2f-4ca2-8a14-ce77cb3443b3","html_url":"https://github.com/laoqiren/yohe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laoqiren%2Fyohe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laoqiren%2Fyohe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laoqiren%2Fyohe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laoqiren%2Fyohe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laoqiren","download_url":"https://codeload.github.com/laoqiren/yohe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251187253,"owners_count":21549610,"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","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":["blog","static-site-generator"],"created_at":"2024-08-02T09:01:16.997Z","updated_at":"2025-04-27T18:31:36.294Z","avatar_url":"https://github.com/laoqiren.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Yohe\n\u003cimg src=\"./logo.png\" width = \"200\" alt=\"logo\" align=center /\u003e\n\n[![npm](https://img.shields.io/npm/dm/yohe.svg?style=flat-square)](https://www.npmjs.com/package/yohe)\n[![npm](https://img.shields.io/npm/v/yohe.svg?style=flat-square)](https://github.com/laoqiren/yohe)\n[![npm](https://img.shields.io/npm/l/yohe.svg?style=flat-square)](https://github.com/laoqiren/yohe)\n\na static blog generator, powered by [Node.js](https://nodejs.org). Yohe means that you will say \"Wow, so cute\" after you tried it.\n\nonline demo: [http://luoxia.me/yohe_site/](http://luoxia.me/yohe_site/)\n\n[中文文档](https://github.com/laoqiren/yohe/blob/master/CN.md)\n\n## Features\n\n* simple and fast static blog generator.\n* local server to preview the blog.\n* Customizable information and themes.\n* create new custom pages, CuSTomizable navigation menu.\n* tags,categories,pages,archives,etc.\n* github comment(powered by gitment).\n* filter specially categories to not be shown on the posts list\n\n## Installation\n```\n$ npm install yohe -g\n```\n\n## Quick Start\n\n**Get help**\n```\n$ yohe --help\n```\n\n**Setup your blog**\n```\n$ yohe init myblog\n$ cd myblog\n```\nthe command will init the blog dir, include initial theme,posts,custom pages dir,and initial config fle.\n\n**Create a new post**\n```\n$ yohe new \u003cpostName\u003e\n```\nthe command will create `\u003cpostName\u003e.md` file in `source/_posts`,edit it to start writting.\n\n**Generate static files**\n```\n$ yohe build\n```\nthe command will generate your blog to dir `public`\n\n**Preview the blog**\n```\n$ yohe server\n```\nthe command will start a local static server to serve the `public` files. The port and subdir information can be edited at `config.json`.\n\n**new custom pages**\n```\n$ yohe page \u003cpageName\u003e\n```\nthe command will create `\u003cpageName\u003e.md` file in `source/_extra` dir, the initial layout of the new page is `about`.\n\n## config.json\n```js\n{\n    \"basic\": {\n        \"title\": \"My Blog\", // the title of your blog\n        \"author\": \"laoqiren\", // the author of the blog\n        \"description\": \"I Love Coding\",\n        \"root\": \"\" // the root of the site ，e.g. set root to be \"/yohe_site\" if your blog is at \"http://luoxia.me/yohe_site\"\n    },\n    \"theme\": {\n        \"themeName\": \"default\",  // name of the theme.\n        \"highlightTheme\": \"railscasts\", // code highlight syle, all available styles refer to \"https://github.com/isagalaev/highlight.js/tree/master/src/styles\"\n        \"per_page\": 6,// number of posts per page\n        \"filter\": [\"Life\",\"Secret\"],  // filter some special categories to not be shown\n        \"navPages\": [     // custom pages\n            {\n                \"title\": \"Tags\",\n                \"url\": \"/tags\"\n            },\n            {\n                \"title\": \"About Me\",\n                \"url\": \"/about\"\n            },\n            {\n                \"title\": \"Life\",\n                \"url\": \"/categories/life/\"\n            }\n        ],\n        \"reward\": {  // config about reward\n            \"enabled\": true,\n            \"imgName\": \"alipay.jpg\",  // reward QR Code images e.g. alipay.jpg\n            \"words\": \"support me\"   // custom reward words\n        }\n    },\n    \"server\": {\n        \"port\": 3000 // the port of local static server\n    },\n    \"gitment\": {   // gitment config, refer to ”https://github.com/imsun/gitment“\n        \"owner\": \"\",\n        \"repo\": \"\",\n        \"oauth\": {\n            \"client_id\": \"\",\n            \"client_secret\": \"\"\n        }\n    }\n}\n```\n\n## post pattern\nfollow the example below:\n```\n---\ntitle: Cluster\ndate: 2016-11-27\ntags: [Cluster,process]\nlayout: post\ncomment: true\ncategories: Nodejs\n---\n```\n**tips:** initial `layout` is `post`, and initial `comment` is `true`.\n\n## How to publish\n`Yohe` will generate your blog to dir `public`, you can use different ways to serve `public` dir.\n\n## How to develop themes\n\n### layouts:\n```\n├── about.html    // layout of about page(required)\n├── index.html    // layout of index page(required)\n├── list.html     // posts list page of specially categories\u0026tags(required)\n├── post.html     // layout of post's detail page(Can rename)\n└── tags.html     // layout of tags cloud(required)\n└── ...           // custom layouts\n```\n\n### Variables:\n**basic variables:**\n\nVariable  | Content\n------------- | -------------\nconfig | configs Object, refer to `config.json`\ntags | Array of tags. For each: `tag.name`,`tag.posts`(Array),`tag.url`\ncategories  | Array of categories. For each: `category.name`, `category.posts`,`category.url`\narchives | Array of archives' posts(to show posts list of particular date). For each: `archive.name`,`archive.posts`\narchivesList | Array of archives' informations. For each: `archive.archiveTag`,`archive.arrOfDate`,`archive.url`\n\n**special variables:**\n\nPage  | Variables\n------------- | -------------\npost.html  | `post`: `post.title`, `post.date`, `post.categories`, `post.tags`,  `post.content`\nlist.html | `title`(the title of concrete tag or category or archive),`posts`(Array of posts after filtered),`pageNumber`(Number of page),`sumpages`(Sum of pages), `flag`(\"tags\" or \"categories\" or archives\")\nabout.html | `content`: the content of `about.md` or other extra pages' `.md` file.\n\n\n### assets:\nthe static resources like `.js`,`.css` should be in dir `assets`\n\n## Other tips\n* To setup your own logo, replace `assets/images/logo.png` with your own(name should also be `logo.png`)\n* About page is `source/_about/about.md`\n* To implement `blog in blog`, filter some special categories\n* To avoid errors, replace space with `-` of post name and category name.\n## TODOs\n\n* beautify default theme\n* analysis,etc\n* complex config\n\n## LICENSE\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaoqiren%2Fyohe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaoqiren%2Fyohe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaoqiren%2Fyohe/lists"}