Skip to content

Commit

Permalink
Add docs. Bump version. Update change log
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Oct 26, 2023
1 parent b0bbd3d commit d885677
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## [0.0.7] - 2023-10-26

### Added

- Support for `site.yml`
- Support for front matter in templates

## [0.0.6] - 2020-12-06

### Fixed
Expand Down
34 changes: 33 additions & 1 deletion bin/aphra
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,38 @@ directory:
docs/style.css
docs/about/index.html

=head1 SITE CONFIGURATION FILE - site.yml

You can store site-wide configuration and data in a file called C<site.yml>,
which should be in the same directory as the various directories discussed
above.

The file is in YAML format. Any variables defined inside this file will be
available inside your templates within the `site` variable. For example, your
`site.yml` could contain the following definition:

name: My Cool Site

And you could access that text inside your templates with markup like this:

<h1><% site.name %></h1>

=head1 FRONT MATTER IN INDIVIDUAL PAGES

At the start of the template for a page, you can add a data section which
contains variable defintions. This section is preceded and followed by lines
consisting of three dashed. The variables are defined using YAML format. The
variables defined in this section are available within templates by using the
`page` variable. For example, your template could start with this definition:

---
title: Important Page
---

And you could access that text inside your templates with markdown like this:

## <% page.title %>

=cut

use strict;
Expand All @@ -213,7 +245,7 @@ Dave Cross <[email protected]>

=head1 COPYRIGHT AND LICENCE

Copyright (c) 2017, Magnum Solutions Ltd. All Rights Reserved.
Copyright (c) 2017-2023, Magnum Solutions Ltd. All Rights Reserved.

This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Expand Down
4 changes: 2 additions & 2 deletions lib/App/Aphra.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use YAML::XS 'LoadFile';

use App::Aphra::File;

our $VERSION = '0.0.6';
our $VERSION = '0.0.7';

has commands => (
isa => 'HashRef',
Expand Down Expand Up @@ -243,7 +243,7 @@ Dave Cross <[email protected]>
=head1 COPYRIGHT AND LICENCE
Copyright (c) 2017, Magnum Solutions Ltd. All Rights Reserved.
Copyright (c) 2017-2023, Magnum Solutions Ltd. All Rights Reserved.
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Expand Down

0 comments on commit d885677

Please sign in to comment.