Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Hexo encrypted post TOC fix

Fixes your Hexo theme so password-protected posts get a working contents list without leaking headings.

Claude's review

8/10 Thorough, self-contained fix for Hexo encrypted-post TOC leaks with a builder script, a leak checker and per-theme notes.

We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.

In detail

Patches any Hexo theme so its table of contents works with hexo-blog-encrypt without leaking encrypted headings. Use when a theme shows an empty, hidden, or plaintext TOC on password-protected posts, when installing hexo-blog-encrypt on a theme with a TOC, or when asked to "fix TOC for encrypted posts". Do NOT use for themes with no TOC, or for changing the encryption plugin itself.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: hexo-encrypt-toc
description: Patches any Hexo theme so its table of contents works with hexo-blog-encrypt without leaking encrypted headings. Use when a theme shows an empty, hidden, or plaintext TOC on password-protected posts, when installing hexo-blog-encrypt on a theme with a TOC, or when asked to "fix TOC for encrypted posts". Do NOT use for themes with no TOC, or for changing the encryption plugin itself.
---

# Encrypted-post TOC for any Hexo theme

hexo-blog-encrypt replaces `page.content` with ciphertext in an
`after_post_render` filter, sets `page.encrypt = true`, and keeps the plaintext
in `page.origin`. After the reader decrypts, it swaps in the post as
`#hexo-blog-encrypt.hbe-decrypted-content` and dispatches `hexo-blog-decrypt`
on `window`.

That breaks theme TOCs in one of three ways:

| Symptom | Cause | Risk |
| --- | --- | --- |
| TOC empty or missing | `toc(page.content)` sees ciphertext | Cosmetic |
| TOC visible on the locked page | `toc(page.origin)` rendered | **Plaintext headings published** |
| TOC hidden, appears after decrypt | `toc(page.origin)` with `display:none` | **Plaintext headings published** (view source) |

The goal is always the same: **no encrypted heading in the generated HTML, and
a working TOC after decryption.** This procedure works for any theme; the
per-theme notes in [Per-theme examples](#per-theme-examples) are examples, not a
whitelist. Everything the procedure needs is in this one file: the builder
script is [Appendix A](#appendix-a-hbe-tocjs) and the leak checker is
[Appendix B](#appendix-b-check-toc-leakjs).

## 1. Locate the TOC

Run from the Hexo site root. Include theme packages installed from npm.

```bash
THEME=$(sed -n 's/^theme:[[:space:]]*//p' _config.yml | tr -d "\"'")
grep -rnE "toc\(|\.origin|encrypt|tocbot|hexo-blog-decrypt|hbe|password" \
  "themes/$THEME" "node_modules/hexo-theme-$THEME" 2>/dev/null \
  | grep -v -E "/(node_modules|source/lib|vendor)/" | head -80
```

Also search component packages the theme depends on (for example Icarus
...

From D0n9X1n's repository, MIT licence.

Related skills

  • Checked

    Medium publishing

    Publishes finished articles to Medium correctly, with canonical links so your own site keeps the SEO credit.

    by ericrisco 691
    7/101 credit
  • Checked

    Article opening hooks

    Writes openings and titles for blog posts, newsletters and essays in English or French, so readers keep going.

    by samber 359
    7/101 credit
  • Checked

    AI citable press releases

    Revises press releases and articles, keeping facts intact, so AI answer engines can quote and cite them.

    by elvisun 1.7k
    7/101 credit
  • Checked

    SEO and AI Answer Cleanup

    Strips AI filler from blog posts and pages and puts the answer first, so Google and ChatGPT can quote you.

    by Illyism 2.3k
    7/101 credit
  • Checked

    Content Strategy Planner

    Builds a 90 day content plan from real customer evidence and your team's hours, with clear measures of success.

    by TerminalSkills 221
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added