diff --git a/readme.md b/readme.md index 0dc07e1..481d869 100644 --- a/readme.md +++ b/readme.md @@ -16,6 +16,18 @@ These are the primary projects used to render various types of content: +## Install from npm + +```bash +# Update project npm config to refer to correct registry for the @doc-utils scope +echo '@doc-utils:registry=https://gitea.jbrumond.me/api/packages/doc-utils/npm/' >> ./.npmrc + +# Install package +npm install --save @doc-utils/markdown2html +``` + + + ## Building from source ```bash @@ -27,7 +39,7 @@ npm run tsc ## Programatic Use ```ts -import { MarkdownOptions, render_markdown_to_html } from './build'; +import { MarkdownOptions, render_markdown_to_html } from '@doc-utils/markdown2html'; async function main() { const options: MarkdownOptions = { @@ -41,7 +53,7 @@ async function main() { ### Handling Frontmatter ```ts -import { process_frontmatter } from './build'; +import { process_frontmatter } from '@doc-utils/markdown2html'; const raw_content = `--- title: Example Markdown with Frontmatter @@ -119,7 +131,7 @@ const options: MarkdownOptions = { ```ts // extension.ts import type { marked } from 'marked'; -import type { MarkdownOptions } from './build'; +import type { MarkdownOptions } from '@doc-utils/markdown2html'; export interface MyCustomToken extends marked.Tokens.Generic { // ... @@ -152,7 +164,7 @@ export function my_extension(renderer: marked.Renderer, options: MarkdownOptions // main.ts import { my_extension } from './extension'; -import { MarkdownOptions, render_markdown_to_html } from './build'; +import { MarkdownOptions, render_markdown_to_html } from '@doc-utils/markdown2html'; async function main() { const options: MarkdownOptions = {