Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harvard-lil/lil-blog-generator
A protected form for generating Jekyll-ready LIL blog posts
https://github.com/harvard-lil/lil-blog-generator
Last synced: about 2 months ago
JSON representation
A protected form for generating Jekyll-ready LIL blog posts
- Host: GitHub
- URL: https://github.com/harvard-lil/lil-blog-generator
- Owner: harvard-lil
- Created: 2017-06-12T17:39:23.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-28T13:22:42.000Z (about 2 months ago)
- Last Synced: 2024-10-28T16:57:11.399Z (about 2 months ago)
- Language: CSS
- Homepage:
- Size: 884 KB
- Stars: 1
- Watchers: 11
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lil-blog-generator
This app makes it easier to write [blog posts for the LIL website](https://github.com/harvard-lil/website-static#writing-blog-posts-docker-not-required).
Write your post using the WYSIWYG editor, then click the download button. You'll get a markdown file that you can upload straight to Github, following the on-screen instructions.
## Running locally
1. [Install Poetry](https://python-poetry.org/docs/#installation) and install requirements:
```
poetry install
```2. Configure local settings:
```
echo "FLASK_SECRET_KEY=adjkahflashfjdlsahfjahlsdfa" >> .flaskenv
echo "FLASK_DEBUG=1" >> .flaskenv
```### (Recommended)
To bypass login locally:
```
echo "BYPASS_LOGIN=True" >> .flaskenv
```3. Run the Flask development server
```
poetry run flask run
```For deployment, if you make changes to `poetry.lock`, e.g. with `poetry add `, export the conventional requirements file:
```
poetry export -o requirements.txt
```## Authentication via Github
In production, this app authenticates via Github. Configuration can be found in the "Developer Settings > OAuth Apps" section of the LIL Github organization; the application looks for corresponding [`GITHUB_*` env vars](https://github.com/harvard-lil/lil-blog-generator/blob/develop/app.py#L19-L21).
You can partially test the integration locally: does the redirect occur? Does the auth flow work as expected on the Github side?
But, after successfully authenticating, Github cannot, of course, hand things back to localhost.
So unless specifically working on authentication, you will likely want to [disable login locally](#recommended).