Files
tldr/Makefile
Leandro Ostera 21cb9ac9e1 feature: pages index.
By having an index for the pages, it'd allow clients
to build autocomplete's and show an index of pages
making only one request (think `tldr list`). Subsequent
caching of this file would prevent further requests.

Included is a makefile to easily rebuild the index.
It could be tailored in case the pages structure changed.

In a particular case, the web client would benefit greatly
from an index. It'd know exactly what folder a command is in
and thus the number of requests would drop from 4 to 1.
2015-03-02 15:21:27 -03:00

4 lines
143 B
Makefile

index:
ls -d1 ./pages/**/* | grep .md | awk -F"." '{print $$2}' | awk -F"/" '{print $$4,$$3}' | sort > pages/index.md
@echo "Index rebuilt."