Files for the Bitcoin peildatum site.
Collects data from the exchange API's or uses already existing data if no data came back from the API.
Needs python 3, which can be installed via pyenv.
- Install dependencies
pip install -r requirements.txt
- Collect new data
python collect.py
To generate the html and assets Jekyll is used. This can generate the static html based on the OHLC yaml files. When the page is hosted on Github Pages, this is done automatically.
The docs
dir contains the website source because this is the only allowed subdirectoty that GitHub pages can build from, according to the documentation.
To build the page you need ruby. This can be installed with rbenv.
Install and prepare a specific ruby version, install the bundler gem to manage dependencies and install the dependencies.
rbenv install 2.7.2
gem install bundler
bundle install
For Debian-like systems install as root (or use sudo):
apt install ruby2.7 ruby2.7-dev
gem install bundler jekyll
Switch to or login as the user, set the .gem path and run bundle install:
bundle config set --local path /home/username/.gem
bundle install
When developing, start the Jekyll server that will auto rebuild and reload the page upon changes.
bundle exec jekyll serve --livereload --source ./docs
The page can now be accessed at http://127.0.0.1:4000.
When not using GitHub pages to host the website, the site needs to be build (on the server) when there are changes.
Building for production will generate the html once and write all files in the _site
dir which then needs to be serverd by apache/nginx/etc.
bundle exec jekyll build --source ./docs