Is there a way to build for local testing vs production deployment? #3670
-
Currently, if I want to do some local work (tweaking the theme, experimenting with a plugin, etc.) I have to change a bunch of conf.py settings and then remember to change them back before the next deploy. I was hoping to find a way to override specific settings with environment vars or at least be able to point to a different conf.py on the command line, but I'm not finding anything like that. How are other people managing their developer vs production contexts? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
I would recommend keeping your site in a Git repository. That way, you can easily experiment and then revert the commit or undo uncommitted changes. |
Beta Was this translation helpful? Give feedback.
-
You could have two config files, one for testing and one for production, and select the one to use with the |
Beta Was this translation helpful? Give feedback.
-
D'oh! I've been using the handbook extensively but I assumed `nikola
--help` was complete so never thought to look in the book for more options.
My bad.
And now that I read up on it, I see that we can use minimal alternate
configs that only override specific variables from our normal conf, which
completely solves my hope to do that with environment variables.
I love it when I discover that a new tool is even more robust than I
thought. Thanks again.
|
Beta Was this translation helpful? Give feedback.
You could have two config files, one for testing and one for production, and select the one to use with the
--conf=
parameter.