Antora issueshttps://gitlab.com/antora/antora/-/issues2022-02-18T11:01:23Zhttps://gitlab.com/antora/antora/-/issues/292Make edit URL pattern configurable2022-02-18T11:01:23ZDan AllenMake edit URL pattern configurableThere are far too many git hosts, including enterprise and personal ones, for us to be able to get the edit URL right in all cases. Therefore, the edit URL pattern should be configurable as part of the content source in the playbook via ...There are far too many git hosts, including enterprise and personal ones, for us to be able to get the edit URL right in all cases. Therefore, the edit URL pattern should be configurable as part of the content source in the playbook via the `edit_url_pattern` property.
Adding a `edit_url_pattern` property the content source is the easy part. The harder part is figuring out a syntax for the replacements. We need at least two replacements (based on the hosts currently supported):
* ref - the short name of the reference, such as master or v1.0.x
* path - the path from the root of the repository
Although the ref usually comes before the path in the URL, we probably shouldn't make that assumption. Therefore, we probably want named replacements. I propose a simple syntax that resembles AsciiDoc attribute references (since that's our game).
```
content:
sources:
- url: git@pagure.io:fedora-docs/quick-docs.git
edit_url_pattern: https://pagure.io/fedora-docs/quick-docs/blob/{ref}/f/{path}
```
In the future, we might be able to offer a replacement for the qualified repository path (e.g., fedora-docs/quick-docs) to save some typing.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/412Support AsciiDoctor line range filtering for included content2019-10-30T10:50:35ZEric SchneiderSupport AsciiDoctor line range filtering for included contentAntora does not currently support using line ranges with the include directive (`include::[lines=]`). This functionality exists in AsciiDoctor, and should be supported by Antora.
AsciiDoctor syntax can be found here: https://asciidoctor...Antora does not currently support using line ranges with the include directive (`include::[lines=]`). This functionality exists in AsciiDoctor, and should be supported by Antora.
AsciiDoctor syntax can be found here: https://asciidoctor.org/docs/user-manual/#by-line-ranges
Antora currently ignores the `lines` attribute, which usually results in the whole file getting included (unless you specified other attributes such as `tag`).
Note: The Antora 1.0 documentation explicitly calls out the lack of support for filtering by line number: https://docs.antora.org/antora/1.0/asciidoc/include-content/#include-example
However, this explicit callout was lost in the later versions of the documentation.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/374Prune references when pulling content updates2019-10-19T00:43:17ZDan AllenPrune references when pulling content updatesWhen the `--pull` flag is specified, Antora should prune references in the cached repository that have been removed from the remote repository. For example, if a branch has been deleted in the remote repository (such as on GitHub), Antor...When the `--pull` flag is specified, Antora should prune references in the cached repository that have been removed from the remote repository. For example, if a branch has been deleted in the remote repository (such as on GitHub), Antora should remove that branch from the cached repository. As of Antora 2.0.0, it does not. This is a regression from Antora 1.x (as a result of the switch to isomorphic-git).
The workaround is to clean Antora's cache (or the cached folder for the repository in question) so that Antora gets a fresh clone of the repository.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/518Copy edits in features.adoc2019-11-05T21:11:13ZAnthony VanelverdingheCopy edits in features.adoc* your -> you're
* Interchangable -> Interchangeable* your -> you're
* Interchangable -> Interchangeablev2.2.xhttps://gitlab.com/antora/antora/-/issues/514Document edit_url key2019-11-05T21:12:02ZSarah WhiteDocument edit_url keyCover the git-remote-not-local scenarios:
- inherited
- all sources
- individual sources
- falsey
- alternate view
The local-worktree-gitindex-never-remote scenarios may be deferred for post-release.Cover the git-remote-not-local scenarios:
- inherited
- all sources
- individual sources
- falsey
- alternate view
The local-worktree-gitindex-never-remote scenarios may be deferred for post-release.v2.2.xSarah WhiteSarah Whitehttps://gitlab.com/antora/antora/-/issues/513Remove credentials from remote URL retrieved from git config2019-10-28T20:46:29ZDan AllenRemove credentials from remote URL retrieved from git configIn the event the content source is a local git repository, Antora attempts to resolve the remote URL by consulting the git config (path: `remote.origin.url`). This value is then use to assign the src.origin.url property in the file model...In the event the content source is a local git repository, Antora attempts to resolve the remote URL by consulting the git config (path: `remote.origin.url`). This value is then use to assign the src.origin.url property in the file model, and is also used to assign the page-origin-url AsciiDoc attribute. Currently, the embedded credentials are not cleaned from this value. They should be removed to prevent them from being leaked.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/510Modify inheritence rules for content sources in playbook2021-05-01T08:02:56ZDan AllenModify inheritence rules for content sources in playbookThe inheritance rules for content sources in the playbook should be changed so it only considers the key, not the value. If an inheritable key is specified on a content source (e.g., branches, tags, etc), the value of that key should rep...The inheritance rules for content sources in the playbook should be changed so it only considers the key, not the value. If an inheritable key is specified on a content source (e.g., branches, tags, etc), the value of that key should replace the default value. The value itself should not impact the override behavior. A falsy value should work in the same way as a truthy value.
This is not a breaking change since using a falsy value had no effect anyway. Now, the following will work as a way to unset the branches.
```
content:
branches: master
sources:
- url: .
branches: ~
tags: v1.0
```
As it works now, you'd have to specify an empty array for branches (i.e., `[]`) since an empty array is not falsy.
This change is important as we will need this logic to fully support the customizable edit URL (#292).v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/505Make detection of semantic versions more robust2019-10-23T00:15:20ZDan AllenMake detection of semantic versions more robustCurrently, the logic to detect a semantic version is too lenient. As a result, the version sorting can produce unexpected results.
The logic for detecting a semantic version should be as follows:
* In the case the string starts with a ...Currently, the logic to detect a semantic version is too lenient. As a result, the version sorting can produce unexpected results.
The logic for detecting a semantic version should be as follows:
* In the case the string starts with a "v"
* Require the second character to be a number
* Require the string after the "v" to either contain a "." or be parsable as a number
* In the case the string does not start with a "v"
* Require the first character to be a number
* Require the string to either contain a "." or be parsable as a number
Otherwise, treat the version as a name.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/497content-aggregator transformGitCloneError does not preserve original stack2019-11-03T20:19:46ZDavid Jenckscontent-aggregator transformGitCloneError does not preserve original stackThe transformGitCloneError code assumes the incoming error has a message field. On antora/users gitter:
> Hi there. I have problems getting private repository authentication to work (Antora version 2.1) with a git repo on a BitBucket s...The transformGitCloneError code assumes the incoming error has a message field. On antora/users gitter:
> Hi there. I have problems getting private repository authentication to work (Antora version 2.1) with a git repo on a BitBucket server. No matter whether I pass the credentials as environment variable, put them in ~/.git-credentials, or directly in the playbook, I get this error:
Error: Cannot read property 'split' of undefined: https://<host>.com/stash/scm/<project>/<repo>
at transformGitCloneError (/home/<user>/.nvm/versions/node/v11.6.0/lib/node_modules/@antora/site-generator-default/node_modules/@antora/content-aggregator/lib/aggregate-content.js:727:10)
at git.clone.then.catch (/home/<user>/.nvm/versions/node/v11.6.0/lib/node_modules/@antora/site-generator-default/node_modules/@antora/content-aggregator/lib/aggregate-content.js:184:17)
Any ideas what I may be doing wrong?
The line numbers don't match up, but I'd guess this comes from one of the lines
msg = message.replace(/[.:]?\s*$/, '')
In both places in this method where message is assumed, if it's missing the existing info should be output somehow.v2.2.xDavid JencksDavid Jenckshttps://gitlab.com/antora/antora/-/issues/487The page-partial attribute should not be necessary2020-01-17T09:19:36ZDan AllenThe page-partial attribute should not be necessaryCurrently, the page-partial attribute must be added to any page that gets included in another page (whether entirely or via tags) in order to guarantee the source gets included and not the converted output. This attribute is necessary si...Currently, the page-partial attribute must be added to any page that gets included in another page (whether entirely or via tags) in order to guarantee the source gets included and not the converted output. This attribute is necessary since, otherwise, Antora doesn't keep the source of the page around after converting the page. This was done to conserve memory. However, it may be an unnecessary or premature optimization, and it causes confusion for users.
First, test the performance with several large sites to see if keeping the AsciiDoc source around after conversion even affects the memory. If it does, we may have to reconsider this change, or figure out how to localize it.
The source should still be purged in the default pipeline after all pages have been converted.
The workaround is to set `page-partial` in the playbook, which sets the attribute by default on all pages. If we determine that setting it by default is too costly, document this workaround.
Note that this change will not break any existing sites that already set page-partial per page (aka a la carte). That attribute will simply be ignored.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/476Upgrade isomorphic-git to 0.652019-11-02T21:40:41ZDan AllenUpgrade isomorphic-git to 0.65The isomorphic-git upgrade was held back because the new index cache was breaking tests. The impact of this change turned out to be scoped to the test harness, not the behavior of Antora. Therefore, we can proceed with the upgrade.
This...The isomorphic-git upgrade was held back because the new index cache was breaking tests. The impact of this change turned out to be scoped to the test harness, not the behavior of Antora. Therefore, we can proceed with the upgrade.
This upgrade will enable #374 to be implemented.v2.2.xDan AllenDan Allenhttps://gitlab.com/antora/antora/-/issues/219Generate a robots.txt file2019-11-02T21:40:41ZDan AllenGenerate a robots.txt fileAntora should be capable of generating a robots.txt file. While this is something the UI can handle (using static files), it seems reasonable to offer this as a core feature as well.
By default, this feature is disabled. If the followin...Antora should be capable of generating a robots.txt file. While this is something the UI can handle (using static files), it seems reasonable to offer this as a core feature as well.
By default, this feature is disabled. If the following key is set in the playbook file, an "all access" robots.txt file will be added to the root of the site:
```yml
site:
robots: true
```
Alternately, this key can be used to specify the contents of the robots.txt file:
```yml
site:
robots: |-
User-agent: *
Disallow: /secret-component/
```
The robots.txt file will be added to the site catalog, perhaps by the site mapper (since this is a site map concern).v2.2.xDavid JencksDavid Jencks