Skip to content

Instantly share code, notes, and snippets.

View amoutiers's full-sized avatar

Antoine Moutiers amoutiers

  • Nantes - France
View GitHub Profile
@amoutiers
amoutiers / drupal7_to_hugo.php
Created January 10, 2018 17:29
A basic php script to migrate from Drupal to Hugo, needs "html2markdown" installed on the server
<?php
define('DRUPAL_ROOT', __DIR__);
include_once(DRUPAL_ROOT . '/includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$nids = db_query('SELECT DISTINCT(nid) FROM {node}')
->fetchCol();
$nodes = node_load_multiple($nids);