IMPORTANT: This guide is intended to be used with the Forestry CMS. Our external contributors who submit pull requests to the DevCenter repository do NOT need to follow this guide as it is not relevant for them!
- Go to the
For review
section of the sidebar. - Click
Add new
on the top of the screen. - Choose a Front Matter Template. In most cases, the basic template works perfectly.
- Add some content to the editor on the right, and click
Save draft
.
You can come back and edit the article any time. Please remember that every time you click Save
, Forestry pushes a commit to GitHub. You can view your file in the DevCenter repository.
IMPORTANT: Please make sure when your article is ready for review that a single commit on GitHub makes all changes visible. With a new article, that means you should:
- Cut its entire content (keep it on the clipboard!) and then click
Save draft
- Once it is saved (the little circle is green), paste the content back in and click
Save draft
.
This way you will have a commit that will show the entire content of the article as new content. Voilá!
- Create a new article in the
For review
section. - Copy the contents of the existing article into the new article.
- Add your changes.
IMPORTANT: Please make sure when your article is ready for review that a single commit on GitHub makes all changes visible. With an existing article this means you should make sure that all your changes are added with a single Save
.
- Save the article on Forestry - this creates a commit on GitHub so only save on Forestry when your content is ready for review.
- Go to the commits page of the DevCenter repository and find the commit or commits created when you saved the article. Its commit message should be "Updated article-name.md" or "Created article-name.md".
NOTE: if you have several articles ready for review, you will find each article in a separate commit.
- Select and copy the links of the commits in your browser's address bar and add them to the review task(s) in ClickUp.
- Move your writing tasks to Blocked status.
Once the review is done and the article is approved, we are ready to publish.
- Copy the contents of the article in the
For review
section in to the article in its "proper" place. For example, if you edited the Quick Start Guide to Bitrise article, copy the content from the article in theFor review
section to the article in theGetting started
section. - If the
Draft
setting isON
, turn it off. Once it's off, clickSave
.
And done! Forestry will push your article into the repository and GitHub pages will build it.
Forestry supports using snippets to quickly add shortcodes to your content. In our case, the snippets include all message boxes which are HTML codes inserted directly into the content, parsed when building the site.
NOTE: You can only insert snippets from the WYSIWYG editor.
- Place the cursor where you wish to insert a message box.
- Open the Snippets menu on the bottom toolbar.
- Select the type of message box you need.
- Enter the title of your message between the quotation marks after
title=.
- Enter the content of your message between the quotation marks after
content=
.
In Forestry, the front matter of the articles determine their place in the menu. That means you can manipulate an article's location in the menu system by editing their front matter.
In the Front matter
of Forestry, you can create new front matter templates. Create a menu front matter template this way:
- Click
Add template
in the top right corner. - Add a template name (for example, new-menu-item)
- Add a
Field Group
on the right. When its settings appear, entermenu
as the label. The same will be entered automatically as the name. - In the green box on the left, click the
>
sign. - On the right, select
Field Group
again. - Enter
new-menu-item
as the label. The same will be entered automatically as the name. - In the green box on the left, click the
>
sign. - On the right, select
Text field
. - Enter
weight
as the label. The same will be entered automatically as the name. - Click
Create template
.
That's it, you are done! Alternatively, you can go to any article that has front matter applied to it, click ...
then click Create template
- Forestry will create the same template, you just need to change the relevant labels AND names - the names won't be automatically updated with the labels in this case!
Creating a new menu item in Forestry is slightly complicated. Unfortunately, we have to directly edit a .yml files in the GitHub repository.
-
Enter the data folder and open and edit
menus.yml
. -
Under main, enter the title of your new menu item, its identifier and weight.
Example:
main: - title: New menu item identifier: new-menu-item weight: 14
The weight specifies the menu item's position relative to the other menu items - enter any value you want, later you can easily change this in Forestry.
-
Add an article that has a front matter menu entry corresponding to the identifier of the menu item. It can be an empty dummy article. You can do this in Forestry by creating a new front matter template and applying that to a dummy article (see Using a front matter template) or in GitHub, manually.
Example:
title: Dummy article menu: new-menu-item: weight: 1
-
Go to Forestry and you should see your new menu item in the Menus section.
Once you have an article ready, you want to place it in the menu system so that it is visible on DevCenter. The article has to be in one of the directories on the sidebar!
There are two options:
- adding the article to a menu in the
Menus
section (recommended in most cases) - giving the article a front matter template (recommended if you are creating a new main menu item)
- Enter the
Menus
section. - Click the menu you wish to place the article in (for example, iOS Code Signing).
- Click
Add link
. - Change it to
Internal
. - From the dropdown menu, select the article.
- Enter its title as the name of the article.
- Click
Done
. - Click
Save
in the top right corner.
- Open the sidebar section where the article is located and click on the article.
- Click the
...
sign on the top right corner. - Select
Change template
. - Choose the front matter template of the menu where you wish to place the article (for example, ios-code-signing).