How to generate html documentation with a prefix? - python-sphinx

I want to generate documentation to put on the web with a certain path prefix. But I can't figure out how to generate the documentation so that the links are absolute instead of relative. The html_baseurl parameter doesn't work at all.
Let's say I want to place documentation in the /docs prefix when deploying to the production. How can I do that?

Related

Support for many subdomains in manifest

Is there a way to use dynamic subdomains for the property in the manifest file, or something like wild cards? <AppDomain>https://*.somedomain.com</AppDomain> We have a large number of subdomains, 1-per customer.
Is there a good way to handle this?
Based on this document, it's impossible.
Instead of just typing, you can generate the manifest file programmatically based on the full list of subdomains. ex; create an endpoint returns XML file (generated one with full subdomain lists.)
Currently, this is not supported in the manifest. (check the link in Stefan's answer). This is a feature that we know is desired, but we do not have a timeline for if/when it would be shipped.
Suggestions/Voting for this feature can be done at: https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/13314972-support-wildcards-for-appdomains-in-office-add-in
However, wildcard subdomains on the source URL in the manifest are currently supported. For example, if the SourceLocation is contoso.com, then customerA.contoso.com would be allowed.

Rewrite part of a URL to capitals

I have a CodeIgniter application that I'm maintaining and all internal links follow a structure like:
website.com/name-of-application/page
However, the page is only served if the middle section follows a specific capitalization structure:
(ie: website.com/Name-Of-application/page)
This is strange to me, because all of the files themselves are lowercased. Is there an easy way to redirect/rewrite URLs to follow the strange casing in either IIS or CodeIgniter itself? Thanks so much

Advice for displaying image in MVC using inline style

I am new to MVC, so please forgive me! I have the following line in my
Views/Home/Index.cshtml file:
<div class="grid-content" style="background-image: url('~/Content/pics/mypic.jpg');">
(The _Layout.cshtml renders it using the standard RenderBody() call.)
But it will not display the pic. If I replace the path with a full qualified path to an internet pic, it will work. It won't work with the above syntax.
It seems to me that it has to do with the multiple uses of single/double quotes, maybe.
Is there a way for this to work? I have yet to learn how to make use of Url.Content, or some other helper method.
Any suggestions?
The url() you pass is a path to the resource from your web server, either relative to the calling page or an absolute URL.
The example you have provided looks like a file-system path, not a URL that your web server understands, which is why fully-qualified URLs to an "internet image" work.
Your document is stored in Views/Home/Index.cshtml. If the image is stored in the same folder , then simply change it to url('mypic.jpg'). If not, adjust accordingly.
Change the path from ~/Content/pics/mypic.jpg to something that is relative to the document you are serving. For example, if the HTML
(Yes, URLs can contain tildes, but generally they designate "what follows is a system username", like /~Coreysan/Content/pics/mypic.jpg, which would direct your web server to find your ~/<whatever your web server folder is>/Content/... resource).

How to manage URLs in CodeIgniter so they can be updated in a single place

I believe Smarty templates has functionality built in that allows you to manage your site URLs from a config file so if something gets moved, you only have to update the URL in one place. Does this sort of functionality exist in CodeIgniter? If not, any pointers or examples on how/where to add it?
For example:
Instead of hard-coding the link it would be: Settings
But where would you want to set $links so that it was available everywhere? Or is it really best to just hard code them?
Take a look at the config class. It allows you to make custom config files.
It's not entirely made for URL's but you sure can use them.
The base url should be basically right at the start of /app/config/config.php, where app is the name of your codeigniter application folder. You access it through calls to the base_url() function.
Yes, it's called Routes, configuration located at config/routes.php. Documentation
If you ask about the rendered html of the links, then your best bet would be using site_url() in conjunction with constants, for example site_url(URL_SETTINGS);, there is no built in functionality for that, but I can say I don't think that is necessary as it would be used too rarely, but it would influence performance every single load.

How can I override the URL writing mechanism for .script <include-script> tags in Tapestry 4?

Previously on StackOverflow, I wrote this question where I asked how to append a build number parameter to the generated URLs for Tapestry assets to solve caching problems. I ultimately answered my own question: replace Tapestry's default asset source with a custom one which wraps the generated assets to tack on the build number. But I've found out that .js files imported by the <include-script> tag in .script files are not using this mechanism and are therefore not getting the build number on them. So I'd like to accomplish the same objective with them. How?

Resources