Skip to content
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

Pull in latest topics from discourse #1133

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Pull in latest topics from discourse #1133

wants to merge 2 commits into from

Conversation

sudara
Copy link
Owner

@sudara sudara commented Jun 28, 2021

[insert @ofsound magic here]

We can pull in the latest topics and style with discourse's embedded css: https://forum.alonetone.com/admin/customize/themes/1/common/embedded_scss/edit

Supporting both themes might be awkward? Not sure it's going to be possible to get that info through the iframe without some js...

@sudara
Copy link
Owner Author

sudara commented Jun 29, 2021

just seems like we’d be fighting every single bit of the iFrame, from fonts, to dynamic media queries, to white/theme dark theme

If we don't go the iframe way, options are:

  1. Parse json client-side every request, ala
    https://meta.discourse.org/t/embed-latest-post-teasers-into-your-website/82388

  2. Parse json server side in rails, create and cache a partial

  3. Setup a ruby cron to create json from the html, stick it in memcached with a key for Rails to read later

@sudara
Copy link
Owner Author

sudara commented Jun 29, 2021

Option 1 could be accomplished by issuing an ajax request on a stimulus controller initialize, storing the result in a member variable, moving the footer template to js and rendering the template in connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant