Collapsible Table of Contents sidebar in Sphinx rtd theme - python-sphinx

I am using Sphinx to document my python code, I've opted to use the built in sphinx_rtd_theme (read the docs theme) as shown in
My documentation is purely local, it is in no way connected to the internet, it looks fine except that in the demo the table of contents(sidebar) expands and collapses when you hit the [+] or [-] symbols. Mine does not, actually it does expand on the first click, subsequent clicks open up the path to the index.html folder in windows explorer. Double clicking does the same.
My question is how can I prevent this behaviour and make my table of contents work just as in the demo with a nicely expandable/collapsible TOC.
Is it a setting in the conf.py file?
I did read the docs from the sphinx website which points to themeing options, but they only seem to apply to the classic theme. Am I understanding this correctly?

Related

How to collapse heading in ascii doc file

I have following file as adoc file.
= Template
:toc: left
:toclevels: 5
:sectnums:
:sectnumlevels: 5
== Course1
=== Section 1
This is section 1
=== Section 2
This is section 1
== Course2
=== Section 1
This is section 1
=== Section 2
This is section 1
I have installed asciidoc pluging in my chrome and when I open the file in chrome, it looks like this:
Some of the files are very big, and also the Table of Content has become huge.
Question: Is there a way to click on lets say Course2, and the sections under that would collapse, and expand if I click on it again.
I have tried the following link: How to collapse TOC(table of contents) in spring RestDoc (asciidoc)? and few other resources on internet but not much luck.
Please guide.
Thanks.
The main difference between the RestDoc solution and your current situation is the technique required to load the custom JavaScript.
In the RestDoc solution, the technique is to use docinfo files which get loaded during the execution of asciidoctor. See https://docs.asciidoctor.org/asciidoctor/latest/docinfo/ for more details.
When you use the Asciidoctor.js extension, you have to configure the extension to explicity load the custom javascript. The extension doesn't have access to the filesystem, so it can't look for JavaScript automatically. You have to load custom JavaScript into the extension itself.
Right-click the extension icon in the Chrome button bar, and select "Options". In the "Asciidoctor.js Live Preview" options pane, scroll to the bottom and click "Add a JavaScript...". The JavaScript you add needs to be in a file in your computer's file system. Once added, you can use the radio buttons at the bottom to select when the script runs.
Your browser's developer tools console will show any errors or console.log output from your added JavaScript code, which can be very helpful if there are problems.
This is not a problem with the Syntax itself but with the way you display the file.
If you have huge AsciiDoc files and need a good way to display them I would encourage you to check Antora, it generates a static website out of your AsciiDoc files in a very clear and organized way. You get by default this collapsing table of content on the left, you can check the default look in their documentation.
It changes the way you need to organize your documents and is a bit bit of work for the installation but the result is great.

Joomla Quickstart advice

Please I need some guidelines (or link of tutorials) in creating Joomla (3 - 3.5) website with the purchased template design. I wonder how professionals with experience are solving my doubts in practice.
Do you recommend the installation of the purchased blank template with a single installation and configuration of modules and components or installation of template with demo examples (Quickstart)? I know the differences but I was wondering how you are doing.
Till now I've almost always used the Quickstart installation.
I wonder if you clone the main menu (and other navigation and modules) and than you rename a copy for your needs and you change the content or you delete all navigation items except Home and than you are re-creating items according to your needs.
I'm not sure if I can copy the main menu or I copy only his necessary items and than delete overage of template.
It happens to me sometimes if I click on some of category it leads me to the main menu from original item, not to the desired custom copy, even though the path is set (the default items). Therefore, I am not sure which is better... copy main menu and items or to delete all navigation and content of the Quickstart installation and form my own navigation, content and modules.
In short, how to sort out all unnecessary items, and those that I am using should I copy and modify, modify existing, or delete all and make my own needed items.
I believe you will know my concerns.
Thank you and regards,
John
I have created several websites in Joomla with blank template and also with quickstart package.
Advantages with Blank Template
You will get the core theme without any unnecessary content and
basic modules and plugins. You dont have to delete any
contents/articles later.
You will be having authority to place modules at your desired positions. To check the modules position at the frontend simply do this http://example.com/?tp=1.
Disadvantage of Blank Template
There are some module style settings embedded in quickstart package that you wont be able to set yourself without going through full documentation. So sometimes your menu seems distorted.
Disadvantage of Quickstart Package
Deleteing unnecessary articles, removing unnecessary modules is a big headache.
Database size unnecessarily increases.
Steps I follow
I create a quickstart package in localhost and create a blank site with blank template in live site. Whatever settings I need I copy from the local website so that I am saved from removing unnecessary contents from live site. Also sometimes deleting some contents give rise to some other issues. Its better t go with a Blank template.

Mediawiki - a quick link to template editor

