{"id":13494692,"url":"https://github.com/forecho/hugo-theme-echo","last_synced_at":"2025-02-26T20:09:15.537Z","repository":{"id":42194999,"uuid":"232738884","full_name":"forecho/hugo-theme-echo","owner":"forecho","description":"A super concise theme for Hugo ","archived":false,"fork":false,"pushed_at":"2024-08-25T10:44:05.000Z","size":245,"stargazers_count":104,"open_issues_count":0,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-19T19:09:46.363Z","etag":null,"topics":["hugo-theme"],"latest_commit_sha":null,"homepage":"https://blog.forecho.com/","language":"HTML","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/forecho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["forecho"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-01-09T06:30:21.000Z","updated_at":"2024-12-02T04:33:22.000Z","dependencies_parsed_at":"2024-01-16T09:01:53.161Z","dependency_job_id":"7d4229de-5734-43ed-b84f-8a44fd7d21ad","html_url":"https://github.com/forecho/hugo-theme-echo","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forecho%2Fhugo-theme-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forecho%2Fhugo-theme-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forecho%2Fhugo-theme-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forecho%2Fhugo-theme-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forecho","download_url":"https://codeload.github.com/forecho/hugo-theme-echo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240926391,"owners_count":19879737,"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":["hugo-theme"],"created_at":"2024-07-31T19:01:27.247Z","updated_at":"2025-02-26T20:09:15.520Z","avatar_url":"https://github.com/forecho.png","language":"HTML","funding_links":["https://github.com/sponsors/forecho"],"categories":["CSS","HTML","HTML (177)"],"sub_categories":[],"readme":"![hugo-theme-echo-preview](https://blog-1251237404.cos.ap-guangzhou.myqcloud.com/VSk6Kq.png)\n## hugo-theme-echo\n\nEcho 是一个风格简洁的 Hugo 主题。\n\n[我的博客](https://blog.forecho.com)\n\n**主要特色：**\n\n- 风格基于 [Tailwind CSS](https://tailwindcss.com/)\n- 使用更快的 Chroma 代码高亮\n- 自定义 css，自定义 js，自定义 head\n- 文章支持目录\n- 支持相关阅读\n- [那年今天](https://github.com/forecho/hugo-theme-echo/wiki)\n- 支持深度主题，可手动切换\n\n## 谁在用 hugo-theme-echo\n\n- [forecho](https://blog.forecho.com)：[GitHub 源码](https://github.com/forecho/hugo-blog)\n- Waiting to add more...\n\n## 如何使用？\n\n**注意：** 这个教程假设你 **第一次** 使用 [Hugo][] 。 [Hugo][] 是一个非常流行的静态网站生成工具。 你可查看官方文档 [Hugo Official Docs][] 获取更多帮助。\n\n[Hugo]: https://gohugo.io/\n[Hugo Official Docs]: https://gohugo.io/getting-started/\n\n\n\n### 快速安装 Hugo\n\n从 [Hugo Releases](https://github.com/gohugoio/hugo/releases) 上直接下载安装适合你的版本。\n\n\n### 快速创建网站\n\n```bash\nhugo new site myBlog\n```\n\n上面的命令将会在一个名为 `myBlog`  的文件夹中创建一个新的 hugo 站点。\n\n\n\n### 快速使用 \n\n把这个主题克隆到 `themes` 文件夹\n\n```bash\ncd myBlog\ngit submodule add https://github.com/forecho/hugo-theme-echo.git themes/echo\ncd themes/echo\nnpm ci # 本地开发才需要\n```\n\n⚠️ **在根目录添加 `package.json` 文件**，代码如下（一些个人信息请改成你自己的）：\n\n```json\n{\n    \"name\": \"forecho-blog\",\n    \"version\": \"0.0.1\",\n    \"description\": \"that is forecho blog\",\n    \"repository\": \"https://github.com/forecho/hugo-blog\",\n    \"license\": \"MIT\",\n    \"devDependencies\": {\n        \"autoprefixer\": \"^10.2.5\",\n        \"postcss\": \"^8.2.9\",\n        \"postcss-cli\": \"^8.3.1\",\n        \"tailwindcss\": \"^2.0.4\"\n    },\n    \"browserslist\": [\n        \"last 1 version\",\n        \"\u003e 1%\",\n        \"maintained node versions\",\n        \"not dead\"\n    ]\n}\n```\n\n\n站点设置示例：\n\n```toml\nbaseURL = \"http://localhost:1313\"\nlanguageCode = \"en-us\"\ntitle = \"Forecho's Blog\"\ntheme = \"echo\"\nDefaultContentLanguage = \"cn\"\n# 自动检测是否包含中文/日文/韩文，该参数会影响摘要和字数统计功能，建议设置为 true\nhasCJKLanguage = true\n# 设置页面生成形式，将默认的网站路径/修改成.html\nuglyURLs = true\ngoogleAnalytics = \"\"      # UA-XXXXXXXX-X\n\n## 评论系统\nchangyanAppid = \"\" # Changyan app id             # 畅言\nchangyanAppkey = \"\" # Changyan app key\ndisqusShortname = \"forecho-blog\" # disqus account name\nlivereUID = \"\" # LiveRe UID                  # 来必力\n\n[markup.highlight]\ncodeFences = true # 高亮 markdown 的代码块\nguessSyntax = true # 高亮 markdown 中没有标注语言的代码块\nhl_Lines = \"\"\nlineNoStart = 1\nlineNos = true\nlineNumbersInTable = true\nnoClasses = true\nstyle = \"manni\"\ntabWidth = 2\n\n# https://gohugo.io/content-management/urls/#aliases\n[permalinks]\nposts = \"/:filename\"\n\n[outputFormats.RSS]\nmediatype = \"application/rss\"\nbaseName = \"atom\"\n\n[services.rss]\nlimit = 20\n\n[author]\nname = \"forecho\"\navatar = \"https://avatars0.githubusercontent.com/u/1725326?s=460\u0026v=4\"\nbio = \"7 年开发经验，寻求技术 Leader 工作机会。Wechat: ipzone\"\nhomepage = \"https://forecho.com/\"\n\n[params]\nhtmlClass = \"dark\" # 可选，默认是空，为 light\nfavicon = \"https://avatars0.githubusercontent.com/u/1725326?s=460\u0026v=4\"\nkeywords = \"Hugo, theme, echo\"\ndescription = \"Hugo theme echo example site.\"\ntoc = true\nnavItems = [\n  [\"HOME\", \"/\"],\n  [\"ARCHIVE\", \"/posts.html\"],\n  [\"ABOUT\", \"/about.html\"],\n  [\"RSS\", \"/atom.xml\"]\n]\n# rss 全文输出\nrssFullContent = true\nuglyURLs = true\nbusuanzi = true # 是否使用不蒜子统计站点访问量\nstaticCDNPrefix = \"https://cdn.bootcss.com/font-awesome/5.11.2\"\nextraHead = '\u003cscript async src=\"https://www.googletagmanager.com/gtag/js?id=UA-xxx\"\u003e\u003c/script\u003e'\npostAds = \"\"\nprofileAds = '\u003cdiv class=\"bg-white shadow\"\u003e\u003cimg class=\" object-cover w-auto mx-auto mt-6\" src=\"https://blog-1251237404.cos.ap-guangzhou.myqcloud.com/20190424153337.png\" alt=\"微信打赏\"\u003e\u003c/div\u003e'\nnotFoundAds = ''\n\n# 开启版权声明，协议名字和链接都可以换\n[params.cc]\nname = \"署名 - 非商业性使用 4.0 国际 (CC BY-NC 4.0)\"\nlink = \"https://creativecommons.org/licenses/by-nc/4.0/deed.zh\"\n\n# 文章打赏\n[params.reward]\nenable = true\ntitle = \"打赏\"\nwechat = \"https://blog-1251237404.cos.ap-guangzhou.myqcloud.com/20190424153510.png\" # 微信二维码\nalipay = \"https://blog-1251237404.cos.ap-guangzhou.myqcloud.com/20190424153431.png\" # 支付宝二维码\n\n############## 评论系统  start ##############\n[params.gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment\nowner = \"\" # Your GitHub ID\nrepo = \"\" # The repo to store comments\nclientId = \"\" # Your client ID\nclientSecret = \"\" # Your client secret\n\n[params.utterances] # https://utteranc.es/\nowner = \"\" # Your GitHub ID\nrepo = \"\" # The repo to store comments\ntheme = \"github-light\"\nissueterm = \"pathname\"\n\n[params.gitalk] # Gitalk is a comment system based on GitHub issues. see https://github.com/gitalk/gitalk\nowner = \"\" # Your GitHub ID\nrepo = \"\" # The repo to store comments\nclientId = \"\" # Your client ID\nclientSecret = \"\" # Your client secret\n\n# Valine.\n# You can get your appid and appkey from https://leancloud.cn\n# more info please open https://valine.js.org\n[params.valine]\nenable = false\nappId = '你的 appId'\nappKey = '你的 appKey'\nnotify = false # mail notifier , https://github.com/xCss/Valine/wiki\nverify = false # Verification code\navatar = 'mm'\nplaceholder = '说点什么吧...'\nvisitor = false\n\n[params.giscus] # https://giscus.app\nrepo = \"forecho/hugo-blog\" # Repo where the comments will live\nrepo_id = \"\u003cdata-repo-id\u003e\" # Repo where the comments will live\ncategory = \"Announcements\" # Repo where the comments will live\ncategory_id = \"\u003cdata-category-id\u003e\" # Repo where the comments will live\nmapping = \"pathname\" # How Utterances will match comment to page\ntheme = \"light\" # What theme to use\nreactions_enabled = \"1\" # Enable reactions\nemit_metadata= \"0\" # Emit metadata\nlang = \"zh-CN\" # Language\n\n############ 评论系统  end ##############\n## 社交链接\n[social]\ngithub = \"forecho\"\njsfiddle = \"forecho\"\ncodepen = \"forecho\"\ndribbble = \"forecho\"\nbehance = \"forecho\"\nflickr = \"forecho\"\ninstagram = \"forecho\"\nyoutube = \"forecho\"\nvimeo = \"forecho\"\nvine = \"forecho\"\nmedium = \"forecho\"\nwordpress = \"forecho\"\ntumblr = \"forecho\"\nlinkedin = \"forecho\"\nslideshare = \"forecho\"\nstackoverflow = \"forecho\"\nreddit = \"forecho\"\npinterest = \"forecho\"\nweibo = \"forecho\"\nfacebook = \"forecho\"\ntwitter = \"caizhenghai\"\ndouban = \"ipzone\"\nrss = \"/atom.xml\"\n```\n\n启动 hugo server：\n\n```bash\nhugo server -D\n```\n\n打开 http://localhost:1313/ ，你将会看到一个示例网站。\n\n\n\n### 开始你的博客\n\n默认配置文件 `config.toml` 位于你的网站的根目录，请按自身需要进行定制。\n\n默认的文章文件位于 `./content/posts` 目录。\n\n\n### 生成你的网站\n\n直接运行 `hugo` ，将会自动生成你的网站到 `public/` 目录。\n\n如果你有额外的时间，并且想更多的了解 [Hugo][] ，请查阅官方文档 [Hugo Official Docs][] 。\n\n\n## 单篇文章的设置\n\n**Front Matter** : Hugo 允许你使用 yaml，toml 或者 json 语法在你每一篇文章的开头进行设置。\n\n**YAML 示例：**\n\n```yaml\n---\n# 常用定义\ntitle: \"An Example Post\"           # 标题\ndate: 2018-01-01T16:01:23+08:00    # 创建时间\nlastmod: 2018-01-02T16:01:23+08:00 # 最后修改时间\ndraft: false                       # 是否是草稿？\ntags: [\"tag-1\", \"tag-2\", \"tag-3\", \"popular\"]  # 标签\ncategories: [\"index\"]              # 分类\nauthor: \"forecho\"                  # 作者\n\n# 用户自定义\n# 你可以选择 关闭 (false) 或者 打开 (true) 以下选项\ncomment: false   # 关闭评论\ntoc: false       # 关闭文章目录\nreward: false\t # 关闭打赏\n---\n```\n\n## 关于热门文章\n\n如果标签里面含有 `popular` 就会自动出现再热门文章列表中，目前热门文章只会在侧边栏和 404 页面展示，热门文章列表最多展示 5 篇文章。\n\n## 配合 Github Actions 自动部署\n\n```yaml\nname: github pages\n\nname: \"Close stale issues\"\non:\n  schedule:\n    - cron: '0 0 * * *'  # every day at midnight\n  push:\n    branches:\n      - master\n\njobs:\n  deploy:\n    runs-on: ubuntu-18.04\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          submodules: true  # Fetch Hugo themes (true OR recursive)\n          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod\n\n      - name: Setup Hugo\n        uses: peaceiris/actions-hugo@v2\n        with:\n          hugo-version: '0.82.0'\n          extended: true\n\n      - name: Setup Node\n        uses: actions/setup-node@v2\n        with:\n          node-version: '12.x'\n\n      - name: Cache dependencies\n        uses: actions/cache@v1\n        with:\n          path: ~/.npm\n          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}\n          restore-keys: |\n            ${{ runner.os }}-node-\n\n      - run: npm i\n      - run: hugo --minify\n\n      - name: Deploy\n        uses: peaceiris/actions-gh-pages@v3\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n          cname: blog.forecho.com\n          publish_dir: ./public\n          user_name: \"github-actions[bot]\"\n          user_email: \"github-actions[bot]@users.noreply.github.com\"\n\n      - name: Slack Workflow Notification\n        uses: Gamesight/slack-workflow-status@master\n        with:\n          repo_token: ${{secrets.GITHUB_TOKEN}}\n          slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}\n```\n\n## 那年今天\n\n效果如下：\n\n![](https://blog-1251237404.cos.ap-guangzhou.myqcloud.com/20210401gI6nFN.png)\n\n配合 GitHub Action 每天定时编译一起使用，效果最佳。\n\n## 感谢\n\n本主题参考了以下主题的部分代码：\n\n- [hugo-theme-even](https://github.com/olOwOlo/hugo-theme-even)\n- [hugo-theme-jane](https://github.com/xianmin/hugo-theme-jane)\n\n## License\n\nHugo-theme-echo is licensed under the MIT license. Check the [LICENSE](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforecho%2Fhugo-theme-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforecho%2Fhugo-theme-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforecho%2Fhugo-theme-echo/lists"}