Skip to content

Instantly share code, notes, and snippets.

View rickysarraf's full-sized avatar
🙃
I may be slow to respond.

Ritesh Raj Sarraf rickysarraf

🙃
I may be slow to respond.
View GitHub Profile
@rickysarraf
rickysarraf / drupal7_to_hugo.php
Created November 5, 2018 07:20 — forked from amoutiers/drupal7_to_hugo.php
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);