andrewnt219.paper
1.0.0
dotnet add package andrewnt219.paper --version 1.0.0
NuGet\Install-Package andrewnt219.paper -Version 1.0.0
<PackageReference Include="andrewnt219.paper" Version="1.0.0" />
paket add andrewnt219.paper --version 1.0.0
#r "nuget: andrewnt219.paper, 1.0.0"
// Install andrewnt219.paper as a Cake Addin
#addin nuget:?package=andrewnt219.paper&version=1.0.0
// Install andrewnt219.paper as a Cake Tool
#tool nuget:?package=andrewnt219.paper&version=1.0.0
paper-cli
Static site generator (SSG) made with .NET.
Sample website: https://paper-csharp-sample.vercel.app/
Using as a nuget
Install from nuget: https://www.nuget.org/account/Packages
Usage:
using Paper_csharp.Modules.Cli;
namespace Test
{
class Program
{
static void Main(string[] args)
{
Generator generator = new Generator(args);
generator.Run();
}
}
}
Using as a console app
- Install your version of OS from Release
- Unzip the console app
- Run the executable file
- Window: .exe
- Linux/Mac: (no extension)
$ ./Generator.exe --help
-i, --input Required. Path to file(s)
-s, --stylesheet Path to css file or url
-o, --output (Default: ./dist) Path to output directory
-l, --lang (Default: en-CA) Locale of generated .html files
--help Display this help screen.
--version Display version information.
Features
π Generate index.html
The index file includes paths to all the generated html files (recursively)
$ ./Generator.exe -i dir-with-nested-dirs-and-files
π Pass in stylesheet's file OR url as a CLI arg
Content of .css
files are bundled into all the generated .html
files
$ ./Generator.exe -i page.txt --stylesheet ./my-style.css
π Keep source folder structure
If a directory is passed as --input
, dist
keeps the structure of the source dir
$ ./Generator.exe -i sample-dir
βββ sample-dir
βββ Cargo.toml
βββ sample-dir
β βββ sub-dir-1
β βββ sub-dir-2
β βββ page-1.txt
βββ dist
β ββ sample-dir
β βββ sub-dir-1
β βββ sub-dir-2
β βββ page-1.html
π Parse title
Title is the first line of the file, followed by 2 empty lines
π Pass in output dir as argument
Specify a different output directory, default is dist
π Parse Markdown files
Markdown syntax supported:
bold text **bold**
hr ---
$ dotnet run -- -i sample.md -o pages
π Pass in lang as an option
Specify the language of generated .html files. Default is en-CA.
$ dotnet run -- -i page.txt page.md --lang vi-VN
πSupport static images
Demo: https://paper-csharp.vercel.app/sample/markdown/Gallery.html
Source file: Gallery.md
Place your images in static
folder and refer to them in markdowns
![unsplash 2021 collection](unsplash-2021-collection.jpg)
Contributing
For collaboration, see CONTRIBUTING.md
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net5.0
- CommandLineParser (>= 2.9.0-preview1)
- Markdig (>= 0.26.0)
- StyleCop.Analyzers (>= 1.2.0-beta.354)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 6,482 | 11/24/2021 |