Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ vendor/**/*.js
vendor/**/*.css
bin/*
coverage.xml
composer.lock
composer.lock
jekyll-export-local-conf.php
14 changes: 12 additions & 2 deletions jekyll-export-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,22 @@
*
* Must be run in the wordpress-to-jekyll-exporter/ directory.
*/
require '../../../wp-load.php';

// Uncomment for extra replace options

// Customize here the path to wordpress installation if not in the wordpress plugin dir (ex: "/home/wordpress/")
$wordpress_path = "../../../";

$user_config = array();
// You may customize user_config outside the source files with adding a jekyll-export-local-conf.php
if (file_exists('jekyll-export-local-conf.php')) { include 'jekyll-export-local-conf.php'; }

require $wordpress_path . 'wp-load.php';
require_once 'jekyll-exporter.php'; // Ensure plugin is "activated".

if ( php_sapi_name() !== 'cli' ) {
wp_die( 'Jekyll export must be run via the command line or administrative dashboard.' );
}

$jekyll_export = new Jekyll_Export();
$jekyll_export->export();
$jekyll_export->export($user_config);
Loading