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

Help getting custom pages to work #338

Closed nkh closed 11 months ago

nkh commented 11 months ago

I'm trying to add a custom page without success. This is most probably me not understanding what to do.

I get the custom pages location with the --show-paths option, create the directory

I tried to add a page, say nadim.md, in the above directory, in it's sub directory .../pages, in it's sub directory ...pages/common.

I ran tldr -u every time

the nadim page is not available in any of those cases.

I did the same for an existing page, perl.md, same non-results

Is this still supported? what would be the exact procedure to succeed with it ?

niklasmohrin commented 11 months ago

Hey, it looks like your file ending is wrong, we look for files ending in ".page" and ".patch" (see https://dbrgn.github.io/tealdeer/usage_custom_pages.html). We are thinking about allowing something like ".page.md" in the future though (#320)

(updating the cache is not needed and has no impact on your custom pages)

nkh commented 11 months ago

Thank you,

it's so ... illogical

but I missed it, the decision is illogical but the blindness is mine

zedseven commented 11 months ago

@nkh, if you need/prefer a .md extension, I still have my branch for the referenced PR open—you can build it from source, and it will use .page.md and .patch.md instead of the current extensions.

https://github.com/zedseven/tealdeer/tree/custom-pages-md

nkh commented 11 months ago

@zedseven

Thanks a lot but I ended up writing my own client after playing a bit with the tldr concept.

I still appreciate the help I got in this project and the software itself.