Wikipedia's navbox templates have v·t·e (view, talk, edit) links in upper left corner.
Now I have my own MediaWiki installation and want to be able to edit templates quickly (to have an edit link near each template or more advanced - near each template of certain type).
How to do this?
P.S. I am not sure whether this is the right place to ask such questions, but saw mediawiki tag on stackoverflow.
The links in navboxes are there, because a navbox template is created using Template:Navbox, which in turn uses Template:Navbar, which actually creates the links.
If you want something similar on your wiki, you can copy Navbar from Wikipedia, create your own version of Navbox (or whatever) and then use that in the specific templates that you create.

Where to find the tags used in theme short codes? As well as the general tags used in pyroCMS?

I was wondering where to find the tags to type to take advantage of shortcodes programmed in themes. Many themes have them, such as the one below. However I can never find the information required to make use of them in the read me's or on site documentation. Which makes using them impossible for me. Is there a specific html, css, or php file that is consistent to each theme and shows them?
Given the lack of write ups on what tags to use suggests that theme creators expect people to know which file to find them in.
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
https://www.pyrocms.com/uploads/default/store/listings/11-25-2012_9-41-20_PM.png
On a more PyroCMS rather than theme specific note, is there a list of all tags and their uses? Such as {{ settings:site_name }}, or the page body tag. Every link I have found to a list says that the list has been moved.
Thank you for your time once again.
Open up your file directory and navigate to:
path/to/your/files/system/cms/plugins/theme.php
Each one you can use is listed here along with an example in the function description. Each plugin in this folder is lined out the same way (files, session, asset, etc). You should be able to view each one and play with how to incorporate them into your project.
Edit: Also, you can find more information here: http://docs.pyrocms.com/2.1/manual/plugins
Notice that this is specific to version 2.1. If you are not using 2.1, in the top navigation add click on documentation and then select your version.

Plone 4.2 - how can I change the logo in a diazo theme?

I have just installed a theme in Plone called beyondskins.responsive. Now I want to change the logo so that it uses the logo for my site and not the default Plone logo. I've spent an hour googling this problem and I have not found a solution.
One of the places I looked was here: http://pypi.python.org/pypi/plone.app.theming#modifying-the-theme This site tells me "You can modify a theme by clicking Modify theme underneath a theme in the Themes tab of the Theming control panel." However, I don't know how to find the "Theming control panel" that they are speaking of. When I go to "Site Setup" after logging in as admin I see an option called "Diazo theme" and another option called "Themes" (just the fact that there are two annoys me...) but neither of these options has a "Modify theme" option.
Another place I looked was here: http://quintagroup.com/services/support/tutorials/index_html#plone-visual-design These guys have separate tutorials for each of about 30 different themes (one tutorial for customizing the Estate theme, another tutorial for customizing the Estate Classic theme, another tutorial for customizing the Coral theme, and so on...) The theme I am interested isn't listed, but all the tutorials seem to be similar and the first thing they address is how to change the logo. For instance, here are the instructions for changing the SkyCream theme logo: http://quintagroup.com/services/support/tutorials/skycream/diazo/logo
They tell me: "You can replace this logo with yours via ZMI. Open portal_skins -> sunburst_images folder, there is logo.png image. To set your own logo press Customize button." However, my system, which is running Plone 4.2 does not have a Customize button at this location. Perhaps these tutorials are aimed at Plone 4.1.
I'm starting to feel like I could have written my own theme from scratch faster than figuring out how Plone works. Please help.
UPDATE: Ok, so if I go to: mysite:8080/manage_main I get a list of the stuff at the Zope root. From there I click on my Plone site. From there I click on "Portal Skins". From there I click on "Sunburst Images". I then see a page with links to logo.png and pb_close.png. I then click on "logo.png". At the bottom of that page there is a button called "Customize". I click on it and it takes me to a page with the title "Image at /myplonesite/portal_skins/custom/logo.png" and gives me an option to choose an image file to upload. So I upload the image file that I would like to use as my logo. I then click "Save Changes". Now, my image file is larger than the original Plone logo. So it shows a larger logo, my logo, on this page after I complete the upload. I then go to my site to see my new logo. What I see instead, however, is the original Plone logo, but this time it is blown up much bigger!!! So it didn't change to a new logo -- it just kept the same logo but used the sizing information for the bigger image. I would much prefer to just deal with the HTML/CSS directly as opposed to working through a GUI, but I can't figure out where the html/css files are stored for the theme -- they appear to be packaged in a .egg file.
I'm going to assume that the theme is using the static HTML file (as referenced by the rule in rules.xml) to place the logo, rather than pulling Plone's standard logo through using a rule. In this case, you simply edit the theme HTML file (usually theme.html or index.html) and/or replace the image file it references.
In other words: if you know how to do this with HTML and CSS, you know how to edit the theme.
As a side note: In Plone 4.3, we'll ship with an in-Plone theme editor that should make this even easier. You'll get an option to make a new, in-Plone editable copy of a theme with a rich HTML editor that you can use to modify the markup easily.

Resources