Changes
2 changed files (+11/-11)
-
-
@@ -3,7 +3,7 @@ Pass a URL of the script to `deno run` and provide parameters.Use `--help` to see parameters and arguments. ``` $ deno run https://deno.land/x/macana@v0.2.0/cli.ts --help $ deno run https://deno.land/x/macana@v0.2.2/cli.ts --help ``` The CLI script accepts taking a config JSON/JSONC file via `--config` option.
-
@@ -11,7 +11,7 @@ Most of the generation options are available both as a CLI parameter and configYou need to grant `read` permission for the config JSON/JSONC file. ``` $ deno run --allow-read=.macana.json https://deno.land/x/macana@v0.2.0/cli.ts --config .macana.json $ deno run --allow-read=.macana.json https://deno.land/x/macana@v0.2.2/cli.ts --config .macana.json ``` See [Config reference](/en/References/Config) for available options.
-
-
-
@@ -36,7 +36,7 @@ import {JSONCanvasParser, oneof, DefaultThemeBuilder, } from "https://deno.land/x/macana@v0.2.0/mod.ts" } from "https://deno.land/x/macana@v0.2.2/mod.ts" const fileSystemReader = new DenoFsReader(new URL("./contents", import.meta.url));
-
@@ -94,7 +94,7 @@ await pageBuilder.build({> JSONCanvasParser, > oneof, > DefaultThemeBuilder, > } from "https://deno.land/x/macana@v0.2.0/mod.ts" > } from "https://deno.land/x/macana@v0.2.2/mod.ts" > > // Treat `contents/` directory as a Vault. > // By resolving from `import.meta.url`, `contents/` directory next to this
-
@@ -197,7 +197,7 @@ Macana uses abstraction layer for file I/O.FileSystem Reader provides listing directory and reading file contents capability. ```ts import { DenoFsReader } from "https://deno.land/x/macana@v0.2.0/mod.ts"; import { DenoFsReader } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const fileSystemReader = new DenoFsReader(new URL("./contents", import.meta.url));
-
@@ -222,7 +222,7 @@ $ deno run --allow-read=contents build.tsFileSystem Writer provides capability to write to files and create directories. ```ts import { DenoFsWriter } from "https://deno.land/x/macana@v0.2.0/mod.ts"; import { DenoFsWriter } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const fileSystemWriter = new DenoFsWriter(new URL("./.dist", import.meta.url));
-
@@ -250,7 +250,7 @@ Macana exports some useful function to wrap the FileSystem Writer for additionalThe resulted file formats are compatible with [Caddy](https://caddyserver.com/)'s [`precompressed`](https://caddyserver.com/docs/caddyfile/directives/file_server#syntax) directive. ```ts import { DenoFsWriter, precompress } from "https://deno.land/x/macana@v0.2.0/mod.ts"; import { DenoFsWriter, precompress } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const fileSystemWriter = precompress()( new DenoFsWriter(new URL("./.dist", import.meta.url))
-
@@ -274,7 +274,7 @@ await fileSystemWriter.write(["index.js"], text);In addition to that, if it detects the writes to different content to the same file, it aborts the build in order to prevent producing inconsistent build output. ```ts import { DenoFsWriter, noOverwrite } from "https://deno.land/x/macana@v0.2.0/mod.ts"; import { DenoFsWriter, noOverwrite } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const fileSystemWriter = noOverwrite( new DenoFsWriter(new URL("./.dist", import.meta.url))
-
@@ -304,7 +304,7 @@ import {ObsidianMarkdownParser, JSONCanvasParser, oneof } from "https://deno.land/x/macana@v0.2.0/mod.ts"; } from "https://deno.land/x/macana@v0.2.2/mod.ts"; // This works, but you may (probably) want to tune it further const treeBuilder = new DefaultTreeBuilder({
-
@@ -338,7 +338,7 @@ import {// Use file timestamps as creation/update date // (does not work with Git, though) useFileSystemTimestamps, } from "https://deno.land/x/macana@v0.2.0/mod.ts"; } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const treeBuilder = new DefaultTreeBuilder({ defaultLanguage: "en",
-
@@ -359,7 +359,7 @@ Page Builder builds HTML and other assets from a document tree.If you don't like how Macana's default theme builder works, write your own. ```ts import { DefaultThemeBuilder } from "https://deno.land/x/macana@v0.2.0/mod.ts"; import { DefaultThemeBuilder } from "https://deno.land/x/macana@v0.2.2/mod.ts"; const pageBuilder = new DefaultThemeBuilder({ siteName: "<YOUR WEBSITE TITLE>",
-