Cake.Asciidoctor 1.1.21
dotnet add package Cake.Asciidoctor --version 1.1.21
NuGet\Install-Package Cake.Asciidoctor -Version 1.1.21
<PackageReference Include="Cake.Asciidoctor" Version="1.1.21" />
paket add Cake.Asciidoctor --version 1.1.21
#r "nuget: Cake.Asciidoctor, 1.1.21"
#addin nuget:?package=Cake.Asciidoctor&version=1.1.21
Cake.Asciidoctor
Cake.Asciidoctor 是一个 Cake 插件,为 Asciidoctor 和 Asciidoctor PDF 提供别名。
您可以在 https://github.com/ap0llo/Cake.Asciidoctor 上阅读最新文档。
目录
前提条件
Asciidoctor 和/或 Asciidoctor PDF 需要单独安装,以便 Cake 插件正常运行。
请按照官方文档中的说明进行安装。
使用方法
安装插件
将插件安装到您的 Cake 构建。
如果您正在使用 Cake 脚本,请使用
#addin
重新处理器指令。#addin nuget:?package=Cake.Asciidoctor&version=VERSION
如果您正在使用 Cake.Frosting,通过将包引用添加到您的项目安装插件。
<PackageReference Include="Cake.Asciidoctor" Version="VERSION" />
将 AsciiDoc 文档转换为 HTML
Asciidoctor()
别名运行 Asciidoctor 将 AsciiDoc 文档转换为 HTML。
仅要求的参数是输入文档的路径。它将文档转换为 HTML 并将其放置在输入文档旁边。
Task("ConvertDocuments").Does(() =>
{
// This will create "input.html" in the same directory as input.adoc
Asciidoctor("input.adoc");
});
可以使用AsciidoctorSettings
参数指定额外的(可选)设置。
例如,要更改输出目录,请使用DestinationDirectory
属性
Task("ConvertDocuments").Does(() =>
{
Asciidoctor(
"input.adoc",
new AsciidoctorSettings()
{
DestinationDirectory = "./output-directory"
});
});
AsciidoctorSettings
中可用的选项对应于Asciidoctor的命令行选项。请参阅asciidoctor(1)以获取详细信息。
将AsciiDoc文档转换为PDF
使用AsciidoctorPdf()
别名运行Asciidoctor PDF来将AsciiDoc文档转换为PDF。
唯一所需的参数是输入文档的路径。这会将文档转换为PDF并放置在输入文档旁边
Task("ConvertDocuments").Does(() =>
{
// This will create "input.html" in the same directory as input.adoc
AsciidoctorPdf("input.adoc");
});
可以使用AsciidoctorPdfSettings
参数指定额外的(可选)设置。
例如,要更改输出目录,请使用DestinationDirectory
属性
Task("ConvertDocuments").Does(() =>
{
AsciidoctorPdf(
"input.adoc",
new AsciidoctorPdfSettings()
{
DestinationDirectory = "./output-directory"
});
});
AsciidoctorPdfSettings
中的可用选项对应于Asciidoctor PDF的命令行选项,并且与Asciidoctor的选项基本相同。请参阅Asciidoctor PDF文档以获取详细信息。
许可证
Cake.Asciidoctor采用MIT许可证。
详细信息请参阅https://github.com/ap0llo/Cake.Asciidoctor/blob/main/LICENSE
产品 | 版本 兼容和额外的计算目标框架版本。 |
---|---|
.NET | net6.0兼容。 net6.0-android已计算。 net6.0-ios已计算。 net6.0-maccatalyst已计算。 net6.0-macos已计算。 net6.0-tvos已计算。 net6.0-windows已计算。 net7.0兼容。 net7.0-android已计算。 net7.0-ios已计算。 net7.0-maccatalyst已计算。 net7.0-macos已计算。 net7.0-tvos已计算。 net7.0-windows已计算。 net8.0已计算。 net8.0-android已计算。 net8.0-browser已计算。 net8.0-ios已计算。 net8.0-maccatalyst已计算。 net8.0-macos已计算。 net8.0-tvos已计算。 net8.0-windows已计算。 |
-
net6.0
- 无依赖。
-
net7.0
- 无依赖。
NuGet包
此包不被任何NuGet包使用。
GitHub仓库
此包不被任何流行的GitHub仓库使用。