Skip to content

Instantly share code, notes, and snippets.

@arumsey
arumsey / import.js
Created May 22, 2024 18:26
Using the Helix Importer createBlock function
/* global WebImporter */
/* Create a block of name/value pairs (eg. Metadata block) */
const metadata = {
...WebImporter.Blocks.getMetadata(document),
keywords: 'keywords',
"Publication Date": dateFromSourceDom,
};
const block = WebImporter.Blocks.createBlock(document, {