Skip to content

Update MarkBind documentation to use layouts#858

Merged
Chng-Zhi-Xuan merged 4 commits into
MarkBind:masterfrom
Chng-Zhi-Xuan:527-default-layout
May 21, 2019
Merged

Update MarkBind documentation to use layouts#858
Chng-Zhi-Xuan merged 4 commits into
MarkBind:masterfrom
Chng-Zhi-Xuan:527-default-layout

Conversation

@Chng-Zhi-Xuan

@Chng-Zhi-Xuan Chng-Zhi-Xuan commented May 15, 2019

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request? (put "X" next to an item, remove the rest)

• [x] Documentation update

Resolves #527

What is the rationale for this request?

We can clean up the <frontmatter> of each page, within our documentation by using the layouts feature. Since #528 was fixed, we can proceed to use layouts with no issues.

What changes did you make? (Give an overview)

Replaced the header, footer and siteNav values of <frontmatter> with layout

Testing instructions:

  • Open Netlify preview and check that the documentation is rendered fine.

Proposed commit message: (wrap lines at 72 characters)

Docs: update pages' frontmatter to use layouts

MarkBind documentation pages' frontmatter currently specifies 3 values
to insert headers, footers and site navigation. The issue with layouts
inserting siteNav CSS files has been fixed in #841 .

Therefore, let's update our documentation to use the layouts feature to
reduce the clutter in each pages' frontmatter. A separate layout for
both user guide and developer guide has been added.

@alyip98 alyip98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

<header>
<link rel="stylesheet" href="{{baseUrl}}/css/main.css">
<navbar type="dark">
<a slot="brand" href="{{baseUrl}}/index.html" title="Home" class="navbar-brand"><img src="{{baseUrl}}/images/logo-darkbackground.png" height="20" /></a>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor nit: remove the backlash in img to be in line with the other img tags

<header>
<link rel="stylesheet" href="{{baseUrl}}/css/main.css">
<navbar type="dark">
<a slot="brand" href="{{baseUrl}}/index.html" title="Home" class="navbar-brand"><img src="{{baseUrl}}/images/logo-darkbackground.png" height="20" /></a>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor nit: remove the backlash in img to be in line with the other img tags

As img tags are void elements in HTML, the / character
has no effect on it. Let's remove it to clean up our
documentation.
@Chng-Zhi-Xuan Chng-Zhi-Xuan added this to the v2.4.2 milestone May 16, 2019

@yamgent yamgent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will header.md, footer.md, userGuideSections.md and devGuideSections.md be used after this PR is merged? If not, can consider removing it...

@Chng-Zhi-Xuan

Copy link
Copy Markdown
Contributor Author

Will header.md, footer.md, userGuideSections.md and devGuideSections.md be used after this PR is merged? If not, can consider removing it...

Some of the main pages (docs/index.md) do not have a layout applied to them as they do not specify a site navigation menu. Thus need to specify header.md and footer.md specifically.

As for userGuideSections.md and devGuideSections.md, note that within the layouts folder, both are named as navigation.md due to layouts feature implementation. I wanted to keep the original files where they were before in case we have to author different layouts in the future. Not having them there would require us to skim through all the different navigation.md within the layouts folder and picking the right one.

@Chng-Zhi-Xuan Chng-Zhi-Xuan merged commit cb1cb02 into MarkBind:master May 21, 2019
@Chng-Zhi-Xuan Chng-Zhi-Xuan deleted the 527-default-layout branch May 22, 2019 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apply a default layout for the MarkBind website

4 participants