-
Notifications
You must be signed in to change notification settings - Fork 31
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
Hook to process links #12
Comments
Just pushed v0.1.5. Please see this gist. I'm planning to extend event system like this: $ciconia->on('event_name', function () {}); For example // find "@username" and turn it into url
$ciconia->addExtension(new UsernameMentionExtension());
// called from extension
$ciconia->on('username', function ($username) use ($ciconia) {
// fetch user's url from twitter api (or github)
$user = [];
return $user['url'];
});
$ciconia->render('****'); i'm looking forward to your site generator, because I'm just looking for a jekyll alternative written in PHP! |
Cool :) consider using https://github.com/fruux/sabre-event (my project) or https://github.com/igorw/evenement ;) |
Great projects :) Looks like more powerful than ciconia's event classes. I'm going to create a new ticket for events. so closing it. |
Hi!
I'm working on a static site generator with Ciconia.
I would like to automatically be able to process all the links in the markdown source, and prepend the link with a base url (if they are relative).
Ideally, I would also be able to automatically add
.md
to the resulting like.To do this effectively, it would be awesome if it were somehow possible to add a callback that allows me to process and rewrite links... For example something like this:
But I would also settle with a simple
baseUrl
and let Ciconia do the heavy lifting :)The text was updated successfully, but these errors were encountered: