章工运维 章工运维
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)

章工运维

业精于勤,荒于嬉
首页
  • linux
  • windows
  • 中间件
  • 监控
  • 网络
  • 存储
  • 安全
  • 防火墙
  • 数据库
  • 系统
  • docker
  • 运维工具
  • other
  • elk
  • K8S
  • ansible
  • Jenkins
  • GitLabCI_CD
  • 随笔
  • 面试
  • 工具
  • 收藏夹
  • Shell
  • python
  • golang
友链
  • 索引

    • 分类
    • 标签
    • 归档
    • 首页 (opens new window)
    • 关于我 (opens new window)
    • 图床 (opens new window)
    • 评论 (opens new window)
    • 导航栏 (opens new window)
周刊
GitHub (opens new window)
  • linux

  • windows

  • 中间件

  • 网络

  • 安全

  • 存储

  • 防火墙

  • 数据库

  • 系统

    • vmware

    • ftp

    • nexus

    • harbor

    • confluence&jira

    • loki

    • sonarqube

    • svn

    • other

    • openldap

    • influxdb

    • wordpress

    • kvm

    • argocd

    • jfrog

    • nextcloud

    • RustDesk

    • mail

    • ghost

      • linux服务器部署ghost
      • ghost后台tag页面可以展示pages文章
  • docker

  • other

  • 监控

  • 运维
  • 系统
  • ghost
章工运维
2024-12-30

ghost后台tag页面可以展示pages文章

# 新增tags页面

点击Tags->New tag,依次填写Name->Slug

e5e36d873f0f55ff.png

# 修改tag.hbs

执行vi /var/lib/ghost/content/themes/casper/tag.hbs

新增以下内容

        {{#foreach posts}}
            {{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
            {{> "post-card"}}
        {{/foreach}}                       


 <!-- 新增的内容    -->

            {{!-- .............................. --}}
        {{#get "pages" filter="tag:{{tag.slug}}" limit="all"}}
            {{#foreach pages}}                               
                {{> "post-card"}} <!-- ...... post-card .................. -->
            {{/foreach}}                       
        {{/get}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

去掉这个提醒A collection of zero posts

删除以下代码

{{else}}
    A collection of {{plural ../pagination.total empty='zero posts' singular='% post' plural='% posts'}}
1
2

# 将文章加到tags页面下

点击pages,右击文章选择Add a tag

738c598127e6491c.png

微信 支付宝
上次更新: 2024/12/30, 14:46:54

← linux服务器部署ghost Docker构建镜像→

最近更新
01
shell脚本模块集合
05-13
02
生活小技巧(认知版)
04-29
03
生活小技巧(防骗版)
04-29
更多文章>
Theme by Vdoing | Copyright © 2019-2025 | 点击查看十年之约 | 鄂ICP备2024072800号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式