Skip to content

Releases

v17.4.0

Choose a tag to compare

@mrueg mrueg released this 26 Nov 00:14

What's Changed

  • build(docker): add an emoji font by @modax in #1287
  • fix(testing): isolate default configuration in CLI tests by @BenjaminShinar in #1285
  • fix(transformer): read a directive from one node, not from joined text by @mrueg in #1250
  • build(deps): bump golang.org/x/net from 0.62.0 to 0.63.0 by @dependabot[bot] in #1292
  • build(deps): bump golang from 1.27.3 to 1.27.4 by @dependabot[bot] in #1289
  • build(deps): bump github.com/chromedp/chromedp from 0.23.0 to 0.24.0 by @dependabot[bot] in #1290
  • build(deps): bump github.com/chromedp/cdproto from 0.160.1 to 0.160.7 by @dependabot[bot] in #1291
  • feat(mark): SetLogLevel for programs publishing through the library by @jchorl in #1294
  • build(deps): bump DavidAnson/markdownlint-cli2-action from 25.0.0 to 25.1.0 by @dependabot[bot] in #1298
  • build(deps): bump github.com/chromedp/cdproto from 0.160.7 to 0.160.8 by @dependabot[bot] in #1299
  • build(deps): bump github.com/bmatcuk/doublestar/v4 from 4.10.4 to 4.10.7 by @dependabot[bot] in #1300
  • feat(mark): log a run to the zerolog logger in its context by @mrueg in #1296
  • fix(publish): keep one page per document when titles change hands, collide or change case by @mrueg in #1252
  • feat(parser): support collapsed ??? and ???+ admonitions (#648) by @flojon in #1135
  • fix: normalise what --title-append-generated-hash and --parents take (case, trimming) by @mrueg in #1301
  • fix(tracking): rename a retitled directory page in place by @mrueg in #1302
  • docs(page-tree): a directory's page is renamed too when its hash changes by @mrueg in #1303
  • build(deps): bump the direct and golang.org/x modules by @mrueg in #1304
  • feat(page): add --folder-title-append-generated-hash by @hunortakacs in #1288
  • fix(confluence): delete orphans through v2 on the scoped-token gateway by @jchorl in #1293

New Contributors

Full Changelog: v17.3.1...v17.4.0

v17.3.1

Choose a tag to compare

@mrueg mrueg released this 18 Nov 18:15

What's Changed

  • fix(parser): publish the text of a macro parameter as written by @mrueg in #1260
  • test(mark): compare paths the way Windows spells them by @flojon in #1283
  • test(fspath): read // as a UNC prefix on Windows by @flojon in #1280
  • fix(mark): keep --on-orphan to the run's space by @mrueg in #1263
  • build: check source out with LF on every platform by @flojon in #1284
  • fix(manifest): keep a directory page's key the same on Windows by @flojon in #1281
  • test(mark): run the partial-run path tests on Windows by @flojon in #1282
  • fix(page): skip links to files that are not Markdown (#732) by @flojon in #1273

Full Changelog: v17.3.0...v17.3.1

v17.3.0

Choose a tag to compare

@mrueg mrueg released this 17 Nov 09:55

What's Changed

  • fix(mermaid): bound the start of the diagram browser by @mrueg in #1259
  • fix(metadata): read a front matter number as the text it was written as by @mrueg in #1255
  • fix(export): keep export time in step with the page for repeated @Date( and deep nesting by @mrueg in #1261
  • fix(publish): refuse a --url that names a page without its id by @mrueg in #1257
  • fix(export): write attachments under names publishing reads as that file by @mrueg in #1246
  • fix(mark): check Rendering.ImageAlign and Features before anything is published by @mrueg in #1256
  • fix(confluence): read a page in the trash as not found through v2 by @mrueg in #1249
  • fix(page): refuse a recursive delete that would trash the space homepage by @mrueg in #1267
  • fix(publish): --no-overwrite keeps mark's own write as its baseline and leaves a skipped page where it is by @mrueg in #1248
  • fix(comments): keep a comment whose text runs through inline markup by @mrueg in #1265
  • fix(transformer): keep an escaped
    tag as text by @mrueg in #1253
  • fix(manifest): read a space key without regard to case by @mrueg in #1266
  • fix(orphans): leave the space homepage and the manifest page alone by @mrueg in #1268
  • fix(tracking): record a directory's page only when mark created it by @mrueg in #1262
  • fix(mdsource): read footnote and definition continuations as text, not code by @mrueg in #1254
  • fix(manifest): keep a page another tracked path still publishes by @mrueg in #1264
  • fix(manifest): save a shard another run wrote first, and the rest when one write fails by @mrueg in #1245
  • test(export): build the OKF index plan with filepath.Join by @flojon in #1270
  • fix(confluence): fail a write that a redirect turned into a read by @mrueg in #1251
  • fix(export): keep relative addresses and trailing line breaks as the page had them by @mrueg in #1247
  • fix(manifest): leave a shard that cannot be read again, and stop at a read that got no answer by @mrueg in #1275
  • build(deps): bump github.com/yuin/goldmark/v2 from 2.1.15 to 2.1.16 by @dependabot[bot] in #1279
  • build(deps): bump golang.org/x/text from 0.43.0 to 0.44.0 by @dependabot[bot] in #1278
  • build(deps): bump golang.org/x/mod from 0.42.0 to 0.43.0 by @dependabot[bot] in #1276
  • build(deps): bump github.com/chromedp/cdproto from 0.159.2 to 0.160.1 by @dependabot[bot] in #1277
  • feat(attachment): let a caller narrow the attachment boundary with an attachment root by @mrueg in #1242
  • fix(parser): end an admonition with no indented body at its title by @mrueg in #1258

Full Changelog: v17.2.0...v17.3.0

v17.2.0

Choose a tag to compare

@mrueg mrueg released this 12 Nov 10:06

What's Changed

  • fix(export): keep attachment names clear of names git keeps for itself by @mrueg in #1236
  • fix(export): make text that reads like a directive round-trip as written by @mrueg in #1237
  • feat(report): write the run report to a writer of its own by @mrueg in #1240
  • fix: reject login pages in attachment downloads by @tridev-tej in #1172
  • feat(report): record each document of a compile or a plain dry run by @mrueg in #1239
  • feat(mark): publish documents from memory with an explicit manifest key by @mrueg in #1231
  • fix(lazy): let a concurrent Close wait for the first one to finish by @grobelr in #1244
  • fix(manifest): hold a manifest's entries to the space it belongs to by @mrueg in #1238
  • fix(confluence): skip --edit-lock on a page already locked, and retry its 500s by @orshih6 in #1243

New Contributors

Full Changelog: v17.1.0...v17.2.0

v17.1.0

Choose a tag to compare

@mrueg mrueg released this 11 Nov 00:03

What's Changed

  • build(deps): Bump github.com/chromedp/chromedp from 0.21.0 to 0.23.0 by @dependabot[bot] in #1204
  • build(deps): Bump github.com/dreampuf/mermaid.go from 0.5.2 to 0.7.0 by @dependabot[bot] in #1206
  • build(deps): Bump github.com/chromedp/cdproto from 0.159.1 to 0.159.2 by @dependabot[bot] in #1205
  • fix(confluence): extend an operation nobody restricts without panicking by @mrueg in #1209
  • feat(report): map reported file paths back to their source by @mrueg in #1207
  • fix(page): report a missing parent or tree root instead of panicking by @mrueg in #1210
  • fix(attachment): match attachment patterns only against what the document wrote by @mrueg in #1211
  • fix(page): take an orphan whose page is already gone as handled by @mrueg in #1216
  • fix(tracking): keep the --no-overwrite baseline across a file rename by @mrueg in #1214
  • fix(tracking): match directory pages to ancestors by title by @mrueg in #1215
  • fix(report): set no source on a document that is its own by @mrueg in #1219
  • fix(links): resolve a linked document's title as publishing it would by @mrueg in #1212
  • fix(page): let --orphan-under name a folder by @mrueg in #1217
  • fix(comments): place inline-comment markers only in page text, however it is spelled by @mrueg in #1213
  • fix(mark): validate the manifest prefix before the run starts by @mrueg in #1220
  • feat(confluence): export QuoteCQL for building CQL string literals by @mrueg in #1222
  • feat(mark): keep each file's error under --continue-on-error by @mrueg in #1218
  • feat(report): carry document warnings as structured data by @mrueg in #1208
  • feat(confluence): export SameInstance, the check that a URL is on the configured instance by @mrueg in #1224
  • fix(util): refuse a publish --url that is not on the configured instance by @mrueg in #1228
  • fix(confluence): keep relative attachment downloads on the configured server by @mrueg in #1230
  • feat(metadata,parser): write headers, front matter and mentions safely from untrusted text by @mrueg in #1227
  • feat(links): resolve a staged document's links against its source tree by @mrueg in #1225
  • feat(export): return the title and document, and export the body alone by @mrueg in #1223
  • feat(tracking): publish untracked where the manifest page is missing by @mrueg in #1226
  • feat(tracking): add --partial for runs that publish only some files by @mrueg in #1221
  • fix(d2): read diagram imports from the document's directory, inside its project by @mrueg in #1233
  • fix(publish): hold a document to the project like the files it names by @mrueg in #1232
  • fix: warn the right documents of shared parents and pages, and keep MissingLink.String safe by @mrueg in #1235
  • fix(chrome): draw diagrams and formulas without network access by @mrueg in #1234

Full Changelog: v17.0.0...v17.1.0

v17.0.0

Choose a tag to compare

@mrueg mrueg released this 05 Nov 10:45

mark v17 is a major release. It makes admonitions predictable, adds an export to the Open Knowledge Format, tightens how settings are read, and gives the Go library a cleaned-up API.

Most command-line users need only a few small changes; see Before you upgrade and the full upgrade guide.

Highlights

Admonitions you can predict

A blockquote now becomes a Confluence info, tip, note or warning box only when you ask for one: a word and a colon at the start of its first line (> Note: …, > **Warning:** …). A quote that merely starts with "Note that …" stays a quote.

Each word now has one colour, whether you write it as > Word:, as a GitHub alert (> [!WORD]) or as an MkDocs admonition (!!! word). The colours follow what GitHub and MkDocs Material show:

Colour Words
Blue note, info, important (MkDocs also: abstract, summary, tldr, todo)
Green tip, hint (MkDocs also: success, check, done)
Yellow warning, warn, attention
Red caution, danger (MkDocs also: error, failure, fail, missing, bug)

MkDocs admonition types now match in any case, so !!! Note works.

Export to the Open Knowledge Format

mark export --format okf writes a page as an OKF concept, and --recursive writes a whole tree as an OKF bundle, with an index.md per directory, relative links between pages and the attachments alongside. mark export --metadata frontmat ter writes the page's metadata as YAML front matter instead of header comments.

One page URL for publish and export

--url (MARK_PAGE_URL, url in the configuration file) names the page for both mark publish and mark export.

Settings that do what you typed

  • A typo in the configuration file is reported instead of silently ignored: unknown key in configuration file "mark.toml": "spcae" (did you mean "space"?).
  • A setting you type on the command line now wins over a conflicting one from the environment or the configuration file. mark export --page-id 123 works in a CI job that sets MARK_PAGE_URL for publishing, and mark export --space DOCS -r exports the whole space instea
    d of the configured page.

Code blocks that highlight on Data Center

Common language aliases that one Confluence platform doesn't know are mapped to the name it uses, so a fence like ```sh renders highlighted on Data Center instead of failing.

A Go API for v17

For programs built on mark's packages:

  • mark.Publisher publishes many files with one browser and one folder cache.
  • Settings are options structs instead of long argument lists.
  • Every call that reaches Confluence takes a context.Context.
  • Enumerated settings have named types.
  • mark builds on goldmark v2.
  • The Confluence client is an in-repo net/http client with typed errors (errors.Is(err, confluence.ErrNotFound)).
  • Nothing is package-level state any more, so two runs in one process no longer share a browser or a folder cache.

Before you upgrade

  • Run mark publish, not mark alone: publishing without a command was removed.
  • Rename --target-url/MARK_TARGET_URL/target-url to --url/MARK_PAGE_URL/url, export's MARK_URL to MARK_PAGE_URL, and --math-format/MARK_MATH_FORMAT/math-format to --math-output/MARK_MATH_OUTPUT/math-output. A url in a shared configuration
    file now steers publish too.
  • Fix unknown keys in your configuration file: they are now an error.
  • Check your admonitions. > Note: is now blue (was yellow), > Warning: and > Warn: yellow (was red), MkDocs !!! note blue (was yellow) and !!! warning yellow (was red). Write > Caution: or > Danger: for red. A quote without the colon is no longer a box.
  • Content-Appearance accepts only full-width, default and max; anything else, fixed included, is an error.
  • attachment://path links are no longer resolved; write the path itself.
  • Go programs import github.com/kovetskiy/mark/v17 and follow the upgrade guide.

Fixes

  • Exporting a page whose title or attachment names are very long no longer fails with "file name too long".
  • A recursive export checks every file it would overwrite before writing anything, instead of failing halfway through a tree.
  • An attachment upload that Confluence answers as plain text is no longer reported as failed.
  • With the edit lock on, a page is restricted to the user mark logs in as.
  • A colon marker inside inline code or an image's alt text no longer turns a quote into a box.
  • A failed first file no longer blocks the rest of a single-page (--page-id) run.
  • Stopping a run no longer waits for a headless browser that is still starting.
  • mark --version names a go install build by its release, and a checkout build by its commit, marked +dirty when the tree had changes.

Full changelog: v16.25.0...v17.0.0

What's Changed

  • refactor(markdown)!: remove the legacy compile path by @mrueg in #1149
  • build(deps): move to goldmark v2 by @mrueg in #1106
  • feat(renderer): map code block language aliases to Confluence's names by @mrueg in #1129
  • refactor(confluence)!: replace gopencils with an in-repo HTTP client by @mrueg in #1105
  • refactor(stdlib)!: look users up through an interface by @mrueg in #1167
  • refactor(util)!: drop publishing with no command by @mrueg in #1161
  • refactor(attachment)!: move the upload side to the publishing package by @mrueg in #1168
  • refactor(syntax)!: share publish/export Markdown syntax via internal/syntax by @mrueg in #1169
  • refactor(metadata)!: move raw-source helpers into internal/mdsource by @mrueg in #1164
  • test(util): move the --continue-on-error batch test out of markdown by @mrueg in #1165
  • refactor(report)!: move orphan actions to report, tiny links to confluence by @mrueg in #1170
  • fix(attachment)!: take an attachment:// link as the URL it is by @mrueg in #1163
  • fix(metadata)!: refuse a Content-Appearance mark does not know by @mrueg in #1166
  • feat(export)!: write the Open Knowledge Format with --format okf by @mrueg in #1171
  • feat(export): write the metadata as YAML front matter with --metadata front-matter by @mrueg in #1174
  • fix(export): keep a long title's file name within the file system's limit by @mrueg in #1177
  • feat(export): report labels and declared attachments in export.Result by @mrueg in #1173
  • fix(export): name an app's edits as a process in OKF, not a person by @mrueg in #1178
  • fix(export): keep a title's trailing # in an OKF index heading by @mrueg in #1175
  • fix(export): refuse a tree's existing attachments before writing anything by @mrueg in #1176
  • refactor!: give each run its own state, and group mark.Config's fields by @mrueg in #1162
  • refactor(renderer)!: drop the deprecated admonition aliases by @mrueg in #1179
  • refactor(export)!: give the format and metadata options their own types by @mrueg in #1180
  • refactor(metadata)!: take ExtractMeta's settings as an options struct by @mrueg in #1181
  • build!: move the module to github.com/kovetskiy/mark/v17 by @mrueg in #1068
  • refactor(markdown)!: declare package markdown and replace types.MarkConfig with markdown.Options by @mrueg in #1182
  • fix(page): LinkChecker race; refactor: one feature list and rendering rules by @mrueg in #1183
  • test(markdown): declare features_test.go in package markdown by @mrueg in #1187
  • refactor!: split mark.Config into run and publish settings by @mrueg in #1184
  • refactor!: take positional flags as option structs, and give the diagram renderers a context by @mrueg in #1185
  • feat(cli)!: refuse unknown keys in the configuration file by @mrueg in #1189
  • fix(build): describe what the Makefile passes for the version by @mrueg in #1190
  • fix(export): write emoji in OKF front matter as themselves by @mrueg in #1192
  • refactor!: NewAPI options, drop IsCloud, typed enums by @mrueg in #1186
  • refactor(markdown)!: take a context in CompileMarkdown by @mrueg in #1193
  • docs: say why in the math renderer and metadata comments by @mrueg in #1194
  • fix(cli): list unknown configuration keys on one line by @mrueg in #1199
  • perf(renderer): compile the blockquote patterns once by @mrueg in #1195
  • fix(export): keep attachment fi...
Read more

v16.25.0

Choose a tag to compare

@mrueg mrueg released this 02 Nov 20:02

What's Changed

  • refactor(test): group page's tests by the file they cover by @mrueg in #1150
  • feat(cli): give every shared argument the same short flag by @mrueg in #1151
  • fix(export): six findings from the #1068 review by @mrueg in #1152
  • build(deps): bump github.com/chromedp/cdproto from 0.158.4 to 0.158.6 by @dependabot[bot] in #1157
  • build(deps): bump go.yaml.in/yaml/v3 from 3.0.5 to 3.0.6 by @dependabot[bot] in #1159
  • build(deps): bump github.com/yuin/goldmark from 1.8.6 to 1.8.7 by @dependabot[bot] in #1156
  • build(deps): bump DavidAnson/markdownlint-cli2-action from 24.2.0 to 25.0.0 by @dependabot[bot] in #1154
  • build(deps): bump golang.org/x/net from 0.61.0 to 0.62.0 by @dependabot[bot] in #1155
  • build(deps): bump github.com/bmatcuk/doublestar/v4 from 4.10.3 to 4.10.4 by @dependabot[bot] in #1158

Full Changelog: v16.24.0...v16.25.0

v16.24.0

Choose a tag to compare

@mrueg mrueg released this 27 Oct 00:55

What's Changed

  • docs: split the README into topic pages under docs/ by @mrueg in #1125
  • feat(cli): add an experimental page command by @mrueg in #1126
  • feat(export): export a tree of pages with --recursive by @mrueg in #1127
  • fix: refuse a title longer than Confluence's 255 characters up front by @mrueg in #1131
  • fix(confluence): don't cache a 404 from the user search as a missing user by @XuYui in #1136
  • fix(includes): keep macro bodies in an included file from the include's template pass (#587) by @flojon in #1134
  • feat(export): read short links, and rewrite pasted page URLs as relative links by @mrueg in #1130
  • feat: mark doctor checks the connection, the login and a space's permissions by @mrueg in #1139
  • feat(confluence): retry a write Confluence was unavailable for, once it did not land by @mrueg in #1137
  • build(deps): bump merman to 0.9.2 by @mrueg in #1140
  • feat(publish): --watch=false stops the account watching the pages it writes by @mrueg in #1138
  • fix(attachment): treat ./x and x as the same file by @flojon in #1133
  • fix(mark): rename a tracked parent in place when it and its child are retitled together (#1114) by @flojon in #1132
  • docs: document --target-url, --parents and --content-appearance, and list every package by @mrueg in #1142
  • fix(publish): refuse --target-url with more than one file by @mrueg in #1143
  • refactor: split mark.go into files by concern by @mrueg in #1144
  • refactor(test): group the root package's tests by topic by @mrueg in #1145
  • refactor: move the root package's self-contained concerns into packages by @mrueg in #1146
  • refactor(test): rename the root's label and hierarchy tests by @mrueg in #1147
  • refactor: split processFile into its pipeline stages by @mrueg in #1148

New Contributors

Full Changelog: v16.23.0...v16.24.0

v16.23.0

Choose a tag to compare

@mrueg mrueg released this 23 Oct 14:19

What's Changed

  • test: make the rest of the suite pass on Windows by @flojon in #1098
  • build(deps): bump golang from 1.27.1 to 1.27.2 by @dependabot[bot] in #1111
  • build(deps): bump github.com/chromedp/cdproto from 0.157.10 to 0.158.1 by @dependabot[bot] in #1112
  • fix(test): hash the slash-normalised path when looking up a manifest shard by @flojon in #1118
  • build(deps): bump github.com/chromedp/cdproto from 0.158.1 to 0.158.3 by @dependabot[bot] in #1120
  • fix(confluence): reject an empty UpdateAttachment response by @amlaban65 in #1119
  • fix(page): validate a page's ancestry without regard to case by @flojon in #1109
  • fix(confluence): key the page cache and the fake's titles without regard to case by @mrueg in #1121
  • feat(header): add --page-header, a template placed atop every page by @flojon in #1071
  • fix(confluence): identify the platform once, before publishing by @flojon in #1117
  • fix(confluence): back off on zero retry-after by @jay23606 in #1122
  • feat(util): switch off every optional feature with --features none by @mrueg in #1123
  • feat(table): set column widths with a Column-Widths comment (#804) by @flojon in #1085
  • build(deps): move to Go 1.27.3, mermaid.go v0.5.2 and cdproto v0.158.4 by @mrueg in #1124
  • feat(cli): add a publish subcommand by @mrueg in #1066
  • feat(export): export a Confluence page to Markdown by @mrueg in #1067
  • feat(metadata): set page restrictions from front matter by @michaelxmora in #1010

New Contributors

Full Changelog: v16.22.0...v16.23.0

v16.22.0

Choose a tag to compare

@mrueg mrueg released this 12 Oct 21:02

What's Changed

  • fix(confluence): edit-lock to the own login when Cloud hides its email by @mrueg in #1100
  • fix(macro): substitute captures in templates an inline body defines by @mrueg in #1101
  • fix(transformer): close omitted end tags inside details by @mrueg in #1102
  • fix(hierarchy): hash a directory's page where its children name it too by @mrueg in #1103
  • fix(manifest): refuse a second space on a --manifest-page id by @mrueg in #1104
  • fix(confluence): don't ask for child folders outside Cloud by @junkiebev in #1092
  • fix(macro): upload the file a macro names in its Attachment key (#365) by @flojon in #1084
  • feat(dry-run): report which pages would change under --changes-only (#731) by @flojon in #1083
  • build(deps): bump mermaid.go to v0.5.1 and chromedp to v0.21.0 by @mrueg in #1108
  • fix(dry-run): match a declared parent's title without regard to case by @flojon in #1107

Full Changelog: v16.21.0...v16.22.0

⌂ 换网址