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

@neo4j-antora/antora-modify-sitemaps

v0.5.0

Published

Override default Antora sitemap generator to include only pages for the current versions of components, and optionally move sitemaps into the component folders for the current versions

Downloads

1,280

Readme

antora-modify-sitemaps

Use the antora-modify-sitemaps extension to modify the default Antora sitemap generation.

Usage

Add the extension in a playbook

antora:
  extensions:
  - require: "@neo4j-antora/antora-modify-sitemaps"
    sitemap_version: '1.0'
    sitemap_loc_version: 'current'
    move_sitemaps_to_components: true
    data:
      components:
        my-component: 'my-version'

Configuration

sitemap_version

Optional.

Specifies a version that will be used for the sitemap for all components in the site catalog. If you do not provide a value, by default the version that Antora considers to be the latest version for a given component is used. For details on how Antora determines the 'latest' version, see Antora version ordering rules.

You might want to override this value if, for example, you publish prerelease or preview documentation of a component but you do not mark it as prerelease: true in the component descriptor (antora.yml).

If you are generating output for a single component you can use sitemap_version to specify the version of that component that you want to generate a sitemap for. If you are generating output for multiple components, you need to override this value for specific components by using the data property.

sitemap_loc_version

Optional. The default value is current.

If this is specified, the paths in the entries in each generated sitemap file are updated by replacing the version as it appears in the path with the value of sitemap_loc_version.

For example, with sitemap_loc_version: 'current'

<loc>https://example.com/my-component/my-version/path/to/page/</loc>

is updated to:

<loc>https://example.com/my-component/current/path/to/page/</loc>

Note: If your content is versionless only, you do not need to specify a value for sitemap_loc_version, and any value you do specify is ignored for any versionless content.

move_sitemaps_to_components

Optional. The default value is true.

The sitemap for each component will be moved to site/<component>/<sitemap_version>/sitemap.xml unless this attribute is set to false.

data

Optional.

If you want to generate a sitemap from a component by using a version that is not the latest version (as determined by Antora), you can specify the components and versions with this option.

For example, if you have a component, my-component and your playbook will generate output for versions 1.0 and 1.1, you can generate a sitemap for the 1.0 content at my-component/1.0/sitemap.xml with the following:

 data:
      components:
        my-component: '1.0'