Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Route discovery
· 10 years ago
You can actually get the routes. The precache plugin CLI command uses Curl so that the page is requested with the correct URL. This is important because Grav needs to be able to build the correct URL
-
Route discovery
· 10 years ago
Found the precache plugin and indeed its CLI uses curl, so apparently it's not currently possible to discover routes using the CLI. Is this a feature that can be added? I basically want to be able to
-
Route discovery
· 10 years ago
From within a my console command I've tried $pages = $this->getGrav()['pages'], which indeed gives me a Grav\Common\Page\Pages object, but none of the member functions give me any data (routes() is
-
Route discovery
· 10 years ago
Is there a mechanism by which a plugin CLI can discover all known routes for the install? My specific work case would be discovering all pages, generating their HTML, then scanning the HTML for absolu
-
Adding <link> headers
· 10 years ago
OK. I'll go with the brute force method. Thanks :)
-
Adding <link> headers
· 10 years ago
Hmm.. actually there really isn't programatically. You can do it via Twig of course but that depends completely on the theme because it may or may not define the block head. I think your approach is
-
Adding <link> headers
· 10 years ago
Right. As I said, I'm not nearly expert enough to do that. But as plugins seem to be able to inject content into other partials, I'm pretty sure someone could do it.
-
Adding <link> headers
· 10 years ago
Thanks. Yes I could, but this is for a plugin. I want it to inject the tags so the user doesn't have to mess with their templates if they don't want to. I want it to be automatic and transparent.
-
Adding <link> headers
· 10 years ago
I am no expert, but if you look in the template partial that generates the <head> section you should be able to put anything you want in there.
-
Adding <link> headers
· 10 years ago
Is there a "Grav" way of injecting material into the final output's <head> tag? Specifically I want to add some <link> tags. I know I can just grab the final output from onOutputGenerated