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

Rename Preview Site to View Site #88

Open
DavidGeismarLtd opened this issue Oct 18, 2024 · 2 comments
Open

Rename Preview Site to View Site #88

DavidGeismarLtd opened this issue Oct 18, 2024 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@DavidGeismarLtd
Copy link

Preview site should actually be "View site" because it is not really a preview.
Also you should be redirecting to the production url and not the preview one ex: /maglev/summer-snow-2751/preview/en/riseup

@code-bunny
Copy link

I would actually like it to be a preview on a separate path.

Currently Maglev serves all pages from the PagePreviewController which has no caching and the like.

Keeping this as is but then actually serving the saved page from a new PageController that has caching, maybe even the ability to configure page caching with some kind of configurable cache sweeper where you can make a API request to expire the CDN cache on update.

Our NextJS+Strapi apps usually have this kind of setup as it means the CDN is basically just shipping out static files. Or even just having the save action cause the page to be written to the public folder (configurable per page as some pages will have dynamic content.)

@did did added the question Further information is requested label Jan 9, 2025
@did
Copy link
Contributor

did commented Jan 9, 2025

The "Preview" button / feature needs some work because it confuses developers.

We should have 2 different rendering controllers :

  • PagePreviewController -> called when clicking on the "Preview" button. Strictly no cache.
  • PageController -> the real rendering controller. Caching enabled and configured through the maglev.rb configuration file? (or use the default values from the main Rails app).

Last point, here is the screenshot of the topbar from a product based on Maglev which creates a static version of a Maglev site and publishes it to Github pages 👇

Screenshot 2025-01-09 at 2 22 24 PM

@did did added good first issue Good for newcomers enhancement New feature or request and removed good first issue Good for newcomers labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants