|
| 1 | +# Introduction |
| 2 | + |
| 3 | +This repository is the source code for [www.odata.org](http://www.odata.org) built with Jekyll. Site admins regularly updates the contents to the site. |
| 4 | + |
| 5 | +# Contribution Guide |
| 6 | + |
| 7 | +## Create blogs |
| 8 | +OData lovers can write blogs to share their experiences with OData. Blogs will be published at [www.odata.org/blog](http://www.odata.org/blog). To create a blog post : |
| 9 | + |
| 10 | +- Create a **markdown** file under *_posts* folder. |
| 11 | +- Name the file `yyyy-mm-dd-your-blog-title.md` |
| 12 | +- Inside the markdown file, follow the templates: (If you are not familiar with markdown syntax, please refer to the *Appendix A* section below. |
| 13 | +``` |
| 14 | +--- |
| 15 | +layout: post |
| 16 | +title: your blog title |
| 17 | +date: 2010-03-17 17:59:43.000000000 +08:00 |
| 18 | +author: Name you want to display |
| 19 | +--- |
| 20 | +[Optional]Description of yourself |
| 21 | +
|
| 22 | +Contents of your blog post in Markdown syntax |
| 23 | +``` |
| 24 | + |
| 25 | + |
| 26 | +- If you want to add images in your post, please add the image under *assets* folder first and the `src` url should be `{{ site.url }}assets/img.png` |
| 27 | +- If you want to add code in your post, please refer to the *Appendix B* section below. |
| 28 | + |
| 29 | +- Then create a pull request for your update, we will publish your blog post after a quick review. |
| 30 | + |
| 31 | + |
| 32 | +## Other improvements |
| 33 | + |
| 34 | +Other improvements including general site improvement ideas, modifying existing pages, adding new pages and etc, please [create a GitHub issue](https://github.com/ODataOrg/odataorg.github.io/issues) or [create a pull request](https://github.com/ODataOrg/odataorg.github.io/pulls). |
| 35 | + |
| 36 | +# Appendix A: Markdown Syntax |
| 37 | + |
| 38 | +We highly recommend using Markdown to create a blog post. |
| 39 | + |
| 40 | +> Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML). |
| 41 | +
|
| 42 | +### Markdown Basics |
| 43 | +Markdown is very easy to use, with syntax below, you can write a pretty blog post. |
| 44 | +#### Headings |
| 45 | +You can create a heading by adding one or more `#` symbols before your heading text. |
| 46 | +``` |
| 47 | +# h1 |
| 48 | +## h2 |
| 49 | +… |
| 50 | +###### h6 |
| 51 | +``` |
| 52 | +#### Blockquotes |
| 53 | +You can indicate blockquotes with a `>`. |
| 54 | +``` |
| 55 | +In the words of Abraham Lincoln: |
| 56 | +> Pardon my french |
| 57 | +``` |
| 58 | +#### Styling text |
| 59 | +``` |
| 60 | +*This text will be italic* |
| 61 | +**This text will be bold** |
| 62 | +``` |
| 63 | +#### Lists |
| 64 | +You can make an **unordered** list by preceding list items with either `*` or `-` |
| 65 | +``` |
| 66 | +* Item |
| 67 | +* Item |
| 68 | +
|
| 69 | +- Item |
| 70 | +- Item |
| 71 | +``` |
| 72 | +You can make an **ordered** list by preceding list items with a number. |
| 73 | +``` |
| 74 | +1. Item 1 |
| 75 | +2. Item 2 |
| 76 | +``` |
| 77 | +#### Code formatting |
| 78 | +Use single backtick (`) to format text in a special monospace format. |
| 79 | + |
| 80 | +You can use triple backticks to format text as its own distinct block. |
| 81 | + |
| 82 | + |
| 83 | +#### Links |
| 84 | +You can create an inline link by wrapping link text in brackets ( [ ] ), and then wrapping the link in parentheses ( ( ) ). |
| 85 | +``` |
| 86 | +[Visit GitHub!](www.github.com) |
| 87 | +``` |
| 88 | +### More if you need |
| 89 | +If you need more advanced guidelines, please refer to: |
| 90 | + |
| 91 | +- [Mastering Markdown](https://guides.github.com/features/mastering-markdown/) |
| 92 | +- [Daring Fireball: Markdown Syntax Documentation](http://daringfireball.net/projects/markdown) |
| 93 | + |
| 94 | +# Appendix B: Code Formatting |
| 95 | + |
| 96 | +There are two ways to formatting your code in a blog post. |
| 97 | + |
| 98 | +**Markdown coding formatting** |
| 99 | +You can use coding format supported in Markdown, use triple backticks to format text as its own distinct block. This is very easy to use, but not support syntax highlighting |
| 100 | + |
| 101 | +**Jekyll supported code formatting** |
| 102 | +Since our site is built with Jekyll, you can also use Jekyll supported code formatting, which supports **syntax highlight**. To render a code block with syntax highlighting, surround your code as follows: |
| 103 | +``` |
| 104 | +{% highlight ruby %} |
| 105 | +def foo |
| 106 | + puts 'foo' |
| 107 | +end |
| 108 | +{% endhighlight %} |
| 109 | +``` |
| 110 | +The argument to the `highlight` tag (`ruby` in the example above) is the language identifier. `ruby` here is a short name, for regually used short names: |
| 111 | +- `csharp` for C# |
| 112 | +- `javascript` for JavaScript |
| 113 | +- `ruby` for Ruby |
| 114 | +- `cpp` for C++ |
| 115 | +- `c` for C |
| 116 | +- `java` for Java |
| 117 | +- `json` for JSON |
| 118 | +- `php` for PHP |
| 119 | +- `python` for Python |
| 120 | + |
| 121 | +If the language you used not listed above, please look for the “short name” on the [Pygments’ Lexers page](http://pygments.org/docs/lexers/). |
0 commit comments