stormpath / stormpath-documentation

The Stormpath Product Guides
https://docs.stormpath.com/rest/product-guide/latest/
12 stars 17 forks source link

Show language in header #139

Closed nbarbettini closed 8 years ago

nbarbettini commented 8 years ago

It would be easier to tell different versions of the One Product Guide apart if this header:

image

Was updated to Stormpath C# Documentation (for example).

This should be possible by some magic in conf.py:

if tags.has('csharp'):
    lang_name = u'C#'

elif tags.has('vbnet'):
    lang_name = u'Visual Basic'

elif tags.has('nodejs'):
    lang_name = u'Node.js'

else:
    raise ValueError('Unknown language tag.')

# General information about the project.
project = u'Stormpath %s Documentation' % lang_name

# Automatically added to the end of every source file
# so |language| can be used as a substitution in the RST files
rst_epilog = """
.. |language| replace:: %(lang_name)s
""" % { 'lang_name': lang_name }

There might be other ways of doing this, but this is what I got working for the ASP.NET docs.

jakubvul commented 8 years ago

I was just thinking about this yesterday! Could you make a PR with your conf.py changes?

jakubvul commented 8 years ago

What about the version? Because "V1" is definitely misleading. I've just removed it for now...