Skip to content

求和! 李姐万岁! 这是一个GitBook布局,锤子便签配色风格的WordPress主题

Notifications You must be signed in to change notification settings

zhaoolee/gitbook-for-wordpress

Repository files navigation

《求和!李姐万岁! GitBook For WordPress》

GitBook For WordPress

求和! 李姐万岁! 这是一个GitBook布局,锤子便签风格的WordPress主题~

image

示例网站

方圆小站 https://fangyuanxiaozhan.com

如果你像zhaoolee一样不想写富文本,只想用Markdown,可以使用zhaoolee的另一个开源项目 用Hexo的方式管理WordPress(使用Github Actions自动更新文章到WordPress):https://github.com/zhaoolee/WordPressXMLRPCTools

为什么要开发这个主题?

zhaoolee喜欢用锤子便签分享内容, 但在社交平台经常分享不出去, 于是zhaoolee建立了方圆小站, 为了让读者有类似锤子便签的良好阅读体验,这个主题便诞生了。

zhaoolee很喜欢GitBook的布局,左侧目录,右侧文章内容,非常适合阅读!

本主题所有PHP逻辑由ChatGPT4编写(每月20刀的订阅还是挺值的)

主要功能

无需像GitBook一样定制目录, 侧边栏按时间倒序显示已发布文章

目录

侧边栏自动将当前文章滚动到侧边栏顶部

image

支持按照专题过滤文章列表

支持宽窄屏自适应

1679811878976jke7xdWQ

支持锤子便签风格的评论

image

支持搜索

1679812197742NJW5ZNBE

底部预留备案号位置,支持自定义,不填就不显示

支持显示后台菜单

支持小部件

支持自定义部件

  • 来自一言的《经典台词》
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<h2>经典台词</h2>
<div id="yiyan_hitokoto"></div>
<div id="yiyan_from" style="text-align: right">
</div>
<script>
        jQuery.ajax({url:'https://v1.hitokoto.cn/'}).done(function(content,err){
        console.log("content::", content, "err::", err);
        if(err === "success"){
            var yiyan_hitokoto = "";
            var yiyan_from= "";
            console.log("content22::", content, "err::", err);
            yiyan_hitokoto = content.hitokoto;
            yiyan_from ="--" + content.from;
            console.log("=yiyan_hitokoto=>>", yiyan_hitokoto);
            console.log("=yiyan_from=>>", yiyan_from);
            jQuery("#yiyan_hitokoto").html(yiyan_hitokoto);
            jQuery("#yiyan_from").html(yiyan_from);
        }
    })
</script>
  • 显示当前页面二维码
<h2>当前网址二维码</h2>
<div id="qrcode"></div>
<script src="https://v2fy.com/cdn/qrcodejs/qrcode.min.js"></script>
<script type="text/javascript">
    var qrcode = new QRCode(document.getElementById("qrcode"), {
        text: window.location.href,
        width: 256,
        height: 256,
        colorDark : "#000000",
        colorLight : "#ffffff",
        correctLevel : QRCode.CorrectLevel.H
    });
</script>

WordPress免费插件推荐列表

插件名称 功能简介 下载页面
POST VIEWS COUNTER 查看文章阅读量 http://www.dfactory.eu/plugins/post-views-counter/
WP Super Cache 对WordPress页面进行静态页缓存,但会让一些依赖PHP后端渲染的功能无法实时生效,比如更新主题后,需要手动删除WP Super Cache缓存才能看到效果 https://wordpress.org/plugins/wp-super-cache/
instant.page 用户鼠标滑到超链接时, 预加载网页, 提升页面打开速度 https://wordpress.org/plugins/instant-page/

开发小技巧:将开发的主题,软连接到WordPress Theme目录

ln -s ~/github/gitbook-for-wordpress /Applications/MAMP/htdocs/fangyuanxiaozhan/wp-content/themes/

《求和!李姐万岁! GitBook For WordPress》开发者随想录(zhaoolee)

求和!李姐万岁!用ChatGPT写GitBook布局锤子便签配色的WordPress主题

GitBook锤子便签风格WordPress主题的专题设计思考

About

求和! 李姐万岁! 这是一个GitBook布局,锤子便签配色风格的WordPress主题

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published