{"id":13455850,"url":"https://github.com/sumimakito/hexo-theme-typography","last_synced_at":"2025-04-04T10:08:37.549Z","repository":{"id":25516430,"uuid":"104216989","full_name":"sumimakito/hexo-theme-typography","owner":"sumimakito","description":"Rediscover the beauty of typography.","archived":false,"fork":false,"pushed_at":"2023-04-28T02:09:47.000Z","size":1821,"stargazers_count":668,"open_issues_count":25,"forks_count":119,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-30T08:19:08.717Z","etag":null,"topics":["hexo","hexo-blog","hexo-theme"],"latest_commit_sha":null,"homepage":null,"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/sumimakito.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}},"created_at":"2017-09-20T13:10:29.000Z","updated_at":"2024-10-29T07:34:40.000Z","dependencies_parsed_at":"2024-01-13T17:47:36.702Z","dependency_job_id":"59bdf9d0-f0fa-4178-bccb-d5f7a5af0b32","html_url":"https://github.com/sumimakito/hexo-theme-typography","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/sumimakito%2Fhexo-theme-typography","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumimakito%2Fhexo-theme-typography/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumimakito%2Fhexo-theme-typography/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumimakito%2Fhexo-theme-typography/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumimakito","download_url":"https://codeload.github.com/sumimakito/hexo-theme-typography/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157283,"owners_count":20893220,"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":["hexo","hexo-blog","hexo-theme"],"created_at":"2024-07-31T08:01:12.171Z","updated_at":"2025-04-04T10:08:37.520Z","avatar_url":"https://github.com/sumimakito.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"hexo-theme-Typography\n======\n\n![Head](https://github.com/SumiMakito/hexo-theme-typography/blob/master/_art/head.png?raw=true)\n\n![Screenshot](https://github.com/SumiMakito/hexo-theme-typography/blob/master/_art/screenshot.png?raw=true)\n\n[点击这里阅读简体中文版使用文档](https://github.com/SumiMakito/hexo-theme-typography/blob/master/README_zh-CN.md)\n\n## Installing\n\n### Prerequisite – Ensure the dependencies\n\n*Do not simply copy and paste the whole block of codes, please take a carefully look in advance. :)*\n\n```bash\ncd hexo # cd into the root directory of your Hexo blog\n```\n\n#### Yarn users\n\n```bash\nyarn remove hexo-generator-category # we'll use hexo-generator-category-enhance instead\nyarn add hexo-renderer-pug hexo-generator-archive hexo-generator-category-enhance hexo-generator-feed hexo-generator-tag\nyarn add hexo-prism-plugin # for syntax highlighting\n```\n\n#### Npm users\n\n```bash\nnpm uninstall --save hexo-generator-category # we'll use hexo-generator-category-enhance instead\nnpm install --save hexo-renderer-pug hexo-generator-archive hexo-generator-category-enhance hexo-generator-feed hexo-generator-tag\nnpm install --save hexo-prism-plugin # for syntax highlighting\n```\n\n### Installing the theme\n\n```bash\ngit clone https://github.com/SumiMakito/hexo-theme-typography themes/typography\ncd themes/typography\nnpm install\nyarn install # for yarn users\n```\n\n### Modifying the config file\n\n\u003e To use Typography, some modifications on the your blog's root-level *_config.yml* is necessary.\n\n```yaml\ntheme: typography\n\nhighlight:\n  enable: false # we will use the prism plugin instead\n\nplugin:\n  - hexo-generator-category-enhance\n  - hexo-generator-feed\n  - hexo-asset-image\n  - hexo-prism-plugin\n  - hexo-toc\n  # ... other plugins you'd like to enable\n\n# Generate archive page\narchive_generator:\n  per_page: 0\n\n# Generate categories index page and each category page\ncategory_generator:\n  per_page: 10\n  enable_index_page: true\n\n# Generate tags index page and each tag page\ntag_generator:\n  per_page: 10\n  enable_index_page: true\n\n# Generator atom feed for you website\nfeed:\n  type: atom\n  path: atom.xml\n  limit: 20\n  hub:\n  content:\n  content_limit: 140\n  content_limit_delim: ' '\n\n# For syntax highlighting\nprism_plugin:\n  mode: 'preprocess'\n  theme: 'default'\n  line_number: true \n```\n\n## Updating\n\n```bash\ncd themes/typography\ngit pull\nnpm run build\nyarn run build # for yarn users\n```\n\n\u003e You may encounter the error `modified: themes/typography` if you are managing the whole blog with `git`. In that case, instead of using `git push`, we recommend you to download the zip and update the theme manually.\n\n## Customizing\n\nTypography has packed up several labor-saving functions, thus you can easily make any change at any time in the `_config.yml` file located in the root directory of the theme.\n\n### Correctly define the title\u003csup\u003e* Important *\u003c/sup\u003e\n\nTypography has three titles: `title`, `title_primary`, and `title_secondary`. The `title` is defined in the `_config.yml` inside the Hexo blog's root directory while the `title_primary` and `title_secondary` are defined in Typography's `_config.yml`.\n\n- `title`: The `\u003ctitle\u003e` of all the HTML pages. \n- `title_primary`: The bigger title to display on nav/side bar.\n- `title_secondary `: The smaller title to display on nav/side bar.\n\n### Change the language\n\nModify the `.yml` files in `themes/typography/languages` or add new files according to your need.\n\n### Auto truncate\n\nIt is possible to control the length for all the summaries on the index page by setting a value for `truncate_len`. The default length is 160.\n\ne.g. `truncate_len: 160`\n\n### Changing the color scheme\n\nYou can find this option in theme's `_config.yml`.\n\nCurrently, there are two color schemes available: \n\n- light\n- dark\n\n``` yaml\nthemeStyle: light\n```\n\n### Set up the comment service\n\nThe comment box is a place for readers to exchange their ideas with the author. Typography has integrated two 3rd-party comment services, and they are ready to use at any time.\n\nCurrently, Typography supports comment services provided by [Disqus](https://disqus.com/) and [LiveRe](https://livere.com/). The only thing you need to do is to set the corresponding key for the comment service that you would like to use.\n\ne.g. `disqus: disqus_shortname` OR `livere: livere_data_uid`\n\n\u003e Do not use two comment services at the same time, or the post will be followed by two comment boxes. Just leave blank for the rest of the comment service-related options.\n\n### Show/Hide the page indicator\n\nSet to false to hide the page indicator above the page switcher.\n\n```yaml\nshowPageCount: true\n```\n\n### Show/Hide categories and tags links behind post title\n\nYou can choose whether or not to show categories and tags links behind post title in index and post page by changing the following values in theme's `_config.yml`:\n\n``` yaml\nshowCategories: true\nshowTag: true\n```\n### Set website favicon\n\nPrepare `favicon.png` file and put in `themes/typography/source/images/favicon.png`\n\n### Embed Google Analytics in your blog\n\nFind the line below in `themes/typography/source/js/google-analytics.js`:\n\n`ga('create', 'UA-73442912-1', 'auto');`\n\nReplace `UA-73442912-1` with your own google analytics id.\n\n### SEO-friendly meta description tag\n\nTypography gives you the chance to insert unique SEO-friendly meta description tags for different posts. Also, it is handy. Just add a new line in the head section of your post:\n\n```yaml\ntitle: Another post\ndate: 1970-01-01 00:00\ndesc: Description to be inserted into the metadata of the post page.\n---\n```\n\nThen the generated HTML file will contain:\n\n```html\n\u003cmeta name=\"description\" content=\"Description to be inserted into the metadata of the post page.\"\u003e\n```\n\n\u003e If `desc` is not specified, the first 140 words of the post will be used as the description.\n\n### Icons for social network accounts\n\nTypography natively supports the following social network accounts:\n\n- Twitter\n- GitHub\n- Instagram\n- Sina Weibo\n\nTo use light up those icons, just simply set the values for the corresponding options.\n\n```yaml\ntwitter: user_name\nweibo: user_id/permanent_name\ninstagram: user_name\ngithub: user_name\n```\n\n\u003e Tips: leave blanks to remove the icons from the site.\n\n## Customize\u003csup\u003e2\u003c/sup\u003e\n\n\u003e Please edit *scss* files instead of *css* files. We recommend you to run `npm run watch` (or `yarn run watch`) to watch changes on *scss* files. But plesae be noted that `npm run watch` does not provide auto-prefixing support on compiled css files. Running `npm run build` (or `yarn run build`), which has support for CSS compressing and auto-prefixing, after you have done your modifications and before deploying your blog is recommended. \n\nTypography uses `node-sass` and `scss-compile` to generate `.css` files for styling. We have provided several options such as background and foreground colors for you to choose. When your editing is finished, **do not** forget to run the commands below to re-generate the `.css` files:\n\n```bash\ncd themes/typography\nnpm run build\nyarn run build # for yarn users\n```\n\n\u003e `.scss` files are located in `theme/typography/raw/scss`.\n\n## Customize\u003csup\u003e3\u003c/sup\u003e\n\nAs for the pug templates inside `theme/typography/layout`, just edit them and remember to add some pepper as you like it.\n\n## Contributors\n\n- [Makito](https://github.com/SumiMakito)\n- [pmtao](https://github.com/pmtao)\n\n## Support me\n\nI am a freelance student developer. (with bloody little income)\n\nPlease consider buy me a cup of caramel macchiato if you really like my work. `_(:з」∠)_` \n\nThank you very much.\n\n\u003cimg width=\"300\" src=\"https://raw.githubusercontent.com/SumiMakito/Misc/master/wechat-2.png\" alt=\"WeChat QR code\"\u003e\n\n\u003cimg width=\"240\" src=\"https://raw.githubusercontent.com/SumiMakito/Misc/master/alipay-2.jpg\" alt=\"Alipay QR code\"\u003e\n\n\u003e WeChat and Alipay are both accepted.\n\n## License\n\n© 2017-2018 Makito\n\nTypography is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumimakito%2Fhexo-theme-typography","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumimakito%2Fhexo-theme-typography","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumimakito%2Fhexo-theme-typography/lists"}