Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssg-api

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssg-api

Static Site Generation TypeScript API

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189
decreased by-41.3%
Maintainers
1
Weekly downloads
 
Created
Source

ssg-api

TypeScript API to generate a static website.

ssg-api has been developed to generate the RR0 website, so you'll find examples of Steps and Replacers in the website repository.

Concepts

Step

The Ssg execute a number of Steps, sequentially. A Step can do anything, but here are some pre-defined steps:

For instance:

 const context = new SsgContextImpl("fr")

new Ssg(config)
        .add(new ContentStep(contentConfigs, outputFunc))
        .add(dir1SubdirectoriesStep)
        .add(dir2SubdirectoriesStep)
        .add(...anArrayOfSteps)
        .add(new CopyStep(copiesToDo))
        .start(context)
        .then(result => console.log("Completed", result))
        .catch(err => console.error(err, context.inputFile.name, "=>", context.outputFile.name))
Extensibility

You can create:

  • your own steps by implementing the SsgStep interface.
  • your own context by implementing the SsgContext interface, typically to provide additional info to the custom .

Replacements

In the case of a ContentStep, predefined replacements are also available:

Keywords

FAQs

Package last updated on 08 Nov 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc