ghost博客自帶得all private或者some posts設為members only,但我想有啲posts用密碼睇(唔想搞訂閲members),所以就自己摷資料整!
1)首先新增一個要密碼嘅post嘅對應tag,呢度設為hash-private(感覺上用internal好過public tag)
2)修改setting中lab嘅rounts文件,新增/private/路徑處理tag咗hash-private嘅post:
routes:
collections:
/private/:
permalink: /private/{slug}/
filter: tag:hash-private
template: index
/:
permalink: /{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
3)修改nginx配置,新增驗證:
呢邊因為係用docker搭建ghost,所以需要反向代理。同時因為開放p
評論留言区