技术文档写作常用工具大全

1. GitHub desk top - https://desktop.github.com/

Git cli - git-scm.com/downloads (optional)

版本控制和文档代码托管库。

2. Visual Studio Code https://code.visualstudio.com/Download After installation, install the following VSC extensions.

写作 markdown 文档的编辑器,非常强大易用。

 3. Acrolinx: https://marketplace.visualstudio.com/items?itemName=acrolinx.vscode-sidebar

昂贵的语法检查器,但非常好用,省去了人工校对。

4. Code Spell Checker: https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker

The goal of this spell checker is to help catch common spelling errors while keeping the number of false positives low.

5. VS code icons (OPTIONAL but handy): https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons

It displays different icons for folders, files, and so on, handy to differentiate them.

6. Markdown Preview Enhanced (After installation, open your MD file in VSC, open the command palette using CTRL SHIFT an P, enter “Preview”, select Preview - > Open preview to the side)

写完文档先预览下再发布。

7. Other useful VS code extensions: Highlight Matching Tag, auto close tag, trailing spaces, and highlight trailing white spaces.  

8. marked-it-cli for local builds from markdown files to html files.

Mac example: marked-it-cli /Users/xxx/Documents/Github/docs/ --output=/Users/xxx/Documents/Github/output --conref-file=/Users/xxx/Documents/Github/docs/conrefs.yml --toc-xml --overwrite --verbose

Windows example: marked-it-cli C:\Users\xxx\Documents\GitHub\xxx\xxx --output=C:\Users\xxx\Documents\abuild_output --conref-file=C:\Users\xxx\Documents\GitHub\xxx\conrefs_cp.yml --toc-xml --overwrite --verbose

9. Broken Link Checker

Linux:

a. Install Filezilla. Use Filezilla to copy the md files or folders to Linux. For example, copy the document folder to the /var/tmp directory. 

b. Run the commands in Linux one by one: 

cd /var/tmp 

find . -name "*.md" -exec markdown-link-check -q {} \; > ../filename.txt 

c. Find the filename.txt in /var folder. Run the command to see the broken link checking results. 

cd ../ 

cat filename.txt 

d.  You can also copy the filename.txt file to your local Windows machine via Filezilla. 

Mac:

a. From the terminal application run the following command to install the link check tool:

npm install -g markdown-link-check

b. To run broken links against the documentation change to the directory where the docs repository is copied on your machine in the Terminal application. Example: cd ~/Documents/GitHub/docs

c. Run the link check tool from the Terminal Application by running the following command: 

find . -name "*.md" -exec markdown-link-check -q {} \;

d. To create a file with the recorded output, run the following command from the Terminal :

find . -name "*.md" -exec markdown-link-check -q {} \; > ../filename.txt

10.  Spell checker

Windows:

a. Download and install npm if not installed already. This link https://nodejs.org/en/download/current/ directs you to system downloads for npm. 

b. After you download the installer. Double-click the installer and follow the instructions ( You can use the default settings). If you encounter problems you can use the package installer and follow the instructions on the nodejs.org site.

c. To verify nodejs and npm are installed, open a command-line as an administrator and run "node -v". The version should be at least "v8.12.0"

d. Then, run "npm -v". The version should be at least "v6.9.0"

e. After installation, you can run the commands from the command-line (see above commands) or create desktop shortcuts to run the spellcheck tool, broken links tool, and local build. To create shortcuts: 

Right-click on your desktop. Select New > Shortcut.

For the "Type the location of the item:"  enter one of the following: 

- For Spellcheck tool  

C:\Windows\System32\cmd.exe /k mdspell -r -n -a --en-us *.md **/*.md **/**/*.md **/**/**/*.md > ../yourfilename.txt

- For local build

C:\Windows\System32\cmd.exe /k marked-it-cli /Users/YourUserName/Documents/GitHub/docs/ --output=/Users/YourUserName/Documents/GitHub/output --conref-file=/Users/YourUserName/Documents/GitHub/docs/conrefs.yml --toc-xml --overwrite --verbose

Mac:

Steps to install and run Markdown SpellCheck.

