how to display HTML files on BitBucket? - bitbucket

We currently use GitHub for our code repos, which include HTML files for documentation. On GitHub, the HTML files in the repo only display the HTML source, but I can publish it to GitHub Pages, where it displays as a regular web page for my users.
We have just begun the migration to BitBucket hosted within my organization. It looks like the BitBucket Pages plug-in is the equivalent to GitHub Pages, but we don't have that plug-in and I do not expect to get it. Without that plug-in, is there a way to display HTML files as a web page? We also have JIRA and Confluence, in case those help.
I currently document my Python code with pdoc (pdoc3) to create HTML documentation. I don't think this question is specific to Python or pdoc3, but I just thought I'd add that, in case it matters. (I like pdoc3, but if another tool solves my problem, I'll try it.)
In short, how do I display HTML in BitBucket without the Pages plug-in?

Related

How to add javascript to JIRA 7

I have a JIRA server installed on my server I would like to add a javascript to all pages. any idea how?
I could not change any jsp file it seems that all are compiled could not be modified.
If hacky solutions don't make you feel uncomfortable, you might be able to use the "Announcement Banner" to achieve this. You can insert html/css/javascript there and it will be displayed on each page in JIRA.
There's an example available here.
The "Announcement Banner" documentation is available here.
Note that this only works on JIRA Server. On JIRA Cloud the Announcement Banner only accepts text or wiki format.

Github Pages return 404 error

I have several github repos that I'm trying to publish as github pages. I've created gh-pages branches for them and their repo's say that the pages exist, but when I go to the links they provide I find a 404 page.
I know that github pages are finicky and return this error if the home page isn't called "index.html" and I suspect that the problem is related to that, but I'm not sure how to fix it. All of the projects in question are rails apps with homepages in the views/home called "index.html.erb" and routes designating those pages as root. Do I need to rename those pages or there some other way to fix this?
Github pages is used only for static websites, you cannot host applications on it.
You wrote that you hosted *.html.erb files, which means you are trying to setup a rails application on it.
You can use static website builders to create Github sites, or code them on your own.
#bukk530 is absolutely correct.
Additionally, it would be worth noting that GitHub Pages does support hosting Jekyll sites, but nothing else. Static HTML/CSS/JavaScript and Jekyll.

Dump my MVC site to static files

I want to build a simple site with MVC but then render the "pages" and corresponding "assets" (js, css, images, etc) to what one might call a "static site".
In other words, I don't want to deploy to an IIS server that supports MVC. I simply want to build the site in MVC then somehow parse those pages into static html/css/etc files and upload the site to a regular LAMP host.
Is there an easy way to automate this? NuGet package? Binary? MVC extension like maybe a handler add-on that can render out the static site in a single pass?
About 10 years back, I used to download whole websites for offline use using HTTrack Website Copier. May be you could download your own website which gives you nice hierarchy of your static web pages. If you think all your webpages are reachable through the homepage links, menu links etc then you can download most of your website. Basically you can google for web crawlers/ offline browsers/website downloaders etc. and run them to get your job done.
Alternatively if you know the pattern of urls, you could give it to download manager to download them. Not sure if it works with your website, but I do it sometimes.
HTH
If your site depends on a database or some other dynamic source it will be close to impossible to dump all possible combinations of pages into static files. If on the other hand your site is pretty much static, saving the rendered HTML/JS/CSS source into files and uploading it to a LAMP server won't be too hard.
You may wanna look at Pretzel, a .Net static site generator.
Update: Apparently it doesn't work on ASP.Net projects: Issue #123. It only supports Razor language for authoring content pages.
If the reason for doing this is performance related why not just use output caching and the like, that way the pages will be extremely fast (you could set the cache timeout to a very long period of time) and you don't need to run some tool to do the conversion and have to store your html separate to your source code.
Of course you will still need to run IIS/.net
You have three options:
Create your website using plain html, css, jquery and images. You can use Visual Studio Code as IDE to create the files. One issue might be to manage common header/footer for your website. But you can solve it by injecting html header/footer using jquery.
Use a CMS (content management system) like Umbraco to host your static site. Umbraco indexes and caches pages to improve performance. You have great control on what to publish on your website etc.
Create the website using .Net + MVC and use tools like HTTrack to download a static copy of the website. You can even automate the process using commands and triggering it after every deployment or build etc.

Adding html form and input tags into Symfony static pages

I inherited the management of a Symfony site and need to add some HTMl form tags to one of the "static" pages via the CMS. The scenario I have is:
/index.php/splash/welcome pulls up the welcome screen.
We want to be able to add a subscription button on that page.
The HTML has been supplied for us by the company that handles the subscriptions.
The form post method has an action that references a script on a remote site (no lectures on the security implications please ;-).
When I add the <form... and <input... tags via the CMS admin panel, the tags get removed automatically by Symfony.
Is there a way to tell Symfony to allow these tags?
Thanks in advance,
Marty.
This is goign to depend completely on how the developer set up the CMS. Youre using a rich text editor in source mode i would take a look at that editor's config file and documentation because its probably the one responsible for stripping the tags.
If its just a plain text area i would check the submit action for the edit form and take a look at the code... he may be using something to strip them in there.
If youre using one of the Symfony CMS plugins (Diem, Apostrophe, Sympal) i might be able to help further if i know which one youre using. If its something custom we would need to see the code. This isnt really indiciative of the Symfony core, but rather the CMS youre using.

ASP.Net Share Master Pages, Js, Css across multiple applications

Okay, so I have a couple of ASP.Net Mvc web applications that I would like to share a common master page, some css and js files across...
I tried creating a common repository for the files and then in my studio projects using the Add Existing... As Link... feature but, this doesn't appear to work...
When I try and debug the project I get an error stating the master page cannot be found. Which is because it doesn't physically exist in the location where I created the link...
Has anyone gotten this to work or perhaps have another suggestion on how to share these types of common files...
Thanks..!
If you're using a source control system like SVN, you could keep your master page in one repository and reference that repository with a svn:externals property in your project repositories.
You could then branch the master page if each project required a modification that the other did not, while still maintaining the ability to merge changes made in the original.
You won't be able to share master pages, but it's possible to share static resources like CSS files and Javascripts, but you wouldn't add them to your web application. You'd just reference them in your aspx files and provide their URL.
Where do these files reside? anywhere on the disc or in a folder of some other application?
i don't think it is a good idea because if you have a source control you might need to check in the application source code (including css and js files and masterpages) so someone else on an other machine can run (modify or update) it without problems

Resources