Markdown Features
Markdown Başlıkları
Döküman
Belgeler her iki tarafta bir çizgi ---
ile kuşatılmış aşağıdaki markdown başlık alanlarını kullanır:
id
: A unique document id. If this field is not present, the document's id
will default to its file name (without the extension).
title
: The title of your document. If this field is not present, the document's title
will default to its id
.
hide_title
: Whether to hide the title at the top of the doc.
sidebar_label
: The text shown in the document sidebar for this document. If this field is not present, the document's sidebar_label
will default to its title
.
Örnek olarak:
---
id: dök1
title: Benim Dokümanım
sidebar_label: Doküman
---
Kimliğe sahip sürümlenmiş dokümanlar kopyalanırken sürüm numaralarını içerecek şekilde değiştirilirler. O dokümanın versiyon numarası ${version}
ve orijinal id
'si ${id}
olduğu yerde yeni id
version-${version}-${id}
'dir. Ek olarak, sürümlenen dokümanlara, orijinal doküman kimliğine sahip original_id
alanı eklenir.
Örnek olarak:
---
id: version-1.0.0-doc1
title: Dokumanım
sidebar_label: Doküman
original_id: doc1
---
custom_edit_url
: The url for editing this document. If this field is not present, the document's edit url will fallback to editUrl
from optional fields of siteConfig.js
. See siteConfig.js docs for more information.
Örnek olarak:
---
id: doc-markdown
title: Markdown Features
custom_edit_url: https://github.com/facebook/Docusaurus/edit/master/docs/api-doc-markdown.md
---
Blog Postları
Blog Postları her iki tarafta bir çizgi ---
ile kuşatılmış aşağıdaki markdown başlık alanlarını kullanır:
title
: Bu blog postunun başlığı.
author
: The author of this blog post. If this field is omitted, no author name will be shown.
authorURL
: A page to link to when a site user clicks the author's name. If this field is omitted, the author's name will not link to anything.
authorFBID
: Yazarım Facebook kimliği, sadece blog da gösterilmek için yazarın profil resmine erişim için kullanılıyor. Eğer bu alan ihmal edilmişse blog paylaşımında hiçbir yazar resmi gösterilmeyecektir.
Örnek olarak:
---
title: İlk Blog Paylaşımım
author: Frank Li
authorURL: http://twitter.com/franchementli
authorFBID: 100002976521003
---
Ekstra Özellikler
Docusaurus markdown ile doküman yazarken bir kaç ek özellik destekler.
Diğer Dokümanlara Bağlantılamak
Diğer dokümantasyon dosyaları için bunlar, işlenerek otomatik olarak karşılık gelen html bağlantılarına dönüştürülen diğer dokümantasyon dosyaları ile ilişkili bağlantılar kullanabilirsiniz.
Örnek:
[Bu diğer dokümanın bağlantısı](diger-dokuman.md)
Bu markdown işlendikten sonra otomatik olarak /docs/other-document.html
(yada uygun olarak çevrilmiş/sürümlenmiş bağlantıya) bağlantısına dönüşür.
Bu bağlantılar diğer dokümanlar (hala GitHub içerisinde) için çalışan bağlantılar olacağından GitHub dosyaları arasında dolaşmak istediğinizde işe yarayacaktır ama ama dokümanlar işlendiklerinde doğru html bağlantılarına sahip olacaklar.
Resimlere ve Diğer Varlıklara Bağlantılama
Statik varlıklar dokümanlarla gibi ilişkili url'leri kullanarak bağlantılanabilirler. Dokümanlar ve bloglar da kullanılan statik varlıklar sırasıyla docs/assets
ve website/blog/assets
içerisine gitmelidirler. Markdown doğru bağlantı yoluna çevrilecektir böylece bu yollar dokümanların tüm dilleri ve sürümleri için çalışacaktır.
Örnek:

İçerik Panosu Üretme
API belgeleri için içeriklerin bir tablosu olarak kullanışlı olabilen otomatik oluşturulan linklerin bir listesini yapabilirsiniz.
In your markdown file, insert a line with the text <AUTOGENERATED_TABLE_OF_CONTENTS
>. Dokümanınızı kod bloğu içerisindeki her fonksiyon için h3
başlığını kullanarak yazın. These will be found by Docusaurus and a list of links to these sections will inserted at the text <AUTOGENERATED_TABLE_OF_CONTENTS
>.
Örnek:
### `docusaurus.function(a, b)`
Text describing my function
### `docdoc(file)`
Text describing my function
bu fonksiyonun içerik panosuna yönlendirir:
- `docusaurus.function(a, b)`
- `docdoc(file)`
ve her fonksiyon kendilerinin karşılık gelen sayfasına bağlanır.
Syntax Highlighting
Syntax highlighting is enabled by default on fenced code blocks. The language should be detected automatically, but you can sometimes get better results by specifying the language. You can do so using an info string, following the three opening backticks. The following JavaScript example...
```js
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
```
...would be rendered with syntax highlighting like so:
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
Highlighting is provided by Highlight.js using the theme specified in your siteConfig.js
file as part of the highlight
key:
{
...
highlight: {
theme: 'default'
}
...
}
You can find the full list of supported themes in the Highlight.js styles
directory.
Registering additional languages
While Highlight.js provides support for many popular languages out of the box, you may find the need to register additional language support. For these cases, we provide an escape valve by exposing the hljs
constant as part of the highlight
config key. This in turn allows you to call registerLanguage
:
{
...
highlight: {
theme: 'default',
hljs: function(hljs) {
hljs.registerLanguage('galacticbasic', function(hljs) {
// ...
});
}
}
}