https://github.com/ecoapm/statiqpipelines
Pipelines and helpers used in ecoAPM's static sites
https://github.com/ecoapm/statiqpipelines
hacktoberfest plugins static-site-generator statiq
Last synced: about 1 year ago
JSON representation
Pipelines and helpers used in ecoAPM's static sites
- Host: GitHub
- URL: https://github.com/ecoapm/statiqpipelines
- Owner: ecoAPM
- License: mit
- Created: 2021-10-21T17:28:20.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-06-04T12:21:21.000Z (about 1 year ago)
- Last Synced: 2025-06-04T19:47:57.180Z (about 1 year ago)
- Topics: hacktoberfest, plugins, static-site-generator, statiq
- Language: C#
- Homepage:
- Size: 59.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# ecoAPM Statiq Pipelines
Pipelines and helpers used in ecoAPM's static sites
[](https://www.nuget.org/packages/ecoAPM.StatiqPipelines/)
[](https://github.com/ecoAPM/StatiqPipelines/actions/workflows/CI.yml)
[](https://sonarcloud.io/summary/new_code?id=ecoAPM_StatiqPipelines)
[](https://sonarcloud.io/summary/new_code?id=ecoAPM_StatiqPipelines)
[](https://sonarcloud.io/summary/new_code?id=ecoAPM_StatiqPipelines)
[](https://sonarcloud.io/summary/new_code?id=ecoAPM_StatiqPipelines)
## Requirements
- .NET SDK
## Installation
```bash
dotnet add {project} package ecoAPM.StatiqPipelines
```
## Usage
This package currently contains one pipeline and two modules.
### CopyFromNPM
This pipeline copies files from the `node_modules` directory to a set location in your output.
```c#
var files = new [] {
"bootstrap/dist/css/bootstrap.min.css",
"jquery/dist/jquery.min.js"
};
bootstrapper.AddPipeline("NPM", new CopyFromNPM(files, "assets");
```
The copied files can then be referenced from markup:
```html
```
A dictionary can be used to specify the output path for a given input. An empty string value flattens output with the input filename, as above.
```c#
var files = new Dictionary {
{ "bootstrap/dist/css/bootstrap.min.css", "" },
{ "jquery/dist/jquery.min.js", "" },
{ "@fontsource/noto-sans/*", "fonts" }
};
bootstrapper.AddPipeline("NPM", new CopyFromNPM(files);
```
Note that the output path is optional and defaults to `lib`.
```html
```
### NiceURL
This module can be added to your Content pipeline to improve the output URL format.
So, `input/category/page.md => http://localhost/directory/file`
instead of the default `output/category/page.html`
```c#
bootstrapper.ModifyPipeline("Content", p => p.ProcessModules.Add(new NiceURL()));
```
### NodeRestore
This module simply runs `npm`/`yarn` install as part of the build pipeline.
```c#
bootstrapper.ModifyPipeline("Content", p => p.InputModules.Add(new NodeRestore()));
```
## Contributing
Please be sure to read and follow ecoAPM's [Contribution Guidelines](CONTRIBUTING.md) when submitting issues or pull requests.