a. From the Terminal application run the following command to install the spellcheck tool:

npm i markdown-spellcheck -g

b. Change to the directory where the docs repository is copied on your machine in the Terminal application to run spellcheck against the documentation,. 

Example: cd ~/Documents/GitHub/docs

c. Run the spell check tool from the Terminal Application by running the following command: 

mdspell -r -n -a --en-us *.md **/*.md **/**/*.md **/**/**/*.md > ../yourfilename.txt 

d. Click Next.

e. Enter a name for your command. Then, click Finish.

f. Right-click your new desktop shortcut and click Properties.

g. For the Start in: field replace any default path with the path to where the command needs to run. This is the location where you installed your docs repo/npm.  Alternatively, you can include everything in the location - I just did it this way :)  

- For Spellcheck tool  

C:\Users\YourUserName\Documents\GitHub\xxx\docs

- For local build

Location includes path to directory to run the command.

h. Double-click the shortcut to run the command ( a command-line window opens and when the process is completed, show the path to the specified start in location.  For a local build the running build also displays. 

i. Check your specified destination for the resulting files ( either your root Docs folder or your output folder).

11. CHKPII https://w3-03.ibm.com/globalization/page/2011

检查 PII compliance。

12. Jenkins

Contest: You want to build your default branch and publish the pre-production KC.

1. Log in Jenkins with your GSA user and password. 

2. Select "Build with parameters" in the left navigation panel. 

3. Enter the following properties file path in the "PRODUCT_CONFIG" field. 

/gsa/XXX/xxx.properties

4. Click "Build". 

5.  Click “#build_number” under Build History panel and then check the building result by clicking “Console Output”. 

6. If there are no errors in the console output and you see the result “Finished: Success”, you can view the updated content in pre-production KC.

xxx.properties 文件:

product = <KC展示的产品名>

path = ../../../platform/xxx/xxx

toc = xxx.ditamap or SUMMARY.md

# <git_repo_location> is the main product repo, such as github.xxxcom/xxx/xxx-docs.git

git.url = git@<git_repo_location>

git.branch = <branch_name>

# common services repo

git.url.common = git@github.xxx.com/xxx/xxx-docs.git

git.branch.common = master

# second git repo to pull in

# git.url.second = git@github.xxx.com:second.git

# git.branch.second = second

conref = conrefs_cp.yml

13. Chrome 里用 Dynamic Assessment Plugin 插件检查 accessibility.

步骤:

a. Open Chrome

b. Go to the Dynamic Assessment Plugin in the Chrome Web Store.

c. Click Add To Chrome.

First Scan:

a. Go to the Tools page and click the Copy Authentication Token button.

b. In the Chrome Menu, select More Tools > Developer Tools

c. The Elements panel should automatically open. The Elements panel is associated with multiple subpanels, such as Styles. Select DAP near the end of the subpanel list

d. If you have not activated the authentication token or selected a ruleset, a message will indicate that you need to open the Options. Click the Options link in that message. In the Options page, paste the authentication token that you copied in step 1 and then choose one or more rulesets.

e. In the Rule Archive section, Enable rule archive option can be checked to enable rule archive selection. By default, the latest rule archive will be selected.

f. After you complete the above step, scanning should begin automatically. If the scan does not happen automatically, or if you want to scan again, click the Start Scan button.

The Report:

a. If the page contains multiple frames, each frame will be represented by a tab in the report.

b. Levels of accessibility violation are listed in the report. For each level of violation, you can remove it from the report by deselecting its check box. The levels of accessibility violation are:

- Violation: Automatically-detectable violations of the standard

- Potential Violation: Likely a violation, but requires manual review.

- Recommendation: Best practice recommendations.

- Manual Checks: Prompts to perform manual checking.

c. Issues are grouped by violation level. Expand the violation level groupings to see individual violations or issues within them. When you select an issue within a grouping, the Elements section displays the content of the selected violation.

Related help is available by pressing the question mark (?) at the end of each issue grouping.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,053评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,527评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,779评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,685评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,699评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,609评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,989评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,654评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,890评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,634评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,716评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,394评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,976评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,950评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,191评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,849评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,458评论 2 342