Commit graph

10 commits

Author SHA1 Message Date
Alexandre Flament 27f8fa6fe0
Merge pull request #1048 from Linerly/patch-1
Improve the about page
2022-04-09 20:30:49 +02:00
Markus Heiser 9215281232 [mod] replace Markdown parser mistletoe by markdown-it-py
There are several reasons why we should prefer markdown-it-py over mistletoe:

- Get identical rendering results in SearXNG's `/info` pages and the SearXNG's
  project documentation which is build by Sphinx-doc.

  In the Sphinx-doc we use the MyST parser to render Markdown and the MyST
  parser itself is built on top of the markdown-it-py package.

- markdown-it-py has a typographer that supports *replacements*
  and *smartquotes* (e.g. em-dash, copyright, ellipsis, ...) [1]

- markdown-it-py is much more flexible compared to mistletoe [2]

- markdown-it-py is the fastest CommonMark compliant parser in python [3]

[1] https://markdown-it-py.readthedocs.io/en/latest/using.html#typographic-components
[2] https://markdown-it-py.readthedocs.io/en/latest/plugins.html
[3] https://markdown-it-py.readthedocs.io/en/latest/other.html#performance

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 15:49:50 +02:00
Linerly 22309f398b
Fix spelling and punctuation 2022-04-06 12:36:17 +00:00
Markus Heiser 19ebd0e1ac [mod] review of the "Search Syntax" page (en)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 14:13:22 +02:00
Markus Heiser 655db9b003 [mod] review of the "About SearXNG" page (en)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06 13:05:20 +02:00
Linerly 036b46493b
Improve the about page 2022-04-02 20:51:11 +00:00
Alexandre Flament dbe3eaabc9 Info: code refactoring & bug fixes 2022-03-16 22:26:36 +01:00
Alexandre Flament 1157462ff9 Various change on PR 930 2022-03-13 22:22:02 +01:00
Markus Heiser 59100e8525 [fix] add module for backward compatibility
cache_property has been added in py3.8 [1]

To support cache_property in py3.7 the implementation from 3.8 has been
copied to compat.py.  This code can be cleanup with EOL of py3.7.

[1] https://docs.python.org/3/library/functools.html#functools.cached_property

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12 15:45:28 +01:00
Markus Heiser b1912607ae [mod] replace /help by /info pages and include pages in project docs
This patch implements a bolierplate to share content from info-pages of the
SearXNG instance (URL /info) with the project documentation (path /docs/user).

The info pages are using Markdown (CommonMark), to include them in the project
documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain.

If base_url is known (defined in settings.yml) links to the instance are also
inserted into the project documentation::

    searxng_extra/docs_prebuild

[1] https://www.sphinx-doc.org/en/master/usage/markdown.html

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12 11:36:31 +01:00