Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow static generation #49

Open
meshy opened this issue Jul 12, 2022 · 1 comment
Open

Allow static generation #49

meshy opened this issue Jul 12, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@meshy
Copy link
Owner

meshy commented Jul 12, 2022

The output of this project is one HTML file and one JS file. It would be valuable to be able to make a static export, so that people can embed them in their docs without needing to run a Django server.

@meshy meshy added the enhancement New feature or request label Jul 12, 2022
@meshy
Copy link
Owner Author

meshy commented Aug 24, 2022

As an interim solution, I've found this to work:

#!/bin/bash
set -e

cd src
# The trailing & on the command below detaches it from this script so it runs in the background.
python manage.py runserver 8888 --noreload &
# The $! is used to get the ID of the process in the last command.
# See: https://stackoverflow.com/a/17389526/400691
# We use this at the end of the script to kill the Django service.
DJPID=$!

wget \
    -e robots=off \
    --directory-prefix ../schema-graphs \
    --recursive \
    --convert-links \
    --no-host-directories \
    --adjust-extension \
    --retry-connrefused \
    http://127.0.0.1:8888/schema/
kill $DJPID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant