dbrgn / tealdeer

A very fast implementation of tldr in Rust.
https://dbrgn.github.io/tealdeer/
Apache License 2.0
4.06k stars 123 forks source link

Can't find Custom pages #364

Closed canh25xp closed 4 months ago

canh25xp commented 4 months ago

I'm follow this instruction to create my own personal pages. But it didn't seem to work.

Step to reproduce :

  1. Install it
    sudo apt install tealdeer
  2. Find Custom pages dir : tldr --show-paths
    Config dir:       /home/michael/.config/tealdeer/ (OS convention)
    Config path:      /home/michael/.config/tealdeer/config.toml
    Cache dir:        /home/michael/.cache/tealdeer/ (OS convention)
    Pages dir:        /home/michael/.cache/tealdeer/tldr-pages/
    Custom pages dir: /home/michael/.local/share/tealdeer/pages/
  3. Add my customs pages:
    /home/michael/.local/share/tealdeer/pages
    └── foo.page.md

    Content of foo.page.md:

    
    # foo

Foo

foo --bar

4. Try it: `tldr foo`

Warning: Page foo not found in cache. Try updating with tldr --update, or submit a pull request to: https://github.com/tldr-pages/tldr



I tried update the cache by `tldr --update`. But it still didn't work. Am I missing something ?

tealdeer version : `1.5.0`
OS : WSL Debian
niklasmohrin commented 4 months ago

Hey, the docs are already displaying an upcoming change to the naming scheme of custom pages that has not been released yet. For 1.5.0, the correct description is here: https://github.com/dbrgn/tealdeer/blob/v1.5.0/docs/src/usage_custom_pages.md

Closing as duplicate of #358

brainwo commented 2 months ago

This issue should be pinned, I came with the same question after minutes of debugging what could possibly be wrong in my setup.

If not this issue then #358, but #358's title isn't that descriptive.

niklasmohrin commented 2 months ago

Sure, I guess this could help in the meantime