How to use Intersphinx to link documents when the underlying domain will change? - dns

I have a use case for reStructured Text documentation in an offline scenario. It will move from one domain to another when installed and often No Internet access will be available. I'm assuming HTML output of sphinx. I have multiple microservice projects that I'd like to be able to share links between them using Intersphinx. The projects will ride together and someone browsing one project will have access to the others. I expect they could always be arranged to be in a project folder on the same top level domain even.
All the examples I see on the Internet seem to assume that a static domain will be in use and the documentation isn't copied to new places. Is there some way to easily account for a changing domain?
An additional concern that maybe covers the previous is relative linking. Can we account for the domain change in a way that won't require me to rebuild the docs? In HTML I'd have links to "/some/page.html" instead of "http://example.com/some/page.html".

Sounds like you're just looking to use relative paths instead of domain names. If that's the case, you would do something like this in your conf.py:
intersphinx_mapping = {
'other': ('example/', 'example/example.inv'),
}
From the intersphinx extension docs:
Relative local paths for target locations are taken as relative to the base of the built documentation, while relative local paths for inventory locations are taken as relative to the source directory.

Related

Path of newly added image files in IBM Connections

I have been trying to customize IBM Connections UI and have been able to insert and execute code in header.jsp thanks to the material available on the web.
The problem is if I add a new image file under the themes directory in <IBM_CONNECTIONS>\data\shared\customization\themes\images, how do I reference this image in header.jsp? Surely I cannot use an absolute path here which is <IBM_CONNECTIONS>/connections/resources/web/com.ibm.lconn.core.styles.oneui3/images/myimage.png.
Similarly I would like to add a new JavaScript, but I am not able to figure out how to give its relative path in header.jsp.
The <CONNECTIONS_CUSTOMIZATION_PATH>/themes directory should only be used to override images referenced by existing stylesheets, or add new images for custom stylesheets. If all you need is to display an image, the recommended location is <CONNECTIONS_CUSTOMIZATION_PATH>/common/images (create subdirectories if necessary). The image will be available under every application's context root, e.g. /files/images/myimage.png
claudiopro, your solution works with /files/images/myimage.png and /profiles/images/myimage.png and so on. But what about main /homepage/
The url /homepage/images/myimage.png is not working.
Do you know how to avoid that?
Do you also know where the solution you provided is documented in IBM Knowledge Center?
In documentation of Connections 5.0 there are few pages about images and CSS custiomizations but some of those solutions are not even working, some are in contraty with each other...

Limit IIS virtual Directories pointing to same folder path

I have an asp.net project that I use for a couple different purposes. We have addresses that access the same virtual directory via different paths (use1.company.com and use2.company.com) I do not want to break the project up as they use similar functionality that seems redundant to have in two places. None the less as it stands use1.company.com/default.aspx and use2.company.com/default.aspx both are the same. I want to make it so that use2.company.aspx/default.aspx is not accessible. Is there a way to do that from the App Pool/Virtual Directory settings or do I just have to hope that external users dont type /default.aspx?
I know I can set the default document to like survey.aspx (purpose of the second url) but that does not prevent some savvy users from typing in default.aspx just to see what it does. Any assistance here would be great.
Since they point to the same .aspx file could you not include an if statement at the start of the file to grab the URL and if it includes use2 then go back?

Creating a testing enviornment to test fixes without duplicating entire site

I have a rather large site with hundreds of files and a footprint of many hundreds of mgs. I have in a place an assignment system that we utilize to work on enhancements and bug fixes. What I'd like to do is setup a system in which each assignment gets pushed to the web server (testing server) in it's on "sandbox".
Typically I'd just create a copy of the site under a virtual directory, replace the files affected by the assignment and proceed with testing. Problem here is we would be making many copies of massive amounts of files.
What I have in my head would be a system where a "master" copy of the site contains all the current files (presumably from source control). From there create a virtual directory for each assignment with symbolic links to all files and folders except for those actually changed for the assignment.
I essentially want to create a integrated build process that will create the virtual, pull the sym links from master and then replace the links of the files that changed with the actual changed versions from the assignment.
Is this a possibility with Windows Server 2003 and IIS?
Probably possible, but sounds like a nightmare. Must all of these files be copied to each testing site? If they are merely content files (htm, gif, jpeg, etc), leverage VDIRS to a common location. It can even be a network location.

Linking to files in Expression Engine templates (path name problems)

Hey, new to expression engine - loving it, but having difficulties with linking to external files. I know this differs from server to server, but at present I see no end to these woes and would appreciate a nudge in the right direction. Server issues of any shade tend to give me panic attacks. They are my kryptonite.
1) Expression Engine 2.1 is installed in a subfolder of our site (www.website.com/client)
2) I have made a template group and set it up to save as files, and uploaded a logo within a subfolder (system/expressionengine/templates/default_site/site.group/images/logo.jpg)
Linking to either (www.website.com/client/images/logo.jpg) links to naught. Neither do longer variations like (www.website.com/client/system/expressionengine/templates/default_site/site.group/images/logo.jpg)
Halp.
Template groups are not meant to hold that kind of static content, /templates is not public (at our install it is even outisde of www).
You need to change your upload folder to /client/themes/uploads or something similar, then you can access your uploads as {path=themes/uploads}/image_name.jpg
try using the path: /images/logo.jpg or /client/images/logo.jpg
Also, direct those questions to http://expressionengine.com/forums/viewforum/113/
you'll receive help from a larger pool of knowledgeable users.

How to host multiple webapps using only 2 Virtual Directories

my shared hosting only allows me to create 2 virtual directories. and i want to host multiple webapps... say an asp.net mvc blog, a forum, a personal site etc...
isnt there any other way of doing this? cant i simply just ftp the blog folder to one of my virtual directories and then access it online??
For ASP.NET web applications, typically each would live in its own virtual directory which serves as the application starting point.
Technically you could "piggy-back" two applications on the same application starting point in one of two ways:
Put all the files for each application in the same directory (and appropriate sub directories)
If you don't have ANY files that overlap, you can get away with this. Of course, it's likely that you won't with such files as the default or index pages, etc. And this would be pretty messy anyway.
Put all the non-binary files for each app in an appropriate subdirectory and the binaries in the main virtual's \bin directory.
You'll be able to do this only if each application's binary files don't overlap by name AND there are no namespace ambiguity conflicts between assemblies (two different assemblies by file name, but with the same namespace). The latter is much less likely to happen if you are trying to piggy-back two different applications.
The big problem I see with the latter solution is that any parts of the application that make use of application root references will break. When some code tries to resolve a reference to some resource (like an image) based on an application root reference such as
~/images/logo.gif
the ~ will get resolved to the virtual directory, but will not include the additional (non-virtual and non-app starting point) subdirectory in which the application lives. So instead of this:
/vd1/app1/images/logo.gif
you'll end up with this:
/vd1/images/logo.gif
Obviously, that won't work.
So... you won't break either app if you can put them both in the same virtual directory, however, you'll have to check for file conflicts and such. Possible namespace conflicts will be unavoidable without separate application starting points.
Can't you just put each app in a separate subdirectory in either of the virtual directories. e.g. if you had http://server.com/vd1, you could partition it like http://server.com/vd1/app1, http://server.com/vd1/app2, etc.

Resources