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

Static version of the PerlDancer website (using Wallflower) #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

book
Copy link

@book book commented Nov 8, 2012

Wallflower makes it possible to generate a static website from any Plack application.

A static website has however some different requirements than a dynamic website (e.g. content-type is usually determined by the webserver using the extension), so a small rewrite was necessary.

To generate the site, install App::Wallflower (https://metacpan.org/release/App-Wallflower), possibly read the tutorial (https://metacpan.org/module/Wallflower::Tutorial), and then simply run:

wallflower -a bin/app.pl -d <destination>

You'll then have a bunch of static files that can be installed anywhere with a web server.
Add a cronjob to regenerate the files and update the site at the frequency you want, and you're done!

Note that the only page I didn't test is the dancefloor.html page, because I didn't have some of the requirements.

@szabgab
Copy link
Contributor

szabgab commented Dec 16, 2014

I understand that in some cases having a static site is useful, but I am not sure why should the main PerlDancer website be static. Am I misunderstanding something in your pull-request?

@bigpresh
Copy link
Member

For one thing, the site uses dynamic parts for e.g. fetching thumbnails for the dancefloor page, etc - and it'd be nice to add even more dynamic stuff in future - so I'd prefer to see it continue to be a Dancer app seved up. It's also a showcase of Dancer serving up a live app, along with lots of other examples in the wild :)

@book
Copy link
Author

book commented Dec 16, 2014

I'm not overly attached to this, it was a showcase for Wallflower. I now have http://cpan.io/ filling that role. ;-)

The idea behind it is that:

  • static sites are more secure and less CPU intensive
  • most dynamic stuff can be achieved with JavaScript (do the thumbnails really have to be generated on demand? IIRC they are cached, so a cronjob would do just fine for updating the cache)
  • this site is still fully generated by a Dancer app, so it's still a pretty good Dancer showcase

@atoomic
Copy link

atoomic commented Apr 4, 2022

It could be nice to use Wallflower to generate a static version of the site.
Using a GitHub workflow we could then use GitHub pages to host the static version of the website generated on demand / commits / PR...

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

4 participants