yosymfony / spress-theme-spresso
v2.1.1
2017-06-17 17:29 UTC
Requires
- spress/spress-installer: ~2.1
Replaces
- yosymfony/spress-theme-spresso: v2.1.1
This package is not auto-updated.
Last update: 2022-02-01 12:29:56 UTC
README
Spresso 是一个基于 Bootstrap 3 的简单主题,适用于 Spress,内容组织在一个中央列。
特性
- 响应式设计:支持移动设备和平板电脑。
- 在您的帖子中使用 Disqus 评论。
- 支持 Twitter Cards 和 Facebook Open Graph。
- 顶部和底部菜单。
- 页脚中的社交网络链接。
- 支持 Google 和 Bing 网站验证。
- 使用 Highlight.js 突出显示代码片段。
- 由 Fort Awesome 提供的图标字体。
- 网站地图和 RSS 源。
安装
您可以根据此主题创建一个站点,或者将其作为现有站点的主题进行安装。
要求
- Spress >= 2.2.0
基于此主题创建新站点
执行以下命令,Spresso 主题将被安装在 mysite
文件夹中
$ spress new:site mysite spress/spress-theme-spresso
作为现有站点的主题进行安装
转到您的站点文件夹,并输入以下命令
$ spress add:plugin spress/spress-theme-spresso
然后,将以下行添加到您站点的 config.yml
文件中
themes: name: spress/spress-theme-spresso
更新主题
您可以通过运行以下命令获取 Spresso 主题的最新版本
$ spress update:plugin
使用主题
此主题支持 Spress 主题。此功能从版本 2.2.0 开始提供。
菜单
Spresso 主题支持顶部和底部菜单。要配置,您可以编辑 config.yml
中的 top_menu
和 bottom_menu
选项。
top_menu: - { name: Home, url: / } - { name: About, url: /about } # To generate a absolute URL using site.url value: - { name: Docs, url: /docs, site_url: true} bottom_menu: - { name: Your link, url: https://your-url }
评论
评论功能由 Disqus 提供支持。此功能需要一个 disqus短名。要获取它,您需要在提供服务的地方创建一个账户。这是免费的。您可以在这里了解更多关于Disqus短名的信息。
要启用评论,请编辑您网站的 config.yml
文件。将 enabled
选项设置为 true
并设置您的disqus短名。
# Comments in posts comments: enabled: false disqus_shortname: ""
禁用文章中的评论
如果您想在文章中发布没有评论的内容,请将文章的Front-matter中的comments
变量设置为false
。
--- comments: false --- The content of my post.
许可证
本主题根据MIT许可证提供为开源。