• Stars
    star
    193
  • Rank 200,424 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A plugin to hide specific posts from your Hexo blog and make them only accessible by links. (隐藏 Hexo 文章)

hexo-hide-posts

npm-version hexo-version

中文文档

A plugin to hide specific posts from your Hexo blog and make them only accessible by links.

Hide means your posts will not come up in article lists (homepage, archive, category, tag, feed, sitemap, whatever), or search results either (by telling search engines not to index these pages with a "noindex" meta tag). Only those who know the link can view the post, and you can share the link with anyone.

This means that posts marked as hidden could still be seen by anyone, but only if they guess the link.

Installation

$ npm install hexo-hide-posts --save

Usage

Add hidden: true to the front-matter of posts which you want to hide.

e.g. Edit source/_posts/lorem-ipsum.md:

---
title: 'Lorem Ipsum'
date: '2019/8/10 11:45:14'
hidden: true
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

This post will not be shown anywhere, but you can still access it by https://hexo.test/lorem-ipsum/. (If you want to completely prevent a post from rendering, just set it as a draft.)

To get a list of hidden posts, you can run hexo hidden:list from command line.

For developers, all_posts and hidden_posts added to Local Variables may be useful.

Config

In your site's _config.yml:

# hexo-hide-posts
hide_posts:
  enable: true
  # Change the filter name to fit your need
  filter: hidden
  # Generators which you want to expose all posts (include hidden ones) to.
  # Common generators: index, tag, category, archive, sitemap, feed, etc.
  public_generators: []
  # Add "noindex" meta tag to prevent hidden posts from being indexed by search engines
  noindex: true

e.g. Set filter to secret, so you can use secret: true in front-matter instead.

Note: although most of generator plugins respect a naming convention that they register generator with the name in their package names, the generator name could be arbitrary. For example, hexo-generator-searchdb does not register generators with name searchdb, but xml and json. For accurate generator name, you should check their source code.

License

MIT

More Repositories

1

twitter-web-exporter

Export tweets, bookmarks, lists and much more from Twitter(X) web app. (推文/书签/收藏/列表导出工具)
TypeScript
789
star
2

live-stream-recorder

Monitor and record live streams from YouTube, OPENREC, TwitCasting, etc. Made for VTuber fans. (VTuber 直播自动录像脚本)
Shell
348
star
3

blessing-skin-server

[OUTDATED, see @bs-community] A web application brings your custom skins back in offline Minecraft servers. (第三方 Minecraft 皮肤站)
PHP
296
star
4

export-twitter-following-list

Export your Twitter/X's following/followers list like a breeze. (关注列表与关注者列表导出工具)
JavaScript
71
star
5

node-tikzjax

A port of TikZJax runs on pure Node.js and WebAssembly.
JavaScript
70
star
6

hexo-theme-murasaki

Yet another minimalist theme for Hexo. (EARLY DEV STAGE)
Stylus
54
star
7

blog-friend-circle

Show latest posts from your subscribed blogs as a more attractive friends page. (博客友链朋友圈)
TypeScript
33
star
8

prinsss.github.io

Everything about my blog.
JavaScript
26
star
9

twitcasting-recorder

Just another Python implementation of TwitCasting live stream recorder. (TC 录像脚本 / 録画ツール)
Python
21
star
10

just-pnpm

Force the pnpm package manager to be used on a project.
JavaScript
10
star
11

google-analytics-hit-counter

Page views counter that pulls data from Google Analytics API.
TypeScript
9
star
12

hexo-view-counter

Hexo post views counter 访问计数器(阅读次数,热门文章 etc.)。
PHP
8
star
13

rx-direct-share

Greenify prescription to disable the Direct Share feature on Android 6+.
8
star
14

hexo-filter-tikzjax

Server side PGF/TikZ renderer plugin for Hexo. (TikZ 绘图渲染插件)
TypeScript
7
star
15

ghost-hit-counter

Page view counter for Ghost blog
PHP
4
star
16

react-native-pencilkit-example

Try to use Apple PencilKit in React Native.
TypeScript
3
star
17

ble-light-switch

遥控“关灯神器”微信小程序的 Android 实现,基于蓝牙 BLE。
1
star