npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@antora/atlas-extension

v1.0.0-alpha.2

Published

An Antora extension that manages references across discrete runs of Antora through the use of a site manifest.

Downloads

11,116

Readme

Antora Atlas Extension

The Antora Atlas Extension (Antora Atlas) manages references across discrete runs of Antora through the use of a site manifest.

⚠️ WARNING
This extension is currently ALPHA software! That means this extension experimental and likely to change without notice. You’re welcome to test it and give feedback, but take caution when relying on it in a production site. If you’re looking for the precursor release line, which is a stable release line for users of this extension’s predecessor, refer to the v0.0.x branch.

Overview

The purpose of the extension is to support site composition (i.e., sharding) and partial builds.

When this extension is enabled, Antora will create and publish a site manifest to the root of the site. The site manifest is a JSON file named site-manifest.json. This file contains reference information for all pages and aliases in the site, grouped by component then version. This information is intended to be used to resolve references to these pages from a discrete site (e.g., an archive site) or partial build (only select components and/or versions).

When this extension is enabled and either the primary site manifest URL or primary site URL is specified, Antora will read the site manifest and import all the component versions and pages into the content catalog of the current site. If the location of the site manifest is remote, Antora will download and cache it. The virtual files the extension creates are merely stubs, enough to allow Antora to resolve references to them through their resource ID. The target URL of these files are external, pointing to the location in the published site rather than relative to the current site. Internally, Antora is able to distinguish between local and imported resources by the presence of the site property.

Prerequisites

In order to use this extension, you must be using Node.js 16 and Antora 3.2.0-alpha.2 or newer. The following instructions assume you’ve already set up an Antora playbook file (i.e., antora-playbook.yml) to build your site.

To learn about using extensions with Antora, see the Antora extension documentation.

Install

Use the following command to install the extension into your Antora playbook project:

$ npm i @antora/atlas-extension

Register

Open your Antora playbook file and register the extension as an entry in the antora.extensions key. If this key doesn’t yet exist in your playbook, first create it.

antora-playbook.yml

antora:
  extensions:
  - '@antora/atlas-extension'

Configure

There’s no configuration necessary to export the site manifest. That happens automatically. If the site.url key is set in the playbook, it will be included in the site manifest. You can change the name of the manifest file using the site-manifest-path attribute, though it’s not recommended.

In order to import a site manifest, you must specify either the primary-site-url or primary-site-manifest-url attributes in the Antora playbook. Assuming the primary site was published using this extension, you can specify the URL to that site.

asciidoc:
  attributes:
    primary-site-url: https://docs.example.org

The extension will then look for the site manifest at https://docs.example.org/site-manifest.json, download it, and cache it. Antora will attempt to download it again only if the --fetch option is specified (or runtime.fetch=true in the playbook).

Alternately, you can specify the URL or path of the site manifest to import. If the value is a URL, Antora will download it. Otherwise, it will read it from the location specified.

asciidoc:
  attributes:
    primary-site-manifest-url: ./primary-site-manifest.json

If the manifest URL ends with .gz, Antora will gunzip the file.

When the extension exports the manifest, it will exclude any resources that were previously imported.

Copyright and License

Copyright (C) 2022-present by OpenDevise Inc. and the individual contributors to this project.

Use of this software is granted under the terms of the Mozilla Public License Version 2.0 (MPL-2.0).