Skip to content

Commit

Permalink
Add markdown support, with example.
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Callahan <tcal@google.com>
  • Loading branch information
tcal-x committed Mar 10, 2021
1 parent 491e0e0 commit 6d1dbc9
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/source/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.png binary
*.gif binary
*.jpg binary
1 change: 1 addition & 0 deletions docs/source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
14 changes: 12 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import sys
sys.path.insert(0, os.path.abspath('.'))

from recommonmark.parser import CommonMarkParser

# -- Project information -----------------------------------------------------

project = u'CFU-Playground'
Expand All @@ -48,8 +50,16 @@
extensions = [
'sphinx_tabs.tabs',
'sphinxcontrib.jinja',
'recommonmark',
]

source_parsers = {
'.md': CommonMarkParser,
}

source_suffix = ['.rst', '.md']


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -73,8 +83,8 @@
html_theme = 'sphinx_material'
html_theme_options = {
'nav_title': project,
'color_primary': 'deep-purple',
'color_accent': 'purple',
'color_primary': 'orange',
'color_accent': 'gray',
'repo_name': "google/CFU-Playground",
'repo_url': 'https://github.com/google/CFU-Playground',
'globaltoc_depth': 2,
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Welcome to CFU-Playground's documentation!
:maxdepth: 2
:caption: Contents:

md_example



Indices and tables
Expand Down
35 changes: 35 additions & 0 deletions docs/source/md_example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# Markdown Example Title

This file is written using Markdown.

## Section Header

Let's try some code:

```python

def __init__(self, width=32):
super().__init__()
self.value = Signal(width)
self.set = Signal()

def elab(self, m):
m.d.sync += self.set.eq(0)
with m.If(self.start):
m.d.sync += self.value.eq(self.in0),
m.d.sync += self.set.eq(1),
m.d.comb += self.output.eq(self.value)
m.d.comb += self.done.eq(1)


```

### Subsection Header

We have a list.

* item1
* item2
* item3

0 comments on commit 6d1dbc9

Please sign in to comment.