I am looking for a way to serve a few static HTML pages with TeamCity.
I dont want to set up an apache for that, if not absolutely neccessary.
Does anybody know a simple way (or URL scheme) to access static HTML content. I found the following plugin, but that only inserts snippets of HTML in certain positions on existing pages. No way to include a full page. PluginLink for others as help.
Thanks for ideas,
Chris
Solution:
Go to e.g. C:\TeamCity\webapps\ROOT
Create folder e.g. static
Place file in it (but extension .jsp even if html)
Will be served without any problems (on URL/static/test.jsp)
It's a Tomcat server, just go on your file system where you installed Teamcity and you should be able to find out where you can park some html that will then be available on the Teamcity urls.
Related
I want to change the look and feel(ui customization) of Jenkins. Also I would like to add new views(say like new html pages or web pages) with navigation to the required jenkins pages etc.
Please let me know if any single plugins will help me to do so.Any relevant information(how ever generic) will be very helpful.
Any suggestions or links or tutorials is also appreciated.
PS:- Pretty new to jenkins.The inputs from here will help me to add more details to the questions.
I am looking for documents or tutorials that specify Skinning Jenkins using plugins like :-
https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/jQuery+UI+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/JSWidgets+Plugin
The plugin page is providing very little information on how to use these and the benefits and the extend to which the UI can be changed.
Any doc or link is appreciated.
Assuming you don't want to write a Jenkins plugin, for adding pages, the best suggestion I can make is to use an HTTP proxy such as NginX, and configure it so that the pages you want to add are plain html files, and Jenkins is proxied for the rest of them. To a visitor, they will look like they are all part of the same site; you could copy code from the head and body sections of Jenkins-served pages to include some of the navigation.
The Simple Theme Plugin, which you found, will let you do basic customization of the look and feel of Jenkins. I do that for my build server and proxy it using this configuration fragment for NginX. The relevant CSS is in this CSS file - toward the end, look for the // JENKINS CUSTOMIZATION comment.
We use the Simple theme plugin - pointed at a css file for the simple styling, and a JS file to fix a couple of DOM oddities (some of the tables in the new look and feel have mismatching column counts).
Those two files need only be hosted either a handy http server, or you can place them in usercontent.
You need only refresh the page in the browser to see the changes. Both files can then happily reference other files served up too.
Handy things to note:
Jenkins has jquery, parts of YUI loaded and prototype loaded - so you can use them in your scripts.
If while debugging, the refresh gets in the way then use the console to enter the following to temporarily stop it without pausing JS: refreshPart = function() {}
When making DOM tree changes to content that is refreshed - attach it to the layout updates with:
layoutUpdatecallback.add(my_function) - that way your changes are applied to new incoming content.
I have a website that is rewritten so URLs are .html
eg: mysite.com/about-us.html
I'm going to add a search feature in which could have a number of different criteria. So my question.... I know the following would work ok as I tried it:
mysite.com/search.html?var1=xxx&var3=xxx
Is there any reason why I should do this as html pages generally wouldn't have variables? I will test, but would there be any browser issues (old browser perhaps)? Any SEO disadvantages?
Thanks :)
Of course ".html"-files can contain variables.
It is not dependent of the Browser but the Server Configuration.
The Server respectively the php-parser must adjusted to parse .html files.
But I don't think that ".html" ending are relevant for google see:
https://webmasters.stackexchange.com/questions/5333/url-rewrite-should-i-write-a-fake-file-suffix-html-or-something-more-realis)
is it possible, or how could I make it so, I can include my topbar file into my page, I'd prefer it not to be with php since I am not hooked up with localhost yet.
Thanks for all help in advance!
HTML5 now allows you to include html files like you can already include a css file via an import. However, this would only be helpful for during your development stages and not for the final production version since the feature currently is only available in Chrome and will take time for the other browsers to adopt: http://www.html5rocks.com/en/tutorials/webcomponents/imports/
If you don't want to use PHP nor any other server-side scripting language,
you can use either <iframe> or <frameset> tags, which are deprecated, or perform an AJAX request using Javascript that embeds your HTML page dynamically. Second approach will work only if the page you're trying to attach is located within the same domain due to XSS protection in modern browsers.
It's more of a server thing, so to speak, so you would have to rely on the server more for this. Because, you cannot simply do this using static script, like HTML. There's no "built-in function" that can do this, it's not HTML's thing.
I mean, server will offer you more than one option, for example:
You can:
Use SSI (Server-side Includes) if server supports it.
Use PHP or ASP includes.
Otherwise, you can use AJAX for this, won't cost you as much as the above options.
If you mean "header" by saying "topbar", I think it's not a good idea to use iframes.
Files which are truly HTML parsed files can not include another file to my knowledge.
If you web server will parse php you could simply change the extension of the the main file to .php and include() the topbar file:
mv index.html index.php
index.php:
include_once("topbar.html");
Use <!--#include file="footer_text.html" -->
inside html page.
Plz, check below url for details.
https://www.lifewire.com/include-html-file-in-another-3469529
Is there any way to configure DocPad generate pages without extension, so hosting as static site in url it will look like: http://mysite.com/page1/ ?
Yes, but in a different way.
The cleanurls plugin when generated for a static environment (so docpad generate --env static) will output say pages/welcome.html as pages/welcome/index.html which accomplishes what you're after - which is you can access pages/welcome in your browser no worries. Document URLs will also be updated to reflect this.
The issue of just outputting pages/welcome without the extension is that then the server is not aware of the mime type of the file which the browser often needs to know how to process the file correctly.
I am using HTML5 offline storage. The goal is to make the whole site available offline. So intuitively, no server requests means all the pages need to be on the client. The only way I know of to accomplish such a task is to make the site into one page then show hide portions with jquery when the user "navigates". Is there a better way?
The html 5 offline spec allows multiple pages to be saved offline so you don't need to put all your content onto one page.
EDIT: link to spec http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html
Be careful that your jquery does not still point to the cloud. You'll need to save the relevant .js files locally.
N.B. If your whole site can be generated and saved as individual .html files then all you need to do is to save these files in the correct (relative) directory structure.