Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item14611: add flatdir generator. Fix resources in flatfile generator…
… too. Also make templates for generated topics, such as index. Add debug mode for tracing URL processing.
- Loading branch information
cdot
committed
Jan 28, 2018
1 parent
0edf3a1
commit a7bc2ef
Showing
8 changed files
with
230 additions
and
88 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# | ||
# Copyright (C) 2018 Crawford Currie, http://c-dot.co.uk | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU General Public License | ||
# as published by the Free Software Foundation; either version 2 | ||
# of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details, published at | ||
# http://www.gnu.org/copyleft/gpl.html | ||
# | ||
# File writer module for PublishPlugin. Generates a flat directory of HTML | ||
# files, with a _rsrc subdirectory for external resources. | ||
# | ||
package Foswiki::Plugins::PublishPlugin::BackEnd::flatdir; | ||
|
||
use strict; | ||
|
||
use Foswiki::Plugins::PublishPlugin::BackEnd::file; | ||
our @ISA = ('Foswiki::Plugins::PublishPlugin::BackEnd::file'); | ||
|
||
use constant DESCRIPTION => | ||
'Flat directory of HTML files. Attachments (and external resources if =copyexternal is selected=) will be saved to a top level =_rsrc= directory next to the HTML.'; | ||
|
||
# Override Foswiki::Plugins::PublishPlugin::BackEnd | ||
sub getTopicPath { | ||
my ( $this, $web, $topic ) = @_; | ||
my @path = split( /\/+/, $web ); | ||
return join( '_', @path, $topic . '.html' ); | ||
} | ||
|
||
1; |
Oops, something went wrong.