Last active
December 1, 2015 06:29
-
-
Save hideki-a/d9bd5c92f6054c0ce4b2 to your computer and use it in GitHub Desktop.
記事の『出力ファイル名』(ベースネーム)でフィルタを書けて記事を出力する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: EntriesBasenameFilter | |
tags: | |
filters: | |
Entries: | |
basename_filter: | |
handler: > | |
sub { | |
my ( $ctx, $args, $cond ) = @_; | |
$ctx->{ terms }->{ basename } = { like => $args->{ basename_filter } }; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:Ignore>basenameがsampleではじまる</mt:Ignore> | |
<mt:Entries lastn="5" basename_filter="sample%"> | |
<mt:Ignore>basenameにsampleを含む</mt:Ignore> | |
<mt:Entries lastn="5" basename_filter="%sample%"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment