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

raml2html-werk-theme

v1.3.4

Published

a bulma and open-color based single-page theme that is easily searchable and offline-ready

Downloads

2,940

Readme

raml2html werk theme

A bulma and open-color based single-page theme that is easily searchable and offline-ready.

Example API | Example Request :-------------------------------:|:-----------------------------------: front | request

General use

npm install raml2html-werk-theme
raml2html --theme raml2html-werk-theme --output output/docs.html --input docs.raml

Note: For some reason installing raml2html-werk-theme globally does not work. See this issue for progress on the situation. You can install both raml2html and raml2html-werk-theme as a local dependency and use node_modules/.bin/raml2html --theme raml2html-werk-theme to work around this problem for the time being.

Note: Use of the --output flag is required, because the theme bundles assets along with the HTML.

This theme is intended for general use and we would love to see others use it. That being said there are some caveats when using this theme that you should be aware of.

REQUIRED raml2html version

This theme requires raml2html v7.1.0+.

Additional Command-Line Options

The following cli options can be used when calling raml2html in order to change the behaviour of the theme:

--no-bundle-assets: Prevents the theme from copying the assets next to the html output.

--asset-base-path /foo: Sets the base path to something different than the default ./assets (in the case of the example to /foo). Useful when used with no-bundle-assets to store assets in a different location.

Annotations

There currently is no general purpose rendering implementation for annotations. We’ve implemented what we needed but don’t feel that this scratches the surface of what people may want to use annotations for. If you use annotations and want to see better support in this theme please open up an issue and discuss your use case with us.

Todos

There are still some things, that we’d like to implement (ordered by priority):

  • Scroll-Spy support

    The menu on the left hand side is just static. Instead it should indicate the current menu-item, show sub-menus when scrolling the page and (in case of rather large api documentations) scroll with the content on the page.

  • Better non-desktop media support

    Though we believe that most of the users that use API documentation will view them on HD displays, proper rendering on tablets and smartphones is desirable.

  • Document search

    With all the meta-data from raml it should be possible to implement a more sophisticated search than the one the browser supports.

  • Bookmarks

    With the help of WebStorage it should be possible to implement persistent bookmarks in order to easily navigate between often used resource/type definitions.

Thanks

This theme is originally based on the existing sources of the raml2html-default-theme published by @kevinrenskers. Learning how raml works and how things relate to each other would have been substantially harder hadn’t there been an already working theme implementation.

License

raml2html-werk-theme is available under the MIT license. See the LICENSE file for more info.