Skip to content

Commit 3c18f35

Browse files
committed
Demodocs: Structual edits
1 parent f076409 commit 3c18f35

File tree

4 files changed

+87
-80
lines changed

4 files changed

+87
-80
lines changed

demo_docs/source/demo.rst

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,87 @@ Python-specific usage examples; begun with ">>>"
134134
>>> print '(cut and pasted from interactive Python sessions)'
135135
(cut and pasted from interactive Python sessions)
136136

137+
Code Blocks
138+
-----------
139+
140+
.. parsed-literal::
141+
142+
# parsed-literal test
143+
curl -O http://someurl/release-|version|.tar-gz
144+
145+
146+
.. code-block:: json
147+
148+
{
149+
"windows": [
150+
{
151+
"panes": [
152+
{
153+
"shell_command": [
154+
"echo 'did you know'",
155+
"echo 'you can inline'"
156+
]
157+
},
158+
{
159+
"shell_command": "echo 'single commands'"
160+
},
161+
"echo 'for panes'"
162+
],
163+
"window_name": "long form"
164+
}
165+
],
166+
"session_name": "shorthands"
167+
}
168+
169+
Emphasized lines with line numbers
170+
""""""""""""""""""""""""""""""""""
171+
172+
.. code-block:: python
173+
:linenos:
174+
:emphasize-lines: 3,5
175+
176+
def some_function():
177+
interesting = False
178+
print 'This line is highlighted.'
179+
print 'This one is not...'
180+
print '...but this one is.'
181+
182+
Sidebar
183+
=======
184+
185+
.. sidebar:: Ch'ien / The Creative
186+
187+
.. image:: static/yi_jing_01_chien.jpg
188+
189+
*Above* CH'IEN THE CREATIVE, HEAVEN
190+
191+
*Below* CH'IEN THE CREATIVE, HEAVEN
192+
193+
The first hexagram is made up of six unbroken lines. These unbroken lines stand for the primal power,
194+
which is light-giving, active, strong, and of the spirit. The hexagram is consistently strong in character,
195+
and since it is without weakness, its essence is power or energy. Its image is heaven.
196+
Its energy is represented as unrestricted by any fixed conditions in space and is therefore conceived of as motion.
197+
Time is regarded as the basis of this motion.
198+
Thus the hexagram includes also the power of time and the power of persisting in time, that is, duration.
199+
200+
The power represented by the hexagram is to be interpreted in a dual sense in terms of its action
201+
on the universe and of its action on the world of men. In relation to the universe, the hexagram expresses the strong,
202+
creative action of the Deity. In relation to the human world, it denotes the creative action of the holy man or sage,
203+
of the ruler or leader of men, who through his power awakens and develops their higher nature.
204+
205+
Code with Sidebar
206+
-----------------
207+
208+
.. sidebar:: A code example
209+
210+
With a sidebar on the right.
211+
212+
.. literalinclude:: test_py_module/test.py
213+
:language: python
214+
:caption: Literal includes can also have captions.
215+
:linenos:
216+
:lines: 1-40
217+
137218
References
138219
==========
139220

demo_docs/source/index.rst

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -75,73 +75,6 @@ This example comes from `django-payments module docs`_.
7575
.. _cannot be generated from code: https://groups.google.com/forum/#!topic/sphinx-users/_qfsVT5Vxpw
7676
.. _django-payments module docs: http://django-payments.readthedocs.org/en/latest/modules.html#payments.authorizenet.AuthorizeNetProvider
7777

78-
Code test
79-
=========
80-
81-
.. parsed-literal::
82-
83-
# parsed-literal test
84-
curl -O http://someurl/release-|version|.tar-gz
85-
86-
87-
.. code-block:: json
88-
89-
{
90-
"windows": [
91-
{
92-
"panes": [
93-
{
94-
"shell_command": [
95-
"echo 'did you know'",
96-
"echo 'you can inline'"
97-
]
98-
},
99-
{
100-
"shell_command": "echo 'single commands'"
101-
},
102-
"echo 'for panes'"
103-
],
104-
"window_name": "long form"
105-
}
106-
],
107-
"session_name": "shorthands"
108-
}
109-
110-
Sidebar
111-
=======
112-
113-
.. sidebar:: Ch'ien / The Creative
114-
115-
.. image:: static/yi_jing_01_chien.jpg
116-
117-
*Above* CH'IEN THE CREATIVE, HEAVEN
118-
119-
*Below* CH'IEN THE CREATIVE, HEAVEN
120-
121-
The first hexagram is made up of six unbroken lines. These unbroken lines stand for the primal power,
122-
which is light-giving, active, strong, and of the spirit. The hexagram is consistently strong in character,
123-
and since it is without weakness, its essence is power or energy. Its image is heaven.
124-
Its energy is represented as unrestricted by any fixed conditions in space and is therefore conceived of as motion.
125-
Time is regarded as the basis of this motion.
126-
Thus the hexagram includes also the power of time and the power of persisting in time, that is, duration.
127-
128-
The power represented by the hexagram is to be interpreted in a dual sense in terms of its action
129-
on the universe and of its action on the world of men. In relation to the universe, the hexagram expresses the strong,
130-
creative action of the Deity. In relation to the human world, it denotes the creative action of the holy man or sage,
131-
of the ruler or leader of men, who through his power awakens and develops their higher nature.
132-
133-
Code with Sidebar
134-
=================
135-
136-
.. sidebar:: A code example
137-
138-
With a sidebar on the right.
139-
140-
.. literalinclude:: test_py_module/test.py
141-
:language: python
142-
:caption: Literal includes can also have captions.
143-
:linenos:
144-
:lines: 1-40
14578

14679
Inline code and references
14780
==========================
@@ -164,19 +97,6 @@ documentation for it.
16497
.. _Docutils: http://docutils.sourceforge.net/
16598
.. _Inline Markup: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup
16699

167-
Emphasized lines with line numbers
168-
==================================
169-
170-
.. code-block:: python
171-
:linenos:
172-
:emphasize-lines: 3,5
173-
174-
def some_function():
175-
interesting = False
176-
print 'This line is highlighted.'
177-
print 'This one is not...'
178-
print '...but this one is.'
179-
180100
Data
181101
====
182102

demo_docs/source/lists_tables.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Lists & Tables
44
**************
55

6+
.. contents:: Table of Contents
7+
.. section-numbering::
8+
69
Lists
710
=====
811

demo_docs/source/structure.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
Structural Elements
44
*******************
55

6+
.. contents:: Table of Contents
7+
.. section-numbering::
8+
69
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lorem neque, interdum in ipsum nec,
710
finibus dictum velit. Ut eu efficitur arcu, id aliquam erat. In sit amet diam gravida, imperdiet tellus eu,
811
gravida nisl. Praesent aliquet odio eget libero elementum, quis rhoncus tellus tincidunt.

0 commit comments

Comments
 (0)