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

@jeffess/factorio-blueprint-static-site-generator

v1.0.5

Published

Render a simple static site for a collection of Factorio blueprints

Downloads

1

Readme

This project generates a simple static website for your Factorio blueprints. All the internal links it generates will be relative links, so the generated output can be placed anywhere (for example, in a subfolder of another site)

Demo

Clone this repo and run npm run demo and it should open your browser. You can look in the blueprints/ directory in this repo to see how it is laid out.

Example

Imagine you have a folder like this:

blueprints/
  Circuits/
    Combinators.txt
    Kovarex.txt
  Solar Power.txt
  Rocket Fuel.txt

This will generate some HTML files, like this:

public/
  circuits/
    index.html
    combinators/index.html
    kovarex/index.html
  solar-power/index.html
  rocket-fuel/index.html

Notice how it has chosen URL-friendly names automatically.

You can nest folders and name them however they want. Every folder will include an autogenerated listing with links for each blueprint in the folder.

Usage

Just use a Node script like this:

const siteGenerator = require('@jeffess/factorio-blueprint-static-site-generator');
siteGenerator.build('blueprints', 'public');

It will read your blueprints folder and write the site to public/

Please note that any extra files in public/ will be deleted.

Blueprint Details

The name and description of your blueprint will show up on the details page for your blueprint. Change the title and description in Factorio before exporting your blueprint.

If your blueprint does not have a title, the filename will be used as the title instead.

Folder Readme

You may optionally put a file named _readme.txt in your blueprints/ folder or any sub-folder. The generated listing page for that folder will include that text at the top. This is helpful for adding introductions or more information about a group of blueprints.

For example, if you put text into blueprints/Circuit Network/_readme.txt, then that text would appear at the top of the directory listing in your site at /circuit-network/index.html

Custom HTML Header

If you would like to add a little branding to the page, you may optionally put a file named _header.html directly inside your blueprints/ folder. This HTML will be injected in the body of each generated page. Here is an example:

<style>h1.custom-header { color: #16a085; }</style>
<h1 class="custom-header">jeFFeSS Blueprint Library</h1>

Custom Files

You may optionally include a directory named _static directly inside your blueprints/ folder. These files will be copied verbatim into the generated output directory. For example, blueprints/_static/robots.txt would be copied into public/robots.txt.

This is useful if you'd like to include a logo or other image in your custom header.

License

This software is licensed under the MIT license. Please read LICENSE.txt for details.