Re: [sphinx-users] Using rst file names for navigation

2020-07-24 Thread bradley...@gmail.com
I have figured out a solution to my problem.  I put an extra header at the 
top of every file that is the rst file name without extension. I also use 
the following setting in my conf.py file:

html_theme = 'sphinx_rtd_theme'
html_theme_options = {
'navigation_depth' : -1   ,
'titles_only'  : True ,
}

For an example of the result; see
https://bradbell.github.io/cppad_py/doc/html/xsrst/cppad_py.html

This uses the xsrst program which extras sphinx rst files from source code; 
see
https://bradbell.github.io/cppad_py/doc/html/xsrst/xsrst_py.html


On Wednesday, July 8, 2020 at 11:24:28 AM UTC-7 bradley...@gmail.com wrote:

> I am using toctree in each section that has children as you describe 
> above. When I view the section with that toctree entry, I would like the 
> navigation links in the left column to corresponds to the names in the 
> toctree command; i.e., use 'first' instead of the headings in the file 
> first.rst, 'second' instead of the headings in section.rst, and so on.
>
> Right now, I get all the headings in the root section of my entire 
> document, instead of the bread crumb file names up to the root section and 
> the children below.
>
>
>
> On Wednesday, July 8, 2020 at 6:52:43 AM UTC-7 Stefano David wrote:
>
>> HI,
>>
>>
>> On Wednesday, 8 July 2020 13:23:02 UTC+2, bradley...@gmail.com wrote:
>>>
>>> I have been using my own documentation system for years and am writing a 
>>> program to convert sphinx so that it is easier for others to edit my 
>>> documentation, and so that I no longer have to maintain it (It was written 
>>> years ago in C).  In this system one has a title and an abbreviated title 
>>> for each section (web page) and the abbreviated titles are used for 
>>> navigation.
>>>
>>> Here is an example use of my documentation system: 
>>> https://bradbell.github.io/dismod_at/doc/data_table.py.htm
>>>
>>> I am asking how to best reproduce this navigation functionality in 
>>> sphinx ?
>>>
>> If I understand correctly your requirement, given that you have files 
>> first.rst, second.rst, third.rst you should be able to add them to the 
>> toctree as follows to get the desired effect:
>>
>> .. toctree::
>>first.rst 
>>second.rst 
>>third.rst 
>>
>> HTH,
>> Stefano
>>
>>>
>>> On Wednesday, July 8, 2020 at 12:04:58 AM UTC-7 Matt from Documatt wrote:
>>>
 Hi Bradley!
 Question #1 - You can't use filename as document title. First section 
 found in document will become a document title.

 Baz will be document title:

 foo

 bar

 baz
 ===

 but document title is usually at the very top of the file:

 baz
 ===

 foo

 bar

 Question 2 - you speak about breadcrumb navigation. If you have 
 correctly described relations among documents using toctree directive, 
 many 
 themes use breadcrumb > like > you > mention. Important here is to 
 emphasize that structure of book is described with toctree directive, not 
 with on-disk representation of document files.

 Matt
 blog.documatt.com

 On Tue, Jul 7, 2020 at 8:47 PM Bradley Bell  
 wrote:

> I only use one heading at the top level for each file. 
> The file name (without the .rst extansion) is a shorthand for the 
> heading at the top of each file. 
>
> I would like to use the file names, and only the file names in the 
> navigation tree. 
> The navigation for a section would show its children, and possible 
> grandchilren, down to some configurable level. 
>
> It would also be nice for the navigation to also show all the 
> ancestors above the current section; i.e., 
> the position of the current web page in the documentaion tree (using 
> the file names).
> I currently do this with links at the top of each section; e.g.,
>grand_parent > parent > current
> where grand_parent, parent, and current are the corresponding file 
> names and grand_parent and parent are links.
>
>
> How do I do this using sphinx ? 
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sphinx-users/284685c5-9204-4ebf-bbe5-f505b01475bfo%40googlegroups.com
>  
> 
> .
>


-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-u

Re: [sphinx-users] Re: Mimicking - Read The Docs

2020-07-24 Thread sphinx_2020
Part two of this guide is now live:

 * https://tech.michaelaltfield.net/2020/07/23/sphinx-rtd-github-pages-2/

If you don't care about how this works and you just want the quickest route to 
having a readthedocs.io-like documentation site hosted by GitHub Pages and 
built with GitHub Actions = GitHub's free CI/CD tools, you can skip the guide 
and just fork this repo:

 * https://github.com/maltfield/rtd-github-pages

Here's a demo of the site, built from the above-linked repo

 * https://github.com/maltfield/rtd-github-pages/tree/master

And If you want better support for the lower-left menu built-into the rtd 
sphinx theme, please +1 my PR here:

 * https://github.com/readthedocs/sphinx_rtd_theme/pull/983


Cheers,

Michael Altfield
https://www.michaelaltfield.net
PGP Fingerprint: 0465 E42F 7120 6785 E972  644C FE1B 8449 4E64 0D41

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/20200723154534.GA1143%40mail.michaelaltfield.net.


Re: [sphinx-users] Re: Mimicking - Read The Docs

2020-07-24 Thread Stephen Finucane
On Sun, 2020-07-19 at 09:17 +0200, Jörg Faschingbauer wrote:
> On 7/18/20 1:47 PM, sphinx_2...@michaelaltfield.net wrote:
> 
> > I just published an article on how to host a sphinx/read-the-docs site on 
> > GitHub Pages using GitHub Actions:
> >   * https://tech.michaelaltfield.net/2020/07/18/sphinx-rtd-github-pages-1/
> 
> Let me add a "me too" here, referring to an article of mine (and a 
> companion article) that looks a the same topic from a slightly different 
> angle (no RTD specifics, for example).
> 
> Deploying Sphinx Generated Documentation to Github Pages:
> https://www.faschingbauer.me/blog/2020/03/sphinx-gh-pages.html
> 
> Adding a Custom Domain to a Github Pages Project Site:
> https://www.faschingbauer.me/blog/2020/03/custom-domain-gh-pages.html
> 
> Jörg

Nice blog ++. As an aside, we (the Sphinx maintainers) would be more
than happy to work with anyone who wished to include this kind of
information into the mainline documentation (with links back to the
original resource of course). Some of our more recent tutorial content
is based off material from opensource.org and it's proven to be a good
addition.

Stephen

> -- 
> DI Jörg Faschingbauer 
> Linux und Open Source - Programmierung, Beratung und Schulung 
> https://www.faschingbauer.me  
> https://www.faschingbauer.co.at   
> j...@faschingbauer.co.at  
> Bergwirtstrasse 10
> A-8075 Hart bei Graz  
> Tel. +43-664-5783814  
> UID: ATU64329756
> 


-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/de19f1af59209a3d050f2c3cbd23cb656bb8b064.camel%40that.guru.