shishkin / astro-asciidoc Goto Github PK
View Code? Open in Web Editor NEWSupport AsciiDoc pages in Astro
License: MIT License
Support AsciiDoc pages in Astro
License: MIT License
I'm trying to set up an astro starlight project with astro-asciidoc but I'm having trouble with it. Is it possible?
I'd like to do the following:
= Document Title
include::./attributes-settings.adoc[]
include::./attributes-urls.adoc[]
include::./chapter/chapter-1.adoc
There's two problems here:
./chapter/chapter-1.adoc
isn't found when rendering the webpageI've hardcoded the :layout: @layouts/Layout.astro
in the chapter-1.adoc
file to ensure it knows how to render, though I'd rather get the frontmatter includes to work there too. VSCode is able to preview the .adoc
includes properly.
This integration doesn't with in Astro 3 anymore. Astro refuses to render the generated/transformed AsciiDoc JSX page:
error Unable to render `Content`.
No valid renderer was found for this file extension.
I was unable to troubleshoot the issue and raised it with Astro team a few times (without any response so far):
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Warning
These dependencies are deprecated:
Datasource | Name | Replacement PR? |
---|---|---|
npm | @types/prettier |
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/ci.yaml
actions/checkout v4
actions/setup-node v4
.github/workflows/release.yaml
actions/checkout v4
actions/setup-node v4
example/package.json
astro 4.12.2
shiki 0.14.7
typescript 5.5.3
package.json
@asciidoctor/core 3.0.4
@commitlint/cli 19.3.0
@commitlint/config-conventional 19.2.2
@release-it/conventional-changelog 8.0.1
@types/eslint 8.56.10
@astrojs/check 0.8.2
@types/prettier 3.0.0
@typescript-eslint/eslint-plugin 7.16.1
@typescript-eslint/parser 7.16.1
astro 4.12.2
eslint-config-prettier 9.1.0
eslint-plugin-astro 1.2.3
eslint-plugin-prettier 5.2.1
husky 9.1.1
prettier 3.3.3
prettier-plugin-astro 0.14.1
release-it 17.6.0
typescript 5.5.3
unbuild 2.0.0
astro ^2.8.0 || ^3.0.0 || ^4.0.0
vite ^4.3.9 || ^5.0.0
.nvmrc
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting String near onth"], }
It seems that running Asciidoctor.js does pollute Javascript native object prototypes that leads to weird bugs. For example, this code adds a stub $id
method to Array
prototype so all arrays suddenly get it:
import asciidoctor from "@asciidoctor/core";
asciidoctor();
console.log([].$id);
// [Function: method_missing_stub] { '$$stub': true }
console.log(Array.prototype.$id);
// [Function: method_missing_stub] { '$$stub': true }
I discover a bug with this in ajv
schema validator that runs into issues when it encounters an array of schemas with a present $id
property, which it only expects to find on a single schema, not array.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.