Template mdBook

Este repositório contém um template para criação de livros utilizando o mdBook.

Como utilizar

Para utilizar este template, você deve clonar este repositório utilizando o comando:

git clone https://github.com/Rapha-Borges/modelo-mdbook.git

Após basta seguir o desenvolvimento do livro conforme a estrutura das diretórios:

└─ pt (Default directory for the PT version)
|   |─ book.toml (mdBook configuration file)
|   └─ src (Directory used to hold all .md, images and other files that will be referenced throughout the book)
|   |    └─ BOOKSUMMARY.md (File with the “SUMMARY” text)
|   |    └─ README.md (File with the “SOBRE” text)
|   |    └─ SUMMARY.md (Standard mdBook file that generates "CHAPTERS") 
|   |    └─ Capitulo-X (File directory for each chapter)
|   └─ theme (Directory with all styling files)
|   |      └─ index.hbs (HTML configuration file)
|   |      └─ css (CSS files directory)
|   |      |    └─ style.css (Default CSS style file)
|   └─ translation (Directory for translations)
|   |            └─ en (English files)
|   |            └─ es (Spanish files)
└─ home (Directory for the home page)
|     └─ index.html (Home page main HTML file)
|     └─ CSS (Directory for the home page CSS files)
|     |    └─style.css(Home page main CSS file)

Para maiores informações de como funciona cada um dos arquivos, bas consultar no próprio repositório desse template, cada arquivo vai contar com uma descrição ou exemplo.

Como contribuir

Para contribuir com este projeto, siga os seguintes passos:

  1. Crie um fork do projeto
  2. Crie uma branch para sua feature (git checkout -b feature/AmazingFeature)
  3. Faça o commit de suas mudanças (git commit -m 'Add some AmazingFeature')
  4. Faça o push da branch (git push origin feature/AmazingFeature)
  5. Abra um pull request

Adicionar Menu Expansível

Material Design admonishments TEMPORARIAMENTE INDISPONÍVEL

Exemplo de capitulos expanssíveis

Menu Expansível

Para adicionar o menu expansível basta adicionar as tags <details> e <summary>. Colocando o título a ser exibido dentro da tag <summary> e abaixo o conteúdo que ficara oculto.

<details>
<summary class="summary">{TEXTO QUE SERÁ EXIBIDO}</summary>

TEXTO QUE FICARA OCULTO

</details>

Exemplo:

CLIQUE AQUI PARA ABRIR OU FECHAR

Esse exemplo está utilizando a tag open para que o menu apareça aberto por padrão.

TEMPORARIAMENTE INDISPONÍVEL

Utilizando um processador para adicionar Material Design admonishments.

Exemplo de uso:

``` + admonish + {formato_escolhido}

{TEXTO PARA SER EXIBIDO}

```

 


Referência

Para outros exemplos você pode consultar a documentação oficial CLICANDO AQUI

 


Info

A beautifully styled message.
```admonish info
{TEXTO PARA SER EXIBIDO}
```

 


Example

My example is the best!
```admonish example
My example is the best!
```

 


Note

A plain note.
```admonish
A plain note.
```

 


Warning

```admonish warning title="{TITULO CUSTOMIZADO}"
The following steps can lead to irrecoverable data corruption.
```
The following steps can lead to irrecoverable data corruption.

 


Success

```admonish success title="{TITULO CUSTOMIZADO}"
This will take a while, go and grab a drink of water.
```
This will take a while, go and grab a drink of water.

 


Markdown/HTML

Você pode utilizar markdown e HTML para customizar

```admonish tip title="_Referencing_ and <i>dereferencing</i>"
The opposite of *referencing* by using `&` is *dereferencing*, which is
accomplished with the <span style="color: hotpink">dereference operator</span>, `*`.
```
The opposite of *referencing* by using `&` is *dereferencing*, which is
accomplished with the <span style="color: hotpink">dereference operator</span>, `*`.

 


Alerta de bug

~~~admonish bug
This syntax won't work in Python 3:
```python
print "Hello, world!"
```
~~~
This syntax won't work in Python 3:
```python
print "Hello, world!"
```

 


Custom

Você também customizar com um arquivo CSS adicionando nomes de classes

```admonish note class="custom-0 custom-1"
Styled with my custom CSS class.
```
Styled with my custom CSS class.

Que vai gerar algo assim no HTML, aonde você podera aplicar o CSS:

<div class="admonition note custom-0 custom-1"
    ...
</div>

 


Collapsible

```admonish title="{TITULO CUSTOMIZADO}" collapsible=true
{TEXTO PARA SER EXIBIDO}
```
{TEXTO PARA SER EXIBIDO}

 


Invalid blocks

Se ocorrer um erro na renderização será exibido dessa forma

This block will error

Exemplo de capitulos expanssíveis

Para utilizar a função de Capítulos Expansíveis o arquivo SUMMARY.md deve seguir a seguinte formatação""

- [Exemplo de capitulos expanssíveis](Capitulo-3/README.md)
    - [EXEMPLO 1](Capitulo-3/Exemplo-1)
    - [EXEMPLO 2](Capitulo-3/Exemplo-2)
    - [EXEMPLO 3](Capitulo-3/Exemplo-3)

EXEMPLO 1

EXEMPLO 2

EXEMPLO 3