
Security News
Federal Audit Finds NIST Wasted Funds With No Plan to Clear NVD Backlog
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.
Integrate AsciiDoctor content into your Astro project.
For example, to get the following routes:
| Directory | URL |
|---|---|
src/articles/post.adoc | /blog/post |
src/articles/sub/index.adoc | /blog/sub |
src/articles/dig/deeper.adoc | /blog/dig/deeper |
Your would add the following to src/pages/blog/[...slug].astro:
---
import { getAdocPaths } from "astro-adoc"
import { AsciiDoctor } from "astro-adoc/components"
export async function getStaticPaths() {
return await getAdocPaths("src/articles", "slug")
}
const { slug } = Astro.params
---
<AsciiDoctor path={`src/articles/${slug}`} />
Beside the slug from Astro.params, you also get adoc from Astro.props
which is the parsed AsciiDoctor document.
If you want more control over the layout, you can use the getAdoc function
instead of the AsciiDoctor component.
You can access anything from the returning AsciiDoctor.Document instance you want to display.
---
import { getAdocPaths } from "astro-adoc"
import type { Asciidoctor } from "asciidoctor"
export async function getStaticPaths() {
return await getAdocPaths("src/articles")
}
const { adoc } = Astro.props as { adoc: Asciidoctor.Document }
---
<h1>
{adoc.getTitle()}
</h1>
{adoc.getAuthor()}
<Fragment set:html={adoc.convert()} />
The integrations wraps the asciidoctor.js library, so you can pass any option that works with that library.
See convert options for more information.
<AsciiDoctor
path={`src/articles/article`}
options={{ attributes: { showtitle: true } }}
/>
FAQs
AsciiDoctor inside Astro
We found that astro-adoc 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
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.