J2Live is a web-based application that allows users to edit and render Jinja2 templates with YAML variables. It provides a user-friendly interface with Monaco Editor for editing and rendering templates in real-time.
- YAML Editor: Edit YAML variables.
- Jinja2 Editor: Edit Jinja2 templates.
- Output Editor: View the rendered output.
- Theme Selection: Switch between different themes (Everforest Dark, Nord).
- FastAPI Integration: Built on top of FastAPI for backend services.
- NiceGUI Integration: Utilizes NiceGUI for the frontend components.
-
Build the Docker image:
docker build -t j2live . -
Run the Docker container:
docker run -p 8000:8000 j2live
The above will pull directly from this repository to build the image. If you want to build from your fork, it's almost the same:
-
Build the Docker image:
docker build -t j2live --build-arg BUILD_MODE=local . -
Run the Docker container:
docker run -p 8000:8000 j2live
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate -
Clone the repository (as so static files are accessible)
git clone https://github.com/martydingo/j2live.git
-
Install J2Live:
pip3 install git+https://github.com/martydingo/j2live
-
Run J2Live:
python3 -m j2live
- Open your web browser and navigate to
http://localhost:8000. - Use the YAML Editor to input your YAML variables.
- Use the Jinja2 Editor to input your Jinja2 template.
- The rendered output will be displayed in the Output Editor in realtime.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License. See the LICENSE file for details.
- Martin George (marty@dingo.foo)
For more information, please refer to the documentation.