Skip to content

Latest commit

 

History

History
138 lines (83 loc) · 3.38 KB

CONTRIBUTING.md

File metadata and controls

138 lines (83 loc) · 3.38 KB

Contributing WebPurple Learn

Contents

Thanks for taking the time to contribute!🎉 You can find a list of issues you can work on here. Feel free to create new ones.

Workflow

In general, the contribution workflow looks like this:

  1. Fork the repo.

  2. Create a new feature branch based off the master branch.

Branch name examples:

  • feature/materials
  • feature/algolia-search
  1. Submit a pull request, referencing any issues it addresses.

To create commit messages use general commits convention

Please try to keep your pull request focused in scope and avoid including unrelated commits.

You can read more about contributing here.

Materials Pages Configuration

All materials are stored in the directory src/pages.

Site Navigation = structure in this directory (If correctly describe files with materials)

There are some options to configure page:

  • title
  • templateKey
  • order
  • isNavRoot
  • navTitle

Page config example:

link to the article

---
title: Комментарии
templateKey: 'article-page'
order: 10
---

What does each of the options mean:

title

Required

Page Title. Also used as Page main Header

title

templateKey

Required

The Template that is used to render the page.

Generally you have to use article-page temlate - template of simple article

Also there are section-page and contents-page templates.

Examples

section-page

contents-page

navTitle

Optional

Title of a navigation Link to the Page.

If not defined, used title

navTitle

order

Optional

The number in order the page link should be displayed in navigation.

You have to define this option if order is important

order

isNavRoot

Optional

Defines root of navigation for all child links.

When navigation bar is being rendering on some page, it finds the closest parent link with isNavroot: true and shows navogation starting with it.

Example

Navigation starts from /dictionaries. Not from /

isNavRoot

Using internal site links in .md files

If you add an internal site link to materials (for example, link to another materials on the site), DON`T use simple link as

[linkTitle](https://...)

It is rendered as simple tag <a> and disable static navigation (page reloads when you follow that link)

Use the following construct instead:

<gatsby-link to="/[some relative path]">link title</gatsby-link>