Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antora/document-converter

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/document-converter - npm Package Compare versions

Comparing version 1.0.0-alpha.8 to 1.0.0-alpha.9

12

lib/convert-document.js

@@ -5,2 +5,4 @@ 'use strict'

const CommaDelimiterRx = /\s*,\s*/
/**

@@ -10,3 +12,3 @@ * Converts the contents on the specified file from AsciiDoc to embeddable HTML.

* Delegates to the AsciiDoc Loader to load the AsciiDoc contents on the
* specified virtual file to a Document object. It then graps the document
* specified virtual file to a Document object. It grabs the document
* attributes from that Document and assigns them to the asciidoc.attributes

@@ -30,2 +32,3 @@ * property on the file. It then converts the Document to embeddable HTML,

const attributes = doc.getAttributes()
registerAliases(attributes['page-aliases'], file, contentCatalog)
// Q: should we backup the AsciiDoc contents for all pages? what's the impact?

@@ -39,2 +42,9 @@ if ('page-partial' in attributes) file.src.contents = file.contents

function registerAliases (aliases, targetFile, contentCatalog) {
if (!aliases) return
aliases
.split(CommaDelimiterRx)
.forEach((aliasSpec) => aliasSpec && contentCatalog.registerPageAlias(aliasSpec, targetFile))
}
module.exports = convertDocument

2

lib/convert-documents.js

@@ -10,3 +10,3 @@ 'use strict'

* those files to embeddable HTML by delegating to the convertDocument function. The function then
* returns all the files in the page family. All the files returns from this function are expected
* returns all the files in the page family. All the files returned from this function are expected
* be composed (i.e., wrapped in an HTML layout) by the page composer.

@@ -13,0 +13,0 @@ *

{
"name": "@antora/document-converter",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"description": "Converts AsciiDoc documents to embeddable HTML for use in an Antora documentation pipeline.",

@@ -20,3 +20,3 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/asciidoc-loader": "1.0.0-alpha.8"
"@antora/asciidoc-loader": "1.0.0-alpha.9"
},

@@ -23,0 +23,0 @@ "engines": {

# Antora Document Converter
The document converter is a component in Antora responsible for converting AsciiDoc documents to embeddable HTML for use in an Antora documentation pipeline.
The Document Converter is a component in Antora responsible for converting AsciiDoc documents to embeddable HTML for use in an Antora documentation pipeline.

@@ -5,0 +5,0 @@ [Antora](https://antora.org) is a modular static site generator designed for creating documentation sites from AsciiDoc documents.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc