Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
nast-util-to-html
Advanced tools
Render NAST to HTML.
NAST is an universal data structure to represent almost any document. It is under active development so there's no released documentation, but TypeScript definitions can be found here.
This repo is part of notajs project.
A demo page built with nast-util-from-notionapi.
npm i nast-util-to-html
require
this module,
const { renderToHTML } = require('nast-util-to-html')
Download a Notion.so page and convert to HTML.
const fs = require('fs')
const NotionAgent = require('notionapi-agent')
const { getOnePageAsTree } = require('nast-util-from-notionapi')
const { renderToHTML } = require('nast-util-to-html')
/* Configure NotionAgent's options */
const agentOpts = {
token: '',
suppressWarning: false,
verbose: true
}
const agent = new NotionAgent(options)
async function main() {
try {
/* Fill in a Notion.so page ID */
let pageID = ''
let tree = await getOnePageAsTree(pageID, agent)
let html = renderToHTML(tree)
fs.writeFileSync(
'index.html',
html,
{ encoding: 'utf-8' }
)
} catch (error) {
console.error(error)
}
}
main()
renderToHTML(data, options)
Render static HTML from NAST.
data
- (required) Nast.Block
Go to Definition | Notion.StyledString[]
Go to Definition
options
- (optional) RenderOptions
type RenderOptions = {
/** Ignore the root node */
contentOnly: boolean
/** Skip bulleted list and numbered list analysis */
bypassPreRenderTransform: boolean
}
A HTML string.
id
of the user)id
of the page)Generated by dependency-cruiser
NPM package.
FAQs
Transform NAST to HTML.
The npm package nast-util-to-html receives a total of 0 weekly downloads. As such, nast-util-to-html popularity was classified as not popular.
We found that nast-util-to-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.