To edit documentation md
files in this repository, all you need to do is to:
All Hugo site content is stored under the /content
folder.
The main documentation is specifically in /content/ja
.
The file and folder layout matches what you see in the URL bar of your browser.
Fork the repository into your personal github account.
- Pull the repository from your personal github account into your computer
- Create a new branch
git checkout -b new-article-title
Now you can start working in your separate branch.
There are two ways to create an article:
- copy another article and update the header metadata and content
- use Hugo
- use the
new-post.sh
script (preferred)
From the root folder of the repository:
hugo new -k docs content/ja/docs/developers/design/new-article.md
This will produce a new file in /content/ja/docs/developers/design/new-article.md
---
title: "New Article"
linkTitle: "New Article"
date: 2021-07-28T16:21:40+09:00
tags: ["this", "another-tag"]
description: >
Put a single line description of the article
---
This is a new article.
Update the tags
and description
with the ones of your choice.
You are free to change also the title even after the file has been generated (remember to also change the linkTitle
).
You can use an automated script where you need to enter the category/subcategory/title
and it will generate the article automatically.
./new-post.sh
--------------------------------------------
Please, select the category of your article:
--------------------------------------------
1) content/ja/docs/understanding_corda
2) content/ja/docs/FAQ
3) content/ja/docs/developers
4) content/ja/docs/release_notes
#? 3
------------------------------------------------
Please, select the sub-category of your article:
------------------------------------------------
1) content/ja/docs/developers/getting_started 4) content/ja/docs/developers/samples 7) content/ja/docs/developers/node_operations
2) content/ja/docs/developers/network_operations 5) content/ja/docs/developers/performance
3) content/ja/docs/developers/cordapp_development 6) content/ja/docs/developers/design
#? 1
-------------------------------------------------------------------------------------------------------------------
Insert the title of your article (you can always change it later, but remember to change the name of the file too):
-------------------------------------------------------------------------------------------------------------------
this-is-a-test
content/ja/docs/developers/getting_started/this-is-a-test.md create
git add content/ja/path-of-your-article/your-article.md
git commit -m "New article added"
git push origin your-branch
Once the code is pushed in your personal github fork, you can make a new pull request against the main branch of the original repository.
We recommend that you use Visual Studio Code or an editor of your choice that can edit (and preview) Markdown.
We also recommend installing markdownlint VSC extension which includes a library of rules to encourage standards and consistency for Markdown files.
Also this VSC extension is great Markdown All In One.
Shortcodes allow us to extend Markdown.
If you are not familiar with Markdown, you can check markdown-example to see many examples of shortcode that you can reuse for your article.