From 7b5b0cd7f74fd99d6e3906531abe8bc6592fb571 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Fri, 9 Dec 2022 15:44:16 +0400 Subject: [PATCH] Documented the /skin endpoint --- docs/kiwix-serve.rst | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/kiwix-serve.rst b/docs/kiwix-serve.rst index 129c324..99ad84b 100644 --- a/docs/kiwix-serve.rst +++ b/docs/kiwix-serve.rst @@ -141,6 +141,8 @@ options, respectively. HTTP API endpoints presented below are relative to that location, i.e. ``/foo/bar`` must be actually accessed as ``http://ADDR:PORT/ROOT/foo/bar``. +.. _welcome-page: + ``/`` ----- @@ -276,7 +278,26 @@ Blablabla ``/skin`` ----------- -Blablabla +Static front-end resources (such as CSS, javascript and images) are all grouped +under ``/skin``. + +**Usage:** + ``/skin/PATH/TO/RESOURCE[?cacheid=CACHEID]`` + +`Cache busting +`_ of +static resources is supported via the optional param ``cacheid``. By default, +i.e. when the ``cacheid`` parameter is not specified while accessing the +``/skin`` endpoint, static resources are served as if they were dynamic (i.e. +could be different for an immediately repeated request). Specifying the +``cacheid`` parameter with a correct value (matching the value embedded in the +``kiwix-serve`` instance), makes the returned resource to be presented as +immutable. However, if the value of the ``cacheid`` parameter mismatches then +``kiwix-serve`` responds with a 404 HTTP error. + +``kiwix-serve``'s default front-end (the :ref:`welcome page ` and +the :ref:`ZIM file viewer `) access all underlying static +resources by using explicit ``cacheid`` s. ``/suggest`` @@ -285,6 +306,8 @@ Blablabla Blablabla +.. _zim-file-viewer: + ``/viewer`` -----------