Skip to content

Documentation UI changes for the overhaul #2

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

Merged
merged 52 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f5a97a5
replace default branch name with HEAD
mojavelinux Oct 6, 2021
318b429
set docs version to ~ to indicate it is versionless
mojavelinux Oct 6, 2021
ec2bd39
update terminology for referring to the default branch
mojavelinux Oct 6, 2021
b585998
revert value of version key since docs are still built using Antora 2
mojavelinux Oct 6, 2021
07c0b62
document the page.author property in the UI model
mojavelinux Oct 22, 2021
b16ed93
set docs version to ~
mojavelinux Nov 22, 2021
0cd58ad
Added font dependency / Changed font to Titillium Web
Dec 5, 2021
fa9aed2
Color adjustments
Dec 5, 2021
c43fa89
Further color adjustments
Dec 5, 2021
2394c7d
custom bundle yaml
Dec 6, 2021
30796b2
fixed lint errors
Dec 6, 2021
a6cb34a
logo and favicon
Dec 6, 2021
77216cb
stackable logo + doc link in header
Dec 6, 2021
09ab277
sub navbar
Dec 6, 2021
6363b2e
contact button
Dec 6, 2021
2e87841
hide explore panel
Dec 6, 2021
ea52ea2
expandable sub nav
Dec 7, 2021
65f3069
fixed lint errors
Dec 7, 2021
178eda2
assume value of toctitle page attribute is already escaped
mojavelinux Dec 13, 2021
279feda
add search input behind a flag
mojavelinux Dec 17, 2021
b107c15
merge !153
mojavelinux Dec 17, 2021
b5bc2f5
look for env.SITE_SEARCH_PROVIDER instead of env.SITE_SEARCH_ENABLED
mojavelinux Dec 18, 2021
495d0da
include search-scripts partial if SITE_SEARCH_PROVIDER env var is set
mojavelinux Dec 19, 2021
dbe01a4
Lunr search input field integration
Dec 22, 2021
4e154fe
Lunr search css integration
Dec 22, 2021
e012e8e
Lunr search css adjusments
Dec 22, 2021
fb15172
resolves #181 prevent overscroll event in scrollable region from bubb…
mojavelinux Dec 23, 2021
a1cabf8
merge !154
mojavelinux Dec 23, 2021
5778ee3
clarify that canonical URL is only set if site.url is an absolute URL
mojavelinux Dec 24, 2021
ca20e38
change template-variables-table ID to template-variables-ref
mojavelinux Dec 24, 2021
2c2f7f5
apply font weight bold to h4
mojavelinux Dec 24, 2021
fa7e113
dropdown menu
Dec 28, 2021
266e501
fixed lint errors
Dec 30, 2021
c4855c0
document the site.homeUrl property in the UI model; clarify how it di…
mojavelinux Jan 14, 2022
f9c99e5
drop check for outdated siteRootUrl property; document using siteRoot…
mojavelinux Jan 14, 2022
a6ea738
assume special chars in description and keywords are already escaped;…
mojavelinux Jan 14, 2022
07639c7
upgrade UI preview to Asciidoctor.js 2
mojavelinux Jan 15, 2022
ff24d11
fix clone command on set up page so it works with copy to clipboard
mojavelinux Jan 26, 2022
c18a50a
custom landing page
Feb 13, 2022
7620f36
custom landing page
Feb 13, 2022
e06a6b0
update dependency lock file
mojavelinux Feb 17, 2022
8e9cd22
upgrade gulp-stylelint so dependencies can be installed on Node.js 16
mojavelinux Feb 17, 2022
3a08a43
Style the search bar when disabled
ggrossetie Feb 15, 2022
8af287d
merge !155
mojavelinux Feb 17, 2022
7adf9e0
re-enabled pushing ui bundle to git
Feb 21, 2022
1b1643a
Update content
lfrancke Feb 21, 2022
7884f1d
Same format of "videoblack" as "imageblock" (#184)
edward-encoord Feb 22, 2022
b037733
add vertical-align middle to video iframe; remove margin on video tit…
mojavelinux Feb 22, 2022
2fa9a5c
merge !157
mojavelinux Feb 22, 2022
65874bb
Merge remote-tracking branch 'upstream/master' into sven-wip
lfrancke Feb 24, 2022
d2705a8
Resolve merge conflicts
lfrancke Feb 24, 2022
60948a6
Various updates
lfrancke Feb 24, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
--fail
-u 'github:${{ secrets.NEXUS_PASSWORD }}'
--upload-file ./build/ui-bundle.zip
"https://repo.stackable.tech/repository/misc/ui-bundle.zip"
"https://repo.stackable.tech/repository/misc/antora-ui-bundle.zip"
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It's intentionally minimalistic so as to give you a good starting point without

== Code of Conduct

The Antora project and its project spaces are governed by our https://gitlab.com/antora/antora/-/blob/master/CODE-OF-CONDUCT.adoc[Code of Conduct].
The Antora project and its project spaces are governed by our https://gitlab.com/antora/antora/-/blob/HEAD/CODE-OF-CONDUCT.adoc[Code of Conduct].
By participating, you're agreeing to honor this code.
Let's work together to make this a welcoming, professional, inclusive, and safe environment for everyone.

Expand All @@ -41,7 +41,7 @@ If you want to simply use the default UI for your Antora-generated site, add the
----
ui:
bundle:
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
snapshot: true
----

Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: antora-ui-default
title: Antora Default UI
version: master
version: ~
nav:
- modules/ROOT/nav.adoc
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/development-workflow.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// This section provides information about some of the UI files you'll be modifying and how to prepare and submit those changes.

All changes pushed to a UI project's master branch can trigger a new release (not described here).
All changes pushed to a UI project's default branch can trigger a new release (not described here).
Therefore, you want to make your changes to a development branch and submit it as a pull request (PR) to be approved.
(Even better would be to issue the PR from a fork).
Only when the PR is approved and merged will the new release be triggered.
Expand All @@ -11,7 +11,7 @@ Only when the PR is approved and merged will the new release be triggered.

Use the following command to create a local development branch named `name-me`:

$ git checkout -b name-me -t origin/master
$ git checkout -b name-me -t origin/HEAD

You'll then apply your changes to the UI files.
Once you're done making changes, commit those changes to the local branch:
Expand All @@ -26,6 +26,6 @@ Finally, navigate to your UI project in your browser and create a new pull reque

The maintainer of the UI should review the changes.
If the changes are acceptable, the maintainer will merge the pull request.
As soon as the pull request is merged into master, an automated process will take over to publish a new release for the site generator to use.
As soon as the pull request is merged into the default branch, an automated process will take over to publish a new release for the site generator to use.

Now that you've got the process down, let's review some of the files you'll be working with in more detail.
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ The most common postprocessor backports newer CSS features to older browsers by

== UI project versus UI bundle

The [.term]*UI project*, the master branch of a git repository, contains the recipe and raw materials for creating an Antora UI bundle.
The [.term]*UI project*, which is comprised of the source files in the git repository, provides the recipe and raw materials for creating an Antora UI bundle.
It includes a build, source files, project files, and dependency information.
This is your development workspace.

The [.term]*UI bundle*, a distributable archive, provides pre-compiled (interpreted, consolidated, and/or minimized) files that are ready to be used by Antora.

=== UI project repository structure (master branch)
=== UI project repository structure (default branch)

You should think of the UI project's master branch as your UI workspace.
You should think of the UI project's default branch as your UI workspace.
It contains the recipe and raw materials for creating a UI, including a build, source files, project files, and dependency information.

Here's how the files are structured in the UI project:
Expand Down Expand Up @@ -133,7 +133,7 @@ The UI bundle--a distributable archive--provides files which are ready to be use
When the UI project files are built by Gulp, they are assembled under the [.path]_public_ directory.
Since the [.path]_public_ directory is generated, it's safe to remove.

The contents of the UI bundle resembles the UI project's master branch contents, except the bundle doesn't contain any files other than the ones that make up the UI.
The contents of the UI bundle resembles the UI project's default branch contents, except the bundle doesn't contain any files other than the ones that make up the UI.
This is the content that is used by Antora.

[.output]
Expand Down Expand Up @@ -174,7 +174,7 @@ The purpose of an Antora UI project is to get the UI files into a state that Ant

The UI is served statically in a production site, but the UI's assets live in a source form in a UI project to accommodate development and simplify maintenance.
When handed off to the Antora pipeline, the UI is in an interim, pre-compiled state.
Specifically, the master branch of the git repository contains the files in source form while releases are used to distribute the files in pre-compiled form.
Specifically, the default branch of the git repository contains the files in source form while releases are used to distribute the files in pre-compiled form.

The responsibility of compiling the UI is shared between a UI project and Antora.
The UI project uses a local build to pre-compile (i.e., interpret, consolidate, and/or minimize) the files.
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/set-up-project.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ The sources can be {url-project}[Antora's default UI] or an existing UI project
To start, clone the default UI project using git:

[subs=attributes+]
$ git clone {url-project} &&
cd "`basename ${_%.git}`"
$ git clone {url-project}
$ cd "`basename ${_%.git}`"

The example above clones Antora's default UI project and then switches to the project folder on your filesystem.
Stay in this project folder in order to initialize the project using npm.
Expand Down
17 changes: 13 additions & 4 deletions docs/modules/ROOT/pages/templates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Variable names and purposes may change.
Here's an overview of the available UI model:

.Variables available to the Handlebars templates (top-level variables in bold)
[#template-variables-table,cols="1m,2"]
[#template-variables-ref,cols="1m,2"]
|===
| Name | Description

Expand All @@ -36,6 +36,7 @@ s| [[site]]site

| site.url
| The base URL of the site, if specified in the playbook.
If a site start page is defined, the visitor will be redirected from this location to the start page.

| site.path
| The pathname (i.e., subpath) of the site.url under which the site is hosted (e.g., /docs).
Expand All @@ -47,6 +48,9 @@ Can be prepended to `page.url` to create a root-relative URL for a page (e.g., `
| site.title
| The title of the site.

| site.homeUrl
| The URL that points directly to the start (aka home) page of the site.

| site.components
| A map of all the components in the site, keyed by component name.
Properties of each component include name, title, url, latest, and versions.
Expand Down Expand Up @@ -80,6 +84,9 @@ For example, the value of the document attribute named `page-support-phone` can
Page attributes can be defined per page in the AsciiDoc document header (e.g., `:page-support-phone: +1 212-555-1234`) or globally in the playbook under the key `asciidoc.attributes`.
The `page-` prefix is used to isolate page-related attributes from the numerous other document attributes in AsciiDoc.

| page.author
| The first author of the document, if one or more authors are specified in the AsciiDoc header.

| page.description
| The text of the description attribute in the AsciiDoc header, if specified.

Expand Down Expand Up @@ -130,8 +137,8 @@ It's often used as the base URL to generate relative URLs from this page.

| page.canonicalUrl
| The canonical URL for the current page.
The canonicalUrl is only set if site.url is set.
If there are multiple versions of the component, the canonical URL is the qualified URL of the most recent version of the page (excluding any prerelease versions).
The canonicalUrl is only set if site.url is set to an absolute URL and the page's component has at least one non-prerelease version.
If there are multiple versions of the component, the canonical URL is the qualified URL of the most recent, non-prerelease version of the page.
If there's only a single version of the component, the canonical URL is the qualified URL of the current page.

| page.editUrl
Expand Down Expand Up @@ -174,6 +181,8 @@ s| env

s| siteRootPath
| The relative path to the root of the published site.
If a site start page is defined, the visitor will be redirected from this location to the start page.
Can be used as a fallback when a site URL is not set.

s| uiRootPath
| The relative path to the root directory of the UI.
Expand All @@ -197,6 +206,6 @@ Next, open the file [.path]_templates/partials/head.hbs_ and add your tag.
----

Each template file has access to the template model, which exposes information about the current page through variable names.
The variables currently available are listed in <<template-variables-table>>.
The variables currently available are listed in <<template-variables-ref>>.

Save the file, commit it to git, push the branch, and allow the approval workflow to play out.
10 changes: 2 additions & 8 deletions gulp.d/tasks/build-preview-pages.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
'use strict'

// NOTE remove patch after upgrading from asciidoctor.js to @asciidoctor/core
Error.call = (self, ...args) => {
const err = new Error(...args)
return Object.assign(self, { message: err.message, stack: err.stack })
}

const asciidoctor = require('asciidoctor.js')()
const Asciidoctor = require('@asciidoctor/core')()
const fs = require('fs-extra')
const handlebars = require('handlebars')
const merge = require('merge-stream')
Expand Down Expand Up @@ -42,7 +36,7 @@ module.exports = (src, previewSrc, previewDest, sink = () => map()) => (done) =>
if (file.stem === '404') {
uiModel.page = { layout: '404', title: 'Page Not Found' }
} else {
const doc = asciidoctor.load(file.contents, { safe: 'safe', attributes: ASCIIDOC_ATTRIBUTES })
const doc = Asciidoctor.load(file.contents, { safe: 'safe', attributes: ASCIIDOC_ATTRIBUTES })
uiModel.page.attributes = Object.entries(doc.getAttributes())
.filter(([name, val]) => name.startsWith('page-'))
.reduce((accum, [name, val]) => {
Expand Down
Loading