0

用 VitePress 重写 Douban Book+ 主页

 1 year ago
source link: https://old-panda.com/2023/08/27/revamp-douban-book-plus-homepage-using-vitepress/?amp%3Butm_medium=rss&%3Butm_campaign=revamp-douban-book-plus-homepage-using-vitepress
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

用 VitePress 重写 Douban Book+ 主页

douban-book-plus-homepage.png?resize=760%2C380&ssl=1

新地址: https://douban-book-plus-homepage.pages.dev/

项目已开源: https://github.com/OldPanda/douban-book-plus-homepage

虽然之前已经用 Bootstrap 库为 Douban Book+ 插件写了一个简单的 HTML 页面,放在了这个博客域名下 https://old-panda.com/douban-book-plus.html ,但总觉得还是比较草台班子。最近了解到了 VitePress 这个项目,就决定趁这个周末重新造一个。

在重写的过程中,由于 VitePress 自带默认主题无法完全满足我的需求,同时也因为自身前端知识储备不足,因此在页面的设计编写上花费了不少工夫,比如自定义字体,首页布局的内容扩展,甚至寻找好看的 SVG 图案等等,写这篇文章的主要目的是记录这些过程和结果,便于以后查找。

比较花力气的活

项目部署在了 Cloudflare Pages 上,主要是图一个方便省心。

最后一点儿辞旧迎新的工作是把旧的页面自动跳转到新的主页上,这通过一行 HTML 很容易做到,

<meta http-equiv="Refresh" content="0; url='https://douban-book-plus-homepage.pages.dev'" />

具体可以参考这里

Categories: 前端

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK