T M
New Pod Blocks
Error ReportCollection examples

These are possible using the Collection and Raku::Pod::Render distributions.

Assigning new classes to standard HTML templates.

Actually legacy Pod::To::HTML allowed for different classes to be assigned to many Pod Blocks, but it was very difficult to incorporate the accompanying CSS files with a page to get another class to work.

Raku::Pod::Render allow for plugins to be defined and these keep the CSS, templates and new custom block names in the same sub-directory.

Collection provides a mechanism for calling plugins that collect CSS files from different plugins, and collate them into one that is then served with each page.

It is also possible to create separate page templates, with different CSS assets.

For example, <hr> .

=for HR :class<yellowish-dots>
 
=for HR :class<bluish-dots>
 
=for HR :class<greenish-dots>
 

renders as




New Format Codes

Here is an example where the format code F has been leveraged to generate FontAwesome icons. The plugin here utilises v4.7. The API for v5.0 is different, so another plugin is needed.

Some FontAwesome icons
 
F<fa-ambulance> Example of ambulance
 
F<fa-automobile> Example of automobile (alias)
 
F<fa-bicycle> Example of bicycle
 
F<fa-bus> Example of bus
 
F<fa-cab> Example of cab (alias)
 
F<fa-car> Example of car
 
F<fa-fighter-jet> Example of fighter-jet
 
F<fa-motorcycle> Example of motorcycle
 
F<fa-plane> Example of plane
 
F<fa-rocket> Example of rocket
 
F<fa-ship> Example of ship
 
F<fa-space-shuttle> Example of space-shuttle
 
F<fa-subway> Example of subway
 
F<fa-taxi> Example of taxi
 
F<fa-train> Example of train
 
F<fa-truck> Example of truck
 
F<fa-wheelchair> Example of wheelchair
 
F<fa-wheelchair-alt> Example of wheelchair-alt

Generates Some FontAwesome icons

Example of ambulance

Example of automobile (alias)

Example of bicycle

Example of bus

Example of cab (alias)

Example of car

Example of fighter-jet

Example of motorcycle

Example of plane

Example of rocket

Example of ship

Example of space-shuttle

Example of subway

Example of taxi

Example of train

Example of truck

Example of wheelchair

Example of wheelchair-alt

FontAwesome has some other options.

Train normal size F<fa-train> Triple size train F<fa-train|fa-3x>
 
An animated spinner F<fa-refresh|fa-spin fa-3x fa-fw>

Generates

Train normal size Triple size train

An animated spinner

Notice how these examples leverage off the idea of meta data together with a Format Code. This is not standard POD6, as this metadata is only specified for X<> and L<> . Raku::Pod::Render allows for metadata to be added to any non-standard letter used as a Format Code. Raku allows for any Unicode character to be made into a Format Code.

Compilation blocks

When many Pod6 files are included in a collection, there is a need to collect data from each. So for example, the Raku Documentation files all have metadata associated with the first pod definition. We need to collect files according to the metadata. The keys kind, subkind, and category are allocated to all Raku Documents.

=for ListFiles :select<kind=Programs>
Programs that support Raku development
 

renders as

Programs that support Raku development

Modules and applications used to debug Raku programs

rakudoc - the Raku pod reader

How to run Rakudo, a Raku implementation, and modify its behavior with environment variables.

=for ListFiles :select<kind=Programs> :headlevel(0)
Programs that support Raku development, title is not included in the TOC.
 

Programs that support Raku development, title is not included in the TOC.

Modules and applications used to debug Raku programs

rakudoc - the Raku pod reader

How to run Rakudo, a Raku implementation, and modify its behavior with environment variables.

Other examples of ListFiles can be seen in the TOC and Itemised index pages.

Images

Content files today, especially for the Web, rely on images.

=for Image :src<images/octopus_build.gif> :class<justify-center>
New searching functionality is being developed
 

Generates an image with the text in the Table of Contents. The TOC entry can be eliminated with a :headlevel(0).

<p>New searching functionality is being developed</p>

JQuery Plugins

All websites need JQuery plugins or JS scripts. Collection creates the infrastructure for these plugins to be written and added to a site.

For example, the filterlines plugin uses a small JQuery script, adds some html around existing Pod content and handles everything else.

=begin filterlines
=for ListFiles :select<kind=Programs> 
Programs that support Raku development
=end filterlines

renders as

Programs that support Raku development

Modules and applications used to debug Raku programs

rakudoc - the Raku pod reader

How to run Rakudo, a Raku implementation, and modify its behavior with environment variables.