GithubHelp home page GithubHelp logo

isabella232 / potter-docsgen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gardener/potter-docsgen

0.0 0.0 0.0 14.06 MB

License: Other

JavaScript 85.59% Python 0.25% CSS 2.58% HTML 7.98% SCSS 3.60%

potter-docsgen's Introduction

Potter Docs Generator

This repository contains the build tools, configuration, web framework, etc. for the generating the Potter docs. For site source content including documentation, see the /docs directory in the /gardener/potter-hub and /gardener/potter-controller repos. The repository of the generated website is /gardener/potter-docs. It is served via GitHub Pages.

Dev Setup

Prerequisites

  • Python 3.8
  • Hugo (should be installed in the same version as in the CI/CD container, see the website build script for the correct version)

Step 1

Clone all involved GitHub repositories to your local machine. Export the repo root directories via the corresponding environment variables.

$ git clone https://github.com/gardener/potter-hub
$ git clone https://github.com/gardener/potter-controller
$ git clone https://github.com/gardener/potter-docs
$ git clone https://github.com/gardener/potter-docsgen

export SOURCE_PATH="<path-to-potter-docsgen-repo>"
export POTTER_HUB_PATH="<path-to-potter-hub-repo>"
export POTTER_CONTROLLER_PATH="<path-to-potter-controller-repo>"
export POTTER_DOCS_PATH="<path-to-potter-docs-repo>"

Step 2

Create a Python virtual environment in the .ci directory and activate it. Then install the Python package gardener-cicd-libs via pip.

$ cd <path-to-potter-docsgen-repo>/.ci
$ virtualenv -p <path-to-python-3.8> env
$ source env/bin/activate
$ pip install gardener-cicd-libs

Depending on whether you want to work on the actual CI script or want to run the website with local changes, perform the actions described in the following sections.

Running the website with local changes

When you want to run the website with local changes in the potter-hub or potter-controller repos, you should run the website build script via the following command:

./build_website.py --skip-build-and-commit=True --include-current-version-only=True

This will copy the /docs directories from the local potter-hub and potter-controller repos into <potter-docsgen-repo-path>/hugo/content and generate some metadata for Hugo. It will only include the current version of the docs directories on your filesystem.

Now execute the following commands:

cd $SOURCE_PATH/hugo
hugo serve

This will startup a local HTTP server which Hugo uses to serve the website.

When perfoming changes in the /docs folder of the local potter-hub and potter-controller repos, you must rerun the website build script in order to sync the changes into the /hugo/content directory.

Sometimes it might also be necessary to stop hugo serve, manually delete the /docs directories from /hugo/content, rerun the website build script, and restart hugo serve.

Working on the website build script

When you want to work on the website build script, you should run the website build script via the following command:

./build_website.py

This will build the website, write the build output to the $POTTER_DOCS_PATH repo, and actually commit all changes to the repo. You therefore shouldn't push the $POTTER_DOCS_PATH repo to origin.

potter-docsgen's People

Contributors

gardener-robot avatar guewa avatar jschicktanz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.