Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bundle] Adds anchor tags for headings and bullets #612

Merged
merged 1 commit into from
Dec 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bundle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Filesystem Bundle
# <a name="filesystemBundle" />Filesystem Bundle

## Container Format
## <a name="containerFormat" />Container Format
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to add anchors to the headers, since both GitHub and Pandoc agree on the auto-generated container-format anchor (and likewise for other headers):

$ curl -Ls https://github.com/opencontainers/runtime-spec/releases/download/v1.0.0-rc2/oci-runtime-spec-1.0.0-rc2.html | grep 'Container Format'
<h2 id="container-format">Container Format</h2>

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed PR separates the anchor tag from the header text.

This follows the recommendation from the Open API Initiative (formerly Swagger) which.

I'm hesitant to use the auto-generated anchor links from GitHub since we might change the header text (ex: adding section numbers like "4.1 Container Format" and that would change the auto-generated anchor links.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think link stability is a major issue, because folks referencing the spec should be pinning their reference to a particular version (like this). If we change the header later on, that link (pinned to v1.0.0-rc2) will still work. Even if you do attempt to provide a stable anchor between spec releases, sometimes the section will go away, or get moved to a different file, or be split into two sections, or whatever. In all of those cases the old unpinned link will no longer work regardless of any attempt at freezing the anchor. Do we really expect lots of churn in header text but minimal churn in the section or file structure?

That said, if folks do expect significant churn in header text and are happy to nip that in the bud by adding these headers to all of our existing sections, more power to 'em ;).


This section defines a format for encoding a container as a *filesystem bundle* - a set of files organized in a certain way, and containing all the necessary data and metadata for any compliant runtime to perform all standard operations against it.
See also [OS X application bundles](http://en.wikipedia.org/wiki/Bundle_%28OS_X%29) for a similar use of the term *bundle*.
Expand All @@ -10,11 +10,11 @@ The definition of a bundle is only concerned with how a container, and its confi
A Standard Container bundle contains all the information needed to load and run a container.
This MUST include the following artifacts:

1. `config.json`: contains configuration data.
1. <a name="containerFormat01" />`config.json`: contains configuration data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These anchors look good to me, although I think we should stick to the lowercase, hyphenated form that GitHub and Pandoc are using already for headers. In that case, the name here would be container-format-01.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to actually not be hyphenated so we can distinguish them from github/pandoc anchors?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to actually not be hyphenated so we can distinguish them from github/pandoc anchors?

If we're going to anchor everything independently of GitHub / Pandoc, I'd rather just use a language that adds anchors for us (#615). If we stick with Markdown, I'd rather use the GitHub / Pandoc anchors where they're generated, and only add occasional manual anchors where needed.

If you're worried about conflicts between manual and auto-generated anchors, I think having a consistent fragment style is more important. Just chose anchor names that are unlikely to be autogenerated from slugs.

This REQUIRED file MUST reside in the root of the bundle directory and MUST be named `config.json`.
See [`config.json`](config.md) for more details.

2. A directory representing the root filesystem of the container.
2. <a name="containerFormat02" />A directory representing the root filesystem of the container.
While the name of this REQUIRED directory may be arbitrary, users should consider using a conventional name, such as `rootfs`.
This directory MUST be referenced from within the `config.json` file.

Expand Down