Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Apr 20, 2015
1 parent 140f245 commit 7ed03dc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
18 changes: 13 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import sys
import os
import shlex
import sphinx_rtd_theme

tab_width = 4

Expand Down Expand Up @@ -111,9 +112,16 @@

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# otherwise, readthedocs.org uses their theme by default, so no need to specify it


# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -125,10 +133,10 @@

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
html_title = "Welcome to Quick Start with D!"

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
html_short_title = "Quick Start with D"

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand Down
11 changes: 5 additions & 6 deletions docs/source/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ The following program prints "Hello, World!" to the standard output.

D `doesn't have a preprocessor <http://dlang.org/pretod.html>`_.
Use ``import core.stdc.MODULE;`` construction to import ``MODULE`` from `C Standard library`_.
Module ``core.stdc.stdio`` contains the ``puts`` prototype:

.. code-block:: d
extern(C) @system nothrow @nogc int puts(in char* s);

.. literalinclude:: ../../examples/helloworld1.d
:language: d
:tab-width: 4

Module ``core.stdc.stdio`` contains the ``puts`` prototype:

.. code-block:: d
extern(C) @system nothrow @nogc int puts(in char* s);
Common D "Hello, World!" program based on Phobos_ looks simpler:

Expand Down

0 comments on commit 7ed03dc

Please sign in to comment.