From ec2473b83b458752a71a010ff2c2895f153e4b35 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 9 Aug 2022 13:27:13 +0200 Subject: [PATCH] docs/building-examples: show one example per page Signed-off-by: Unai Martinez-Corral --- docs/building-examples.rst | 29 ++++++++++++----------------- docs/collect_readmes.py | 2 +- docs/eos-s3/btn_counter.rst | 2 ++ docs/xc7/counter_test.rst | 2 ++ docs/xc7/litex_demo.rst | 2 ++ docs/xc7/picosoc_demo.rst | 2 ++ docs/xc7/pulse_width_led.rst | 2 ++ docs/xc7/timer.rst | 2 ++ 8 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 docs/eos-s3/btn_counter.rst create mode 100644 docs/xc7/counter_test.rst create mode 100644 docs/xc7/litex_demo.rst create mode 100644 docs/xc7/picosoc_demo.rst create mode 100644 docs/xc7/pulse_width_led.rst create mode 100644 docs/xc7/timer.rst diff --git a/docs/building-examples.rst b/docs/building-examples.rst index 9b504d4..8f0a547 100644 --- a/docs/building-examples.rst +++ b/docs/building-examples.rst @@ -72,23 +72,15 @@ Enter the directory that contains examples for Xilinx 7-Series FPGAs: cd xc7 -.. jinja:: xc7_counter_test - :file: templates/example.jinja +Then, follow the guidelines for each example: -.. jinja:: xc7_picosoc_demo - :file: templates/example.jinja +.. toctree:: -.. jinja:: xc7_litex_demo - :file: templates/example.jinja - -.. jinja:: xc7_linux_litex_demo - :file: templates/example.jinja - -.. jinja:: xc7_timer - :file: templates/example.jinja - -.. jinja:: xc7_pulse_width_led - :file: templates/example.jinja + xc7/counter_test + xc7/picosoc_demo + xc7/litex_demo + xc7/timer + xc7/pulse_width_led QuickLogic EOS S3 @@ -101,5 +93,8 @@ Enter the directory that contains examples for QuickLogic EOS S3: cd eos-s3 -.. jinja:: eos-s3_btn_counter - :file: templates/example.jinja +Then, follow the guidelines for each example: + +.. toctree:: + + eos-s3/btn_counter diff --git a/docs/collect_readmes.py b/docs/collect_readmes.py index 54fe736..82c396d 100644 --- a/docs/collect_readmes.py +++ b/docs/collect_readmes.py @@ -102,7 +102,7 @@ def handle_img(block): ret = {} ret['type'] = 'image' - ret['uri'] = '_static/' + os.path.join(*block['uri'].split('/')[3:]) + ret['uri'] = '../_static/' + os.path.join(*block['uri'].split('/')[3:]) ret['align'] = block.get('align', 'center') ret['width'] = block.get('width', '100%') diff --git a/docs/eos-s3/btn_counter.rst b/docs/eos-s3/btn_counter.rst new file mode 100644 index 0000000..c5f191b --- /dev/null +++ b/docs/eos-s3/btn_counter.rst @@ -0,0 +1,2 @@ +.. jinja:: eos-s3_btn_counter + :file: templates/example.jinja diff --git a/docs/xc7/counter_test.rst b/docs/xc7/counter_test.rst new file mode 100644 index 0000000..d7d994c --- /dev/null +++ b/docs/xc7/counter_test.rst @@ -0,0 +1,2 @@ +.. jinja:: xc7_counter_test + :file: templates/example.jinja diff --git a/docs/xc7/litex_demo.rst b/docs/xc7/litex_demo.rst new file mode 100644 index 0000000..18a91a8 --- /dev/null +++ b/docs/xc7/litex_demo.rst @@ -0,0 +1,2 @@ +.. jinja:: xc7_litex_demo + :file: templates/example.jinja diff --git a/docs/xc7/picosoc_demo.rst b/docs/xc7/picosoc_demo.rst new file mode 100644 index 0000000..44e5b98 --- /dev/null +++ b/docs/xc7/picosoc_demo.rst @@ -0,0 +1,2 @@ +.. jinja:: xc7_picosoc_demo + :file: templates/example.jinja diff --git a/docs/xc7/pulse_width_led.rst b/docs/xc7/pulse_width_led.rst new file mode 100644 index 0000000..d6b2993 --- /dev/null +++ b/docs/xc7/pulse_width_led.rst @@ -0,0 +1,2 @@ +.. jinja:: xc7_pulse_width_led + :file: templates/example.jinja diff --git a/docs/xc7/timer.rst b/docs/xc7/timer.rst new file mode 100644 index 0000000..7efe743 --- /dev/null +++ b/docs/xc7/timer.rst @@ -0,0 +1,2 @@ +.. jinja:: xc7_timer + :file: templates/example.jinja