-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update of the documentation to prepare for the old website to be offl…
…ine.
- Loading branch information
1 parent
2708159
commit 636e113
Showing
3 changed files
with
96 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Local development | ||
|
||
## Building the website (the static HTML based version) and the internal API | ||
|
||
The code to build the website on https://www.ghostery.com/whotracksme is not public; | ||
but for local testing, you can still use the code for the [previous version](https://web.archive.org/web/20240501140903/https://whotracks.me/). | ||
|
||
Python 3.11 is needed to build the site (Python 3.12 is currently not supported): | ||
|
||
```sh | ||
python3.11 -m venv venv | ||
. venv/bin/activate | ||
pip -r requirements-dev.txt | ||
pip install -e '.[dev]' | ||
``` | ||
|
||
If you have not done so, make sure that you have downloaded data (see [Data Readme](../whotracksme/data/Readme.md)). | ||
|
||
``` | ||
whotracksme website | ||
``` | ||
|
||
It will generate static HTML files in the `_site` directory. Plus, it will also create a JSON files | ||
in the `_site/api/` directory. Use them at your own risk, since the format is expected to change over | ||
time. If there is interest to stabilize the API files, let us know. Currently, it is only used internally | ||
within Ghostery to power the new website. | ||
|
||
> Hint: if you debug the website generator, the parallel execution can be | ||
> disabled by setting the environment variable DEBUG=1. | ||
## Tests | ||
|
||
To run the unit tests: | ||
|
||
```sh | ||
python3.11 -m venv venv | ||
. venv/bin/activate | ||
python -m pip install -e '.[dev]' | ||
pytest | ||
``` |
Oops, something went wrong.