首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Hugo Theme: CleanWhite

Hugo Theme: CleanWhite

作者头像
赵化冰
发布于 2022-08-01 02:35:26
发布于 2022-08-01 02:35:26
4510
举报

Clean White Theme for Hugo

CleanWhite is a clean, elegant, but fully functional blog theme for Hugo. Here is a live demo site using this theme.

It is based on huxblog Jekyll Theme and Clean Blog Jekyll Theme.

These two upstream projects have done awesome jobs to create a blog theme, what I’m doing here is porting it to Hugo, of which I like the simplicity and the much faster compiling speed. Some other features which I think could be useful, such as site search with algolia and proxy for Disqus access in China, have also been built in the CleanWhite theme. Other fancy features of upstream projects are not supported by this Hugo theme, I’d like to make it as simple as possible and only focus on blog purpose, at least for now. While I created this theme, I followed the Hugo theme best practice and tried to make every part of the template as a replaceable partial html, so it could be much easier for you to make your customization based on it.

Screenshots

Home

Post

Search

Disqus

Wechat Pay & Alipay

Mind Map

Bilibili Video

Quick Start

The simplest way is to start with the example site coming with this theme, then you can play around and add your own stuff.

代码语言:javascript
AI代码解释
复制
$ mkdir test
$ cd test
$ mkdir themes
$ cd themes
$ git clone https://github.com/zhaohuabing/hugo-theme-cleanwhite.git
$ cp -r hugo-theme-cleanwhite/exampleSite/** ../
$ cd ..
$ hugo serve

If your site is already a git project, you may want to choose to add the cleanwhite theme as a submodule to avoid messing up your existing git repository.

代码语言:javascript
AI代码解释
复制
$ mkdir themes
$ git submodule add https://github.com/zhaohuabing/hugo-theme-cleanwhite.git themes/hugo-theme-cleanwhite

Run Hugo Build-in Server Locally

代码语言:javascript
AI代码解释
复制
$ hugo serve -t  hugo-theme-cleanwhite

Now enter localhost:1313 in the address bar of your browser.

If you start from scratch, there is a working Hugo site configured with the CleanWhite theme in the exampleSite directory. You can use it as a starting point for your site.

For more information read the official setup guide of Hugo

Configuration

First, let’s take a look at the config.toml. It will be useful to learn how to customize your site. Feel free to play around with the settings.

Comments

The optional comments system is powered by Disqus. If you want to enable comments, create an account in Disqus and write down your shortname.

代码语言:javascript
AI代码解释
复制
disqusShortname = "your-disqus-short-name"

You can disable the comments system by leaving the disqusShortname empty.

Disqus in China

Disqus is inaccessible in China. To get it to work, we can set up a proxy with disqus-php-api in a host which sets between the client browser and the Disqus server. The idea is that if Disqus can be reached in the guest network, the blog page will show the original Disqus comments UI, otherwise, it will downgrade and use the proxy to access the Disqus, the UI will be a little different, but the visitors can still write their comments on the page.

The client side java script has already been integrated to CleanWhite them, but you need to set up a proxy server yourself.

The proxy is written in php, which can be found here: https://github.com/zhaohuabing/disqus-php-api/tree/master/api

You need to specify your Disqus account information in the config.php.

代码语言:javascript
AI代码解释
复制
define('PUBLIC_KEY', '');
define('SECRET_KEY', '');
define('DISQUS_USERNAME', '');
define('DISQUS_EMAIL', '');
define('DISQUS_PASSWORD', '');
define('DISQUS_WEBSITE', '');
define('DISQUS_SHORTNAME', '');

Set the proxy server address in the site config file of your Hugo project.

代码语言:javascript
AI代码解释
复制
disqus_proxy = "http://yourdisqusproxy.com"

Site Search with Algolia

Follow this tutorial to create your index in Algolia. The index is just the storage of the indexing data of your site in the the cloud . The search page of CleanWhite theme will utilize this indexing data to do the search.

Go to the directory where you have your Hugo site and run the following commands:

代码语言:javascript
AI代码解释
复制
$ npm init
$ npm install atomic-algolia --save

Next, open up the newly created package.json, where we’ll add an NPM script to update your index at Algolia. Find “scripts”, and add the following:

代码语言:javascript
AI代码解释
复制
"algolia": "atomic-algolia"

Algolia index output format has already been supported by the CleanWhite theme, so you can just build your site, then you’ll find a file called algolia.json in your public directory, which we can use to update your index in Algolia. Generate index file:

代码语言:javascript
AI代码解释
复制
$ hugo

Create a new file in the root of your Hugo project called .env, and add the following contents:

代码语言:javascript
AI代码解释
复制
ALGOLIA_APP_ID={{ YOUR_APP_ID }}
ALGOLIA_ADMIN_KEY={{ YOUR_ADMIN_KEY }}
ALGOLIA_INDEX_NAME={{ YOUR_INDEX_NAME }}
ALGOLIA_INDEX_FILE={{ PATH/TO/algolia.json }}

Make sure double curly braces be replaced together.

Now you can push your index to Algolia by simply running:

代码语言:javascript
AI代码解释
复制
$ npm run algolia

Add the following variables to your hugo site config so the search page can get access to algolia index data in the cloud:

代码语言:javascript
AI代码解释
复制
algolia_search = true
algolia_appId = {{ YOUR_APP_ID }}
algolia_indexName = {{ YOUR_INDEX_NAME }}
algolia_apiKey = {{ YOUR_ADMIN_KEY }}

Open search page in your browser: http://localhost:1313/search

Analytics

You can optionally enable Google or Baidu Analytics. Type your tracking code in the

代码语言:javascript
AI代码解释
复制
googleAnalytics = "UA-XXXXX-X"
ba_track_id  = "XXXXXXXXXXXXXXXX"

Leave the googleAnalytics or ‘ba_track_id ' key empty to disable it.

Wechat Pay & Alipay Rewards

You can enable Wechat Pay & Alipay to allow readers send you money. So if they like your articles, you may even get rewards from your writing. Now you must be motivated to write more.

  • Enable Wechat Pay & Alipay in the site config
代码语言:javascript
AI代码解释
复制
reward = true
  • Replace the QR codes of Wechat Pay & Alipay by overriding the photos in folder /static/img/reward/, otherwise the money will be sent to my accounts!
  • Enable Wechat Pay & Alipay in the site config
代码语言:javascript
AI代码解释
复制
reward = true

Mind Map

Mind Map is supported with shortcode ‘mind’, instering the following code snippet into your markdown file can create a mind map showing in the screenshots.

代码语言:javascript
AI代码解释
复制
{{% mind %}}
- Root
    - Level 1
        - Level 2
        - Level 2
            - Level 3
            - Level 3
                - Level 4
                    - Level 5
                        - Level 6
    - Level 1
        - Level 2
        - Level 2
     - Level 1
        - Level 2
        - Level 2
     - Level 1
        - Level 2
        - Level 2
     - Level 1
        - Level 2
        - Level 2
{{% /mind %}}

Embedded Videos

Use the below hugo shortcodes to embed videos into your posts.

Bilibili (B站)

代码语言:javascript
AI代码解释
复制
{{< bilibili BV1kZ4y137gv >}}

Youtube

代码语言:javascript
AI代码解释
复制
{{< youtube cllc1ZGlhsQ >}}

Vimeo

代码语言:javascript
AI代码解释
复制
{{< vimeo 146022717 >}}

Thanks

Thanks for the great jobs of huxblog Jekyll Theme and Clean Blog Jekyll Theme which are the the two upstream projects CleanWhite Hugo theme is based on.

Feedback

If you find any problems, please feel free to raise an issue or create a pull request to fix it.

If it’s helpful for you, I would appreciate it if you could star this repository, thanks!


本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
最强AI芯片英伟达H200深夜发布,Llama2-70B推理提速90%,2024年二季度发货
英伟达在 2023 年全球超算大会(SC2023)上发布了目前世界上最强的 AI 芯片 H200。
机器之心
2023/11/15
5730
最强AI芯片英伟达H200深夜发布,Llama2-70B推理提速90%,2024年二季度发货
老黄深夜炸场,世界最强AI芯片H200震撼发布!性能飙升90%,Llama 2推理速度翻倍,大批超算中心来袭
不仅如此,这两款芯片还是互相兼容的。这意味着,使用H100训练/推理模型的企业,可以无缝更换成最新的H200。
新智元
2023/11/14
5060
老黄深夜炸场,世界最强AI芯片H200震撼发布!性能飙升90%,Llama 2推理速度翻倍,大批超算中心来袭
最强AI芯片英伟达H200发布:HBM容量提升76%,大模型性能提升90%!
11月14日消息,英伟达(Nvidia)于当地时间13日上午在 “Supercomputing 23”会议上正式发布了全新的H200 GPU,以及更新后的GH200 产品线。
芯智讯
2023/11/16
1.2K0
最强AI芯片英伟达H200发布:HBM容量提升76%,大模型性能提升90%!
碾压H100!英伟达GH200超级芯片首秀MLPerf v3.1,性能跃升17%
刚刚,MLCommons发布了MLPerf v3.1版本更新,并加入了两个全新基准:LLM推理测试MLPerf Inference v3.1,以及存储性能测试MLPerf Storage v0.5。
新智元
2023/09/19
4180
碾压H100!英伟达GH200超级芯片首秀MLPerf v3.1,性能跃升17%
算力之战,英伟达再度释放AI“炸弹”
近日,在计算机图形学顶会SIGGRAPH 2023现场,英伟达再度释放深夜“炸弹”,大模型专用芯片迎来升级版本。
科技云报道
2023/08/18
2510
算力之战,英伟达再度释放AI“炸弹”
最强大模型训练芯片H200发布!141G大内存,AI推理最高提升90%,还兼容H100
作为首款搭载HBM3e内存的GPU,内存带宽也从3.35TB/s提升至4.8TB/s,提升43%。
量子位
2023/11/15
1.3K0
最强大模型训练芯片H200发布!141G大内存,AI推理最高提升90%,还兼容H100
对于英伟达的 GH200 ,你可能有些误解 !
NVIDIA GH200 可能是目前市面上最容易被误解的产品之一。同时在阅读相关文章后,我们认识到,对于 NVIDIA 推出的这款极具创新性的产品,可能还需要给大家提供一个基础性的介绍。
通往ICT之路
2024/09/14
5100
对于英伟达的 GH200 ,你可能有些误解 !
英伟达生成式AI超级芯片GH200,两倍H100算力,黄仁勋:它会疯狂推理
当地时间 8 月 8 日,英伟达 CEO 黄仁勋在计算机图形学顶会 SIGGRAPH 2023 上发布了专为生成式 AI 打造的下一代 GH200 Grace Hopper 平台,并推出了 OVX 服务器、AI Workbench 等一系列重磅更新。
机器之心
2023/09/08
6070
英伟达生成式AI超级芯片GH200,两倍H100算力,黄仁勋:它会疯狂推理
英伟达DGX SuperPOD超级计算解决方案
DGX SuperPOD是英伟达推出的一种高度集成的超级计算解决方案,旨在为企业和研究机构提供高性能的人工智能计算能力。这种解决方案允许用户快速构建和部署大规模的GPU集群,以应对复杂的AI和机器学习挑战。
用户7353950
2024/11/23
6740
英伟达DGX SuperPOD超级计算解决方案
英伟达推出最强AI芯片:首发HMB3e,大模型运行能力提升3.5倍!
早在今年5月29日,AI芯片大厂英伟达(NVIDIA) CEO黄仁勋就在COMPUTEX 2023展前发布会上,正式发布了升级版的GH200 Grace Hopper超级芯片,旨在助力开发面向生成式AI语言应用、推荐系统和数据分析工作负载的巨型、下一代模型。
芯智讯
2023/09/07
5020
英伟达推出最强AI芯片:首发HMB3e,大模型运行能力提升3.5倍!
英伟达吞噬世界!新架构超级GPU问世,AI算力一步提升30倍
「这不是演唱会。你们是来参加开发者大会的!」老黄出场时,现场爆发出了巨大的欢呼声。
机器之心
2024/03/19
4350
英伟达吞噬世界!新架构超级GPU问世,AI算力一步提升30倍
全新“核弹”!英伟达B200发布:2080亿个晶体管,FP4算力高达40PFlops!
当地时间3月18日,人工智能(AI)芯片龙头厂商英伟达在美国加州圣何塞召开了GTC2024大会,正式发布了面向下一代数据中心和人工智能应用的“核弹”——基于Blackwell架构的B200 GPU,将在计算能力上实现巨大的代际飞跃,预计将在今年晚些时候正式出货。同时,英伟达还带来了Grace Blackwell GB200超级芯片等。
芯智讯
2024/03/19
4K0
全新“核弹”!英伟达B200发布:2080亿个晶体管,FP4算力高达40PFlops!
老黄携「超级GPU」炸场!E级AI超算性能飞升,买越多越划算,谷歌微软Meta抢先试用
随后,便祭出大杀器——「超级GPU」 GH200,并宣布谷歌云、Meta和微软将率先获得GH200。
AiCharm
2023/06/07
6290
老黄携「超级GPU」炸场!E级AI超算性能飞升,买越多越划算,谷歌微软Meta抢先试用
老黄发布最强AIGC芯片!内存容量暴增近50%,可运行任意大模型,“生成式AI的iPhone时刻已来”
在计算机图形学顶会SIGGRAPH上,老黄宣布了英伟达最新的超级芯片NVIDIA DGX GH200 Grace Hopper。
量子位
2023/09/08
4450
老黄发布最强AIGC芯片!内存容量暴增近50%,可运行任意大模型,“生成式AI的iPhone时刻已来”
英伟达B200打破摩尔定律!老黄顺便公开GPT-4的秘密
时隔两年,英伟达官宣新一代Blackwell架构,为AI带来30倍推理加速。定位直指“新工业革命的引擎” 。
量子位
2024/03/20
2690
英伟达B200打破摩尔定律!老黄顺便公开GPT-4的秘密
老黄狂拼CPU!英伟达掏出800亿晶体管显卡,外加世界最快AI超算Eos
---- 新智元报道   编辑:编辑部 【新智元导读】「拼装」CPU,4纳米显卡,世界最快AI超算,还有游戏开发者的元宇宙。这次,老黄的百宝箱里都有啥? 今天,老黄穿着他的皮衣又来了! 3月22日晚,英伟达GTC 2022开幕。 虽然没有了那个熟悉的厨房,但这次的阵仗反而更加豪华。 英伟达用Omniverse把新总部从内到外渲染了一遍! 800亿个晶体管的Hopper H100 随着拔地而起的平台,英伟达推出了为超算设计的最新AI显卡Hopper H100。 相比于「只有」540亿个晶体管的前辈A
新智元
2022/03/24
9400
【AI系统】GPU 架构回顾(从2018年-2024年)
2018 年 Turing 图灵架构发布,采用 TSMC 12 nm 工艺,总共 18.6 亿个晶体管。在 PC 游戏、专业图形应用程序和深度学习推理方面,效率和性能都取得了重大进步。相比上一代 Volta 架构主要更新了 Tensor Core(专门为执行张量/矩阵操作而设计的专门执行单元,深度学习计算核心)、CUDA 和 CuDNN 库的不断改进,更好地应用于深度学习推理。RT Core(Ray Tracing Core)提供实时的光线跟踪渲染,包括具有物理上精确的投影、反射和折射,更逼真的渲染物体和环境。支持 GDDR6 内存,与 GDDR5 内存相比,拥有 14 Gbps 传输速率,实现了 20%的的效率提升。NVLink2.0 支持 100 GB/s 双向带宽,使特定的工作负载能够有效地跨两个 GPU 进行分割并共享内存。
用户11307734
2024/11/27
7070
给英伟达1.6万亿个晶体管,它就能承托全球互联网流量
大数据文摘授权转载自AI科技评论 作者:包永刚 英伟达(Nvidia)一年一度的GTC大会如期而至,两年一更新的GPU架构Hopper也正式亮相。 今年,NVIDIA创始人兼CEO黄仁勋在英伟达新总部大楼发布了一系列新品,从新架构GPU H100,到Grace CPU 超级芯片,再到汽车、边缘计算的硬件新品,以及全面的软件更新。 英伟达的全新发布再次向外界宣告,英伟达不止是一家芯片公司,而是全栈计算公司。他们正在加强其在AI、汽车等领域的领导力,同时也在努力占领下一波AI浪潮以及元宇宙的先机。 当然,作为一
大数据文摘
2022/03/24
5510
囤 H100 的都成了大冤种!英伟达发布最新 AI 芯片 H200:性能提升 2 倍,成本下降 50%
周一,半导体行业巨头英伟达发布了新一代人工智能芯片 H200,旨在为各种 AI 模型提供训练和部署支持。
深度学习与Python
2023/11/18
4910
囤 H100 的都成了大冤种!英伟达发布最新 AI 芯片 H200:性能提升 2 倍,成本下降 50%
英伟达B200成本约6000美元,售价或高达4万美元!
3月20日消息,据CNBC报道,英伟达(Nvidia)CEO黄仁勋在接受其采访时表示,英伟达计划以 3 万至 4 万美元的价格出售用于 AI 和 HPC 工作负载的全新Blackwell GPU B200。不过,这只是一个大概的价格,因为英伟达更倾向于销售面向数据中心的整体解决方案,而不仅仅是芯片或加速卡本身。与此同时,Raymond James 分析师认为英伟达 B200 芯片的硬件成本约为 6,000 美元。
芯智讯
2024/03/26
6820
英伟达B200成本约6000美元,售价或高达4万美元!
推荐阅读
最强AI芯片英伟达H200深夜发布,Llama2-70B推理提速90%,2024年二季度发货
5730
老黄深夜炸场,世界最强AI芯片H200震撼发布!性能飙升90%,Llama 2推理速度翻倍,大批超算中心来袭
5060
最强AI芯片英伟达H200发布:HBM容量提升76%,大模型性能提升90%!
1.2K0
碾压H100!英伟达GH200超级芯片首秀MLPerf v3.1,性能跃升17%
4180
算力之战,英伟达再度释放AI“炸弹”
2510
最强大模型训练芯片H200发布!141G大内存,AI推理最高提升90%,还兼容H100
1.3K0
对于英伟达的 GH200 ,你可能有些误解 !
5100
英伟达生成式AI超级芯片GH200,两倍H100算力,黄仁勋:它会疯狂推理
6070
英伟达DGX SuperPOD超级计算解决方案
6740
英伟达推出最强AI芯片:首发HMB3e,大模型运行能力提升3.5倍!
5020
英伟达吞噬世界!新架构超级GPU问世,AI算力一步提升30倍
4350
全新“核弹”!英伟达B200发布:2080亿个晶体管,FP4算力高达40PFlops!
4K0
老黄携「超级GPU」炸场!E级AI超算性能飞升,买越多越划算,谷歌微软Meta抢先试用
6290
老黄发布最强AIGC芯片!内存容量暴增近50%,可运行任意大模型,“生成式AI的iPhone时刻已来”
4450
英伟达B200打破摩尔定律!老黄顺便公开GPT-4的秘密
2690
老黄狂拼CPU!英伟达掏出800亿晶体管显卡,外加世界最快AI超算Eos
9400
【AI系统】GPU 架构回顾(从2018年-2024年)
7070
给英伟达1.6万亿个晶体管,它就能承托全球互联网流量
5510
囤 H100 的都成了大冤种!英伟达发布最新 AI 芯片 H200:性能提升 2 倍,成本下降 50%
4910
英伟达B200成本约6000美元,售价或高达4万美元!
6820
相关推荐
最强AI芯片英伟达H200深夜发布,Llama2-70B推理提速90%,2024年二季度发货
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
首页
学习
活动
专区
圈层
工具
MCP广场
首页
学习
活动
专区
圈层
工具
MCP广场