-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: tup 706 conditionally serve raw markup #872
Open
wesleyboar
wants to merge
46
commits into
main
Choose a base branch
from
feat/tup-706-serve-raw-blog-content-conditionally
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: tup 706 conditionally serve raw markup #872
wesleyboar
wants to merge
46
commits into
main
from
feat/tup-706-serve-raw-blog-content-conditionally
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOT WORKING! Fails with: > NoReverseMatch at /feed/ > '' is not a registered namespace
Fails, because it renders nothing.
Load `/blog/remote`. BREAKING CHANGE: Changed `/blog` to `/blog/local`
⚠️ Does NOT render feed items.
This reverts commit 6bece39. This did not fix anything. `SESSION_COOKIE_SECURE=False` is still required locally.
Messy but functional!
- ✓ fix links to articles - ✓ fix pagination links
This app is fom a different branch.
This middleware is fom a different branch.
This setting is from another branch.
11 tasks
wesleyboar
added
feature
A new feature or replacement of present feature
effort XS
Extra small effort task (~¼ a week) — does not include review time
labels
Sep 13, 2024
wesleyboar
changed the title
feat: tup 706 serve raw content conditionally
feat: tup 706 conditionally serve raw markup
Sep 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Goal: Render TACC News outside of TACC (when we should not just link the user).
Feature: Allow client to load raw page content markup (no header, no footer).
Use Case? Load news pages of one website (e.g. TACC) on other websites (e.g. LCCF, WeTeach CS). By having raw markup available at a URL, another website can load and inject that markup on its own page, thus borrowing news articles and lists rather than duplicating them.
Proof of Concept? In #868, I create and run an app that injects remote content. (I am still thinking how/when best to run the app.)
Bonus: Allow dev to render a page with any Core template (or one of their own).
Use Case? Test new templates for future custom CMS features without editing Core.
How to Use One of Their Own? Add (or override) a template into
taccsite_cms/templates
via Dockerfile, as is done in some Core-CMS-Custom projects (apcd_cms, ecep_cms) and TUP (tup-cms).Related
Changes
Testing
In
custom_app_settings.py
, add new middleware toCUSTOM_MIDDLEWARE
e.g.Load pages with recognized query parameters.
?raw
template=raw.html
Verify page loads with
raw.html
template.Load pages with ineffectual query parameters.
?rawng
template=raw
template=raw
Verify page loads with template that the page would normally use.