Follow installation instructions with following notes:
- Prerequisite requirements can be skipped if using this development container
- Authentication: both machine token and SSH authentication is needed for full functionality
# Site & development environment
SITE_ENV="<site_name>.<dev_env>"
PANTHEON_USER="<pantheon-user-email>"
PANTHEON_TOKEN="<machine-token>"
DRUPAL_USER="<drupal-user-name>"
terminus auth:login --email=${PANTHEON_USER} --machine-token=${PANTHEON_TOKEN}
# switch Pantheon code update mode to sftp
terminus connection:set ${SITE_ENV} sftp
terminus drush ${SITE_ENV} -- user:information ${DRUPAL_USER}
terminus drush ${SITE_ENV} -- user:role:add administrator ${DRUPAL_USER}
terminus self:plugin:install pantheon-systems/terminus-composer-plugin
terminus composer ${SITE_ENV} -- require 'league/commonmark'
terminus composer ${SITE_ENV} -- require 'drupal/markdown_importer:^1.0'
This will change the composer.json
and composer.lock
files. As a result, the changes need to be committed via SFTP using the Pantheon commit interface. This will then persist the changes in the multidev site and allow the use of Markdown Importer.
Using the sitemap URL list, we run the following script:
python processing.py urllist.txt ./
The script does the following:
- Takes in a list of sitemap URL's (
urllist.txt
). - Takes in a location to dump contents into a
src/
directory containing MD files andnonhtml/
directory containing site files (e.g../
would save in./src/
and./nonhtml
). - Removes the old navigation content up until header 1.
- Adds a header 1 containing the filename/processed url. This is so that Drupal's Markdown Importer imports all MD files without overwriting any. Markdown Importer uses the top header as the page title.
- Removes most of the footer content.