使用Nikola改造我的项目页面

A week ago, I was inspired to produce a new projects page for myself. The previous one was a trainwreck with a lot of hacks. Also hosted on GitHub Pages for some reason.

一周前,我受到启发为自己制作了一个新的项目页面 。 上一个是一个有很多骇人听闻的火车残骸。 由于某种原因也托管在GitHub Pages上。

So, considering I’m so invested in Nikola already, I produced the projectpages plugin and also made it publicly available. The plugin produces two files, projects/index.html and projects/projects.json, and also enforces a specific framework for the stories used for the individual projects, because all the metadata are taken from special meta fields.

因此,考虑到我已经对Nikola进行了如此大量的投资,我制作了projectpages插件并将其公开发布。 该插件产生两个文件,即projects / index.htmlprojects / projects.json ,并且还为用于各个项目的故事实施了一个特定的框架,因为所有元数据均来自特殊的元字段。

In Nikola, post metadata is completely arbitrary (in fact, that’s my fault; I contributed the feature back in February 2013). You can put anything you want, and Nikola will let any plugin and template use the information in any way it likes.

在Nikola中,发布元数据完全是任意的(实际上,这是我的错;我在2013年2月提供了该功能 )。 您可以随意放置任何内容,Nikola将允许任何插件和模板以其喜欢的任何方式使用信息。

And that is basically the gist of the projectpages plugin. Using some specific meta fields, the plugin produces all the files. It also provides ready-made templates for the story pages (though the default templates are designed to fit my site only).

这基本上就是projectpages插件的要旨。 使用某些特定的meta字段 ,插件将生成所有文件。 它还为故事页面提供了现成的模板(尽管默认模板仅设计为适合我的网站)。

This plugin is basically a special index page generator. It takes all the stories in the designated projects directory, looks at the metadata, and lists them in a nice format (slider of featured projects + a list of everything else that is not hidden). Everything automated and done for you, as is always with Nikola — which values simplicity and ease of use.

这个插件基本上是一个特殊的索引页面生成器。 它将所有故事放在指定的项目目录中,查看元数据,并以一种不错的格式列出它们(特色项目的滑块+所有未隐藏的所有内容的列表)。 与Nikola一样,一切工作都是自动完成并为您完成的,它重视简单性和易用性。

The result: a pretty projects page. And some good OSS work done.

结果:一个漂亮的项目页面 。 并完成了一些出色的OSS工作。

PS. I just underwent a move to DigitalOcean and I love them. Moreover, this blog is proudly HTTPS only as of yesterday.

PS。 我刚刚搬到DigitalOcean ,我爱他们。 此外,该博客自昨天起仅是HTTPS。

翻译自: https://www.pybloggers.com/2014/10/revamping-my-projects-page-with-nikola/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值