Skip to content

Commit

Permalink
bump astro-asciidocx version
Browse files Browse the repository at this point in the history
  • Loading branch information
sransara committed Jul 13, 2024
1 parent 367ba2f commit 14f88d1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
"asciidoc.preview.asciidoctorAttributes": {
"skip-front-matter": true
},
"asciidoc.antora.enableAntoraSupport": false,
}
12 changes: 8 additions & 4 deletions adocx/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path';

import type { AdocOptions, AstroAdocxOptions } from '@sransara/astro-adocx/types';
import fg from 'fast-glob';
import path from 'node:path';
// @ts-ignore: Types are not available
import { register as krokiPluginRegisterHandle } from 'asciidoctor-kroki';

Expand All @@ -24,21 +24,25 @@ import poster from './_meta/poster.jpg';

export const adocxConfig = {
astroFenced,
withAsciidocEngine(asciidoctorEngine) {
async withAsciidocEngine(asciidoctorEngine) {
nodeConvertingConverterRegisterHandle(asciidoctorEngine, nodeConverters);
krokiPluginRegisterHandle(asciidoctorEngine.Extensions);
inlineMacroCalloutRegisterHandle(asciidoctorEngine.Extensions);
},
withDocument(filePath, document) {
async withDocument(filePath, document) {
// useful for asciidoctor-diagrams/kroki
document.setAttribute('outdir', path.dirname(filePath));
},
async withAstroComponent(filePath, component) {
return component;
},
astroLayouts: {
note: {
path: '@/src/layouts/adocNoteLayout/AdocNoteLayout.astro',
args: 'poster={poster} metadata={metadata}',
},
},
watchFiles: fg.sync('./adocx/**/*.*'),
} satisfies AstroAdocxOptions;

export const asciidoctorConfig = {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@astrojs/solid-js": "^4.4.0",
"@astrojs/tailwind": "^5.1.0",
"@eslint/js": "^9.6.0",
"@sransara/astro-adocx": "^0.0.15",
"@sransara/astro-adocx": "^0.0.16",
"@types/eslint": "^8.56.10",
"@types/eslint__js": "^8.42.3",
"@types/katex": "^0.16.7",
Expand All @@ -33,6 +33,7 @@
"eslint": "^9.6.0",
"eslint-plugin-astro": "^1.2.2",
"eslint-plugin-tailwindcss": "^3.17.4",
"fast-glob": "^3.3.2",
"katex": "^0.16.11",
"postcss": "^8.4.39",
"postcss-load-config": "^6.0.1",
Expand Down
13 changes: 8 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 14f88d1

Please sign in to comment.