I'm using Sphinx in a project and I wanna change 'See also' title in top of the seealso::'s box in the template.
I also searched a little in the codes and saw the SeeAlso class in the Sphinx library but I have no idea how to override it and change the title.
Well, I finally found a way that I think is the simple one!
My question was to be able to change the title of sphinx specific admonitions like seealso::
In the locale folder (sphinx/locale/__init__.py) , there is a dictionary named admonitionlabels, that the titles are defined here.
To change it in the project, we just add this code in the project's config.py:
from sphinx import locale
locale.admonitionlabels['seealso'] = 'new title'
and when we use make html sphinx will apply our new title to the project
Related
I am in process documenting my python library. I would like to add custom icons. I see I can add font awesome icons. However, I must not be googling very well or...
Is it possible to add custom icons to Sphinx(-rtd-theme)? If so, is there an example? I cannot find one. Thank you.
The closest thing I found was the sphinx-design package then using the avatars class with the {div} directive (Myst). e.g.:
:::{div}
<img src="images/whale_trace.png" class="sd-avatar-md sd-border-1">
:::
note: i use .md instead of .rst. Thus, I use the Myst parser. In order to copy the image over and use the right path, the conf.py file needs to be modified :
myst_enable_extensions = ["colon_fence", "html_image"]
adding html_image will all resolution of the image. See Myst documentation:
> Blockquote
HTML parsing to the rescue!
By adding "html_image" to myst_enable_extensions (in the sphinx conf.py configuration file), MySt-Parser will attempt to convert any isolated img tags (i.e. not wrapped in any other HTML) to the internal representation used in sphinx.
_
[![enter image description here][2]][2]
There is another screen shot, in which need to change no file selected text.
You can use Nova's built-in Laravel localization feature to change the name for relationship-oriented buttons. It is explained in the docs here: https://nova.laravel.com/docs/2.0/customization/localization.html#relationships
I discovered the solution to above question today.
that is very simple.
Just add the translated text in auto-generated translation files from nova.
When we install the nova, it will generate resources/lang/vendor/nova
translation directory.
You can create your required lang file, like in my case, I need to add dutch translation so, I created the nl.json file.
Simply override the text as shown below.
{ "no file selected": "geen bestand geselecteerd" }
Is there a simple way (i.e., without creating an entirely new theme) to customize Sphinx so that it generates HTML pages without the search box?
An alternative, which I discovered reading the alabaster theme documentation is to explicitly list which (if any sidebars) are desired in the conf.py file. For example, including this fragment in conf.py:
html_theme = 'alabaster'
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'searchbox.html',
]
}
produces the searchbox; removing searchbox.html from that list and then building produces the same page but without the box. (More information can be found at the Sphinx documentation for the build-configuration file.)
You can do it by customizing (or should I say disabling) the searchbox template.
In conf.py, add this line:
templates_path = ["templates"]
Create a folder called templates in your Sphinx project directory.
In that folder, add an empty file called searchbox.html. This overrides the default template file (located in sphinx/themes/basic where Sphinx is installed).
I am using Confluence 4.0.3, I am trying to create a PDF layout/stylesheet so that it would grab the main title from the page content and move it to the title page.
What I have tried so far:
use the way that confluence suggests - it did not work well at all because it came with extra toc (np, I can hide it) and extra page content because it requires me to export from the parent level for it to work
I define a macro which contains the page title and I can use css to make it land on the title page. This works however if I was to export multiple docs this could pose a issue
Style the h1:first-child, this works but again on multiple docs this would be an issue.
Question: Is there a good way to do this on multiple doc exports? If not, does the page title have its own class that I can target instead of the h1:first-child? I tried h1.pagetitle (in their documentation) but it does not work, thanks
I used a user defined macro to put the title in and use the PDF export css to position it on the title page. This works as long as you are only exporting 1 document at the exporting level. If you are exporting 2 or more docs from the same exporting level then you can only define 1 of the macros or else they will all be at the same position on the title page.
This seems like the easiest way I found to implement something like this.
I would try employing a minor work-around. You could use a .asp page, which is located off of confluence, to pull the the pdf title and display it how you like. Then you can use an html-include macro to display the .asp page, and the pdf title it shows, wherever you like on confluence.
How can I change the body bg color to and specific article in Joomla?
We accomplish exactly this for a scientific site by specifying the Page Class Suffix when creating a menu item for the article. It's located on the menu option page under Parameters (System), and whatever string you put in there is appended to the class of the page. From there, your CSS skills and Firebug will be your friend to add your class and make changes in the appropriate CSS files.