Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prestashop/contextual-help-api
https://github.com/prestashop/contextual-help-api
prestashop
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/prestashop/contextual-help-api
- Owner: PrestaShop
- License: mit
- Created: 2021-07-22T12:50:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-10T17:24:02.000Z (3 months ago)
- Last Synced: 2024-10-07T10:58:37.549Z (3 months ago)
- Topics: prestashop
- Language: PHP
- Homepage:
- Size: 684 KB
- Stars: 0
- Watchers: 21
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# contextual-help-api
## About
This webapp is in charge of providing the documentation that is displayed in PrestaShop's back-office.
That's the application behind https://help.prestashop-project.org/### How it works?
When a request is made to this app, the returned documentation is taken from the user documentation's Github repository,
parsed, and converted to either plain HTML or json-encoded HTML.Which content from which repository to be taken is related to the request path and/or parameters that indicates PrestaShop's version,
language and back-office page the documentation is needed for.There's basically 2 ways you can make request to this app:
- https://this.app/api/?request=getHelp%3D**page_controller**%26version%3D**prestashop_version**%26language%3D**lang_iso_code**%26callback%3D**jsonp_callback**
- https://this.app/**lang_iso_code**/doc/**page_controller**/?version=**prestashop_version**In the first case, the part after `?request=` is actually urlencoded. By using this way, a jsonp response containing the HTML documentation will be returned.
In the second case, the documentation is returned as plain HTML.
### Configurations
The repositories where the documentation is taken from are defined in `config/mapping_urls.yml`.
The markdown files to be used are defined in `config/mapping_v{prestashop_version}`.### Markown + Liquid tags
As the markdown available in the user documentation repositories is made through Gitbook, there's some parts that are not classic markdown.
Those specials features are more or less [liquid tags](https://jekyllrb.com/docs/liquid/tags/) and a special Markdown parsing/rendering extension has been
made to handle them (`src/Markdown/Node/Liquid.php`, `src/Markdown/Parser/Block/LiquidBlock*` and `src/Markdown/Renderer/*`).## Requirement
PHP >= 8.0.7
## How to run it
### Locally
```shell
$ composer install
$ php -S localhost:8080 -t public/
```## Deployment
See the documentation in the `.cloud` folder