joeyespo / grip

Preview GitHub README.md files locally before committing them.
MIT License
6.5k stars 424 forks source link

Pull Request to add theme support to local http renderer #397

Open bazlsi01 opened 2 weeks ago

bazlsi01 commented 2 weeks ago

So I wanted to make grip render on localhost, using the github-dark theme. It seems @parajita largely did this work on https://github.com/joeyespo/grip/pull/335, however, that only applies when using the renderer in CLI mode.

I made a change to the settings.py and README.md to add THEME to settings.py and added code to app.py to look that up, and if set to pass the value to self.theme as if it had been passed on the CLI.

https://github.com/joeyespo/grip/pull/396

bazlsi01 commented 2 weeks ago

I should point out, I tested it running with THEME='dark' in ~/.grip/settings.py and without any value in settings.py and it seems to work ok. I've not added any tests, as I'm not sure how to do that (this is a trivial change).