docing in-and-out: markdown introduction

24
DOC-ING IN AND OUT allansun.130830@KKBOX

Upload: allan-sun

Post on 28-Nov-2014

622 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Docing in-and-out: Markdown introduction

DOC-ING IN AND OUTallansun.130830@KKBOX

Page 2: Docing in-and-out: Markdown introduction

We sometimes write some comments…

Page 3: Docing in-and-out: Markdown introduction

Not easy to read…

Page 4: Docing in-and-out: Markdown introduction

Introducing: Markdown

Page 5: Docing in-and-out: Markdown introduction

What is Markdown?• A lightweight markup language

• “To write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML(or HTML)”

• In brief:• Write in plaintext• Read in rich format or plaintext

Page 6: Docing in-and-out: Markdown introduction

Trend of Markdown

Page 7: Docing in-and-out: Markdown introduction

Useful to coders

Page 8: Docing in-and-out: Markdown introduction

Pretty Results

Page 9: Docing in-and-out: Markdown introduction

Maybe profitable..?

Page 10: Docing in-and-out: Markdown introduction

How to write?• Headings• Paragraphs• Lists• Code• Links & Images• Miscs

Page 11: Docing in-and-out: Markdown introduction

Headings

Page 12: Docing in-and-out: Markdown introduction

Paragraphs

Page 13: Docing in-and-out: Markdown introduction

Lists

Page 14: Docing in-and-out: Markdown introduction

Code

Page 15: Docing in-and-out: Markdown introduction

Links & Images

Page 16: Docing in-and-out: Markdown introduction

Miscs

Page 17: Docing in-and-out: Markdown introduction

So we’re now using Markdown…

• In our opensource project: KKBOX Android Toolkit• https://github.com/

KKBOX/android_kktoolkit

• README.md• .md is a markdown

extension (Optional)

• Wiki page

Page 18: Docing in-and-out: Markdown introduction

What about in-code comments?• We currently uses Doxygen-style comments

Page 19: Docing in-and-out: Markdown introduction

Comment styles

Page 20: Docing in-and-out: Markdown introduction

Use Doxygen to autogen docs

Page 21: Docing in-and-out: Markdown introduction

Step-by-step• Generate a doxygen configure file• $doxygen doxygen• See the pretty HTML

• We currently made this process cronly due to laziness• Self generate, self update

Page 22: Docing in-and-out: Markdown introduction

Conclusion• Writing document by using Markdown language

• Examples, explanation, blog posts, readme…• Easy to write, easy to read

• Write in-code comments by using Doxygen notations• Not much different between regular comments• Eclipse can help you a bit• Auto-generated documents

• 順手捐發票,救救老殘窮順手寫文件,救救全世界• Please give a helping hand on our open-source project :P

Page 23: Docing in-and-out: Markdown introduction

Refenece• Markdown Project

http://daringfireball.net/projects/markdown/

• 中文版說明http://markdown.tw/

• Github Flavored Markdownhttps://help.github.com/articles/github-flavored-markdown

• Doxygenhttp://www.doxygen.org/

Page 24: Docing in-and-out: Markdown introduction

Q&AThanks!