Skip to content

albumentations-team/albumentations.ai

Repository files navigation

Static site generator for albumentations.ai

Prerequisites

To run the site locally, you also need to download the required data from the GitHub API. To do that, you need to generate a personal access token.

Getting Started

  1. Clone the repository.
  2. Install the git hook scripts for pre-commit: pre-commit install.
  3. If you need to work with the main site, fetch required data from GitHub API: GITHUB_TOKEN=<PERSONAL_ACCESS_TOKEN> make fetch-data, e.g. GITHUB_TOKEN=123a make fetch-data. If you need to work only with documentation, you can skip that step.
  4. Start development servers both for the main site and for the documentation: make dev. You can also start only the development server for documentation by running make mkdocs-dev.
  5. Open http://localhost:3000 in your browser to see the current version of the main site.
  6. Open http://localhost:8000 in your browser to see the current version of the documentation.
  7. When you change templates or static assets, the browser will reload all changed pages.

Directory structure

  • browser_sync - Files for a Docker service that automatically reloads changes pages in the browser.
  • builder - Files for a Docker service that builds the static site from templates, static assets, and JSON files with data.
  • mkdocs - Files for a Docker service that uses MkDocs to build the documentation.
  • data - A directory with JSON files that contain data for building the site.
  • html - A directory with Jinja2 templates and static assets.

To update site

It may happen that we add / remove files in the Albumentations repository

To update the site, you need to update [mkdocs/src]

After that run

make