kobiton / docs

The content for Kobiton Docs.
https://docs.kobiton.com
3 stars 1 forks source link

Fixing site URLs #137

Closed internetisaiah closed 1 year ago

internetisaiah commented 1 year ago

Summary

I updated the antora-playbook-docs.yml, antora-playbook-widget.yml and /docs/antora.yml files (and any files/scripts referencing the URL) to make the following changes to site URLs:

Resources:

Related PRs, issues, or features (optional)

Metadata

PR contributor checklist

internetisaiah commented 1 year ago

@nhanvvo-kobiton ,

I was able to resolve all URL issues so the following happens:

Before: https://docs.kobiton.com/kobiton-docs/profile/index.html https://docs.kobiton.com/kobiton-docs/profile/manage-your-profile.html

After: https://docs.kobiton.com/profile https://docs.kobiton.com/profile/manage-your-profile

However, the landing page tiles are now broken due to the following:

The nav.adoc files were updated from this:

* index.adoc[]
** your-first-app.adoc[]

To this:

.index.adoc[]
* your-first-app.adoc[]

We need to keep the nav.adoc files in this format, so is there anyway we can update ./ui-bundle-docs/partials/nav-box-item.hbs so that tiles are generated when the following conditions are met:

Current

{{#if navigation.length}}
  {{#each navigation}}
    {{#if (and ./url (eq ../level 1))}}
      {{#if (eq ./content 'Get started')}}
        <a class="col-3" href="
                  {{~#if (eq ./urlType 'internal')}}{{{relativize ./url}}}
                  {{~else}}{{{./url}}}{{~/if}}">
          <div class="box-wrapper">
            <div class="box-item">
              <div class="box-title">
                <div class="get-started-image"></div>
                <div class="title-info">
                  Get Started
                </div>
              </div>
              <div class="box-description">Everything you need to start using Kobiton.</div>
            </div>
          </div>
        </a>
      {{/if}} 

Suggestion We may need to change the level from 1 to something else? When I tried removing this line completely, it rendered an extra tile for Devices where the second tile was set to supported-platforms/devices, because it shares the same :navtitle: at the top of their .adoc as devices/index.adoc. Example:

devices/index.adoc

= Devices
:navtitle: Devices

Find, manage, and configure your devices.

supported-platforms/devices.adoc

= Supported devices
:navtitle: Devices

$DESCRIPTION$

Can we change the logic of this handlebars code so that it evaluates the content name against the actual doc title and not the nav title? i.e. against = Supported devices not :navtitle: Devices in the example above?

nhanvvo-kobiton commented 1 year ago

LGTM! but please merge this PR also https://github.com/kobiton/docs/pull/140