- Add function to replace relative image paths with absolute paths
- Add docs on static content and adding shortcuts to the config file
- Add url and view for rendering static image data
This modernization occurs on the fly over potentially-cached S3 files. This
means, the legacy doc pages are fetched and cached just like any other S3
static content, and the modernization happens when the page is requested. This
way, we can safely render modern parts of the pages (like the header) and
account for dynamic state such as logged in users.
The resulting docs (also called FrankenDocs :-)) are processed using
BeautifulSoup and a fairly simple heuristic that can be found in the
`core/htmlhelper.py` module.
- Add RenderedContent model and related helper methods
- Change StaticContentView `get()` logic to try the cache, then the db, then S3
- Change StaticContentView to update db appropriately
- Refactoring for readability/maintainability
- Make web service depend on redis
- Add function to extract body from html content
- In view, extract body before returning converted ascciidoc in response
Realized we have a conflict in settings names between S3 hosted
static content and S3 hosted uploaded media content. Prefixing
static content with `STATIC_CONTENT_`
- We don't need to be setting DEFAULT_FILE_STORAGE after static changes
- Need to be able to correctly pass binary files (images, etc) so need
to avoid converting to UTF-8 after retrieving from S3
- Moved to simpler CBV
Includes these failing tests:
```
=============================== short test summary info ================================
FAILED core/tests/test_renderer.py::test_get_s3_keys - AssertionError: assert '/site/develop/tools/auto_index/index.html' in []
FAILED core/tests/test_views.py::test_static_content_template_view[/site/develop/rst.css] - django.http.response.Http404: Page not found
```
* Stubbed out TemplateView for rendering markdown files
* Added a BoostRenderer class to parse the markdown files to support the first iteration of a youtube shortcode and also a Pygments renderer for code blocks.
* Added default styles for some common markup so the rendered markdown looks better.
The pygments renderer is set to use Solarized Dark right now because that’s the closest I see that matches the design of the site. This can be changed in the class.