Comments (3)
Biggest blocker here is that the plugins do not have access to the Templer::Site
object. They have access to the Templer::Global
and the Templer::Site::Page
.
Two options here:
- Store the site object in the global config (quick-fix).
- Pass the site to the plugin(s) too.
Otherwise adding the pages should be simple if they can be mock-objects:
#!/usr/bin/perl -w
use strict;
use warnings;
my @pages = qw! one two three!;
my $updated = 0;
foreach my $page ( @pages )
{
print "Page: $page\n";
push( @pages, qw! four five six seven ! ) unless( $updated) ;
$updated += 1;
}
This sample demonstrates how I expect the main loop of Templer::Site
could be enhanced - just at the foot of each iteration look for the addition of a new hash-ref via Templer::Site::addPage
, or similar.
from templer.
I've not forgotten about this, and the changes to #11 mean that now we do pass round a Templer::Site
object.
This means we should be able to do everything we need.
from templer.
This has been resolved for some time now, but I'll leave it open until #31 is resolved.
That will give us the ability to create a plugin with two methods:
init
- Save away the
Templer::Site
object.
- Save away the
cleanup
- Use the site-object we saved, to generate extra/random output pages.
As it happens this is used exactly to generate my site-map file for https://steve.fi/.
from templer.
Related Issues (19)
- `templer --manual` is broken.
- As Bruno said the code structure is confusing at times.
- Variables not replaced with correct value HOT 7
- File inclusion should have a search path.
- The file-hash plugin is bogus.
- Need a straightforward installation process. HOT 9
- Undeclared dependency on Test::Exception
- .htaccess files are not processed HOT 3
- Installation from CPAN fails HOT 3
- Output filename should come from the page. HOT 1
- `make standalone` is broken.
- Update our plugin-handlers.
- Release signature invalid HOT 18
- Extending the file pattern example HOT 3
- FileGlob makes content available as `content`.
- Pod::Find dependency not listed HOT 2
- We shouldn't only run from the top-level directory. HOT 1
- When using include files we don't rebuild if they change.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templer.