I'm new to GitHub Pages and Jekyll, and moving my blog to it.
I decided to use CDN for Twitter Bootstrap, so just copied example links from official website to the default.html template which is in the _site/_layouts/default.html
But when my site is generated, Jekyll creates a local copy of css on the fly, so instead of pointing to the CDN, it creates a link to /assets/styles.css file, but styles are not applied.
Also, at the default.html page bottom, instead of 3 JavaScript files on CDN I got only one unknown to me pointing to CloudFlare.
What I have to do to bypass Jekyll processing links to the files located on CDN?
The problem was in the folder structure. I put my whole website in the _site subfolder (you may notice that from the path I provided in the question). The website generated correctly after I moved all of its content to the root folder.
Related
I've moved all my CSS and JS to the Cloudinary CDN and everything works except where the JS files need to grab an image.
I've got a index.html file thats pulling the JS and CSS from the CDN without issue but when JS goes looking for any image I get an error saying the resources is missing.
On the CDN I've created a few folders for CSS, JS and images and used root paths in JS as normal, example: "./sprites/img1.png".
When I have this folder/img in the same directory as the local HTML file it works fine.
If I move that folder to the CDN it cant find the resource.
Looks like once the JS is served to the local file it also expects local resources.
Is there anything I can do to prevent this besides placing the HTML file on the CDN as well. Cloudinary doesnt allow HTML to be served to the browser you see.
Thanks for any help and if you need further info dont hesitate to ask.
Found the issue.
The paths in external JS files are relative to the Page they are included in (in this case the index.html page), not the actual location of the file.
Thats why it was searching the local directory and not the CDN.
Solution comes from another Stack Overflow question:
Relative Paths in Javascript in an external file
I'm trying to integrate the CKEditor in Dynamics NAV. Dynamics NAV allows to integrate JavaScript AddIns. Unfortunately, there are some restrictions. One of these restrictions is the strict folder hierarchy for all the files, that belong to the addin. In order to import such a JavaScript Addin, the developer has to create a .ZIP file with a manifest.xml file in the root and three subfolders for Script, Stylesheet and Image. As you can imagine, if I split all files from CKEditor and its plugins and put them into the new folder structure, the editor won't work. On the other hand, if I leave them in their original folder structure, the AddIn could not be imported into Dynamics NAV.
Any ideas?
Put any Third-party software components on the IIS / NAV Webserver.
reference the js inside the Manifest.xml with:
<ScriptUrls>
<ScriptUrl>https://yourserver/ckeditor_version/ckeditor.js</ScriptUrl>
</ScriptUrls>
This is the offical way for all components:
https://learn.microsoft.com/en-us/dynamics-nav/manifest-overview
Where is stored ghost.js sorce html file?
I want to create website using ghost.js, but I can't even find a html source file.
Ghost is a CMS. It generates content from templates.
See the template guide in the documentation.
You'll find them in the themes directory with .hbs file extensions along with a README that explains all this again.
So, I am copying a file hierarchy from a hosted application to my local machine. The hierarchy absurd, and after copying the http.conf file, the page loads, but not the JavaScript. It can't find the location.
Apparently there is some mechanism that overrides the DocumentRoot, like some sort of ad hoc routing.
I can't even find an .htacces file.
Is there anything in Apache that can suppress or alter the directives in http.conf?
Fixed this. In my case, the application was meant to load a custom filetype, but instead was loading the default .html because there was an index.html in the directory. Once I deleted the empty index.html the index.custom file loads.
Here is the problem. The company I work for has a number of sites, and many of them use the same jQuery UI widgets, like datepicker. I would really like to have just one copy of each widget in an _javascript folder on the top level of the server. The problem is that because the code is outside of the site folder, I need to use ColdFusion mappings to point to it. Apparently you can't use these with script or link tags however. It doesn't expand the mapping. So I tried using "ExpandPath" and got a message that it doesn't have permission to access that resource. Some research turned up that JavaScript can't access files on local file systems because that would be a security hole. So, although it was ugly, I tried wrapping the CSS file in tags and the JS file in tags, and then included them with cfinclude. That worked- sort of. The main issue is that apparently the css uses relative links to link to the images used, and those are all broken because the JS is included on a page in another folder from the script and images themselves.
Here is my question. Is there any good solution here? I don't think that what I want to do is unreasonable, but should I give up and just keep a copy of the widgets in every site folder? Thanks in advance for any help.
Included javascript files, like CSS files, don't have to be touched at all by the ColdFusion processor. You just use ColdFusion to craft the link and feed it to the browser like you would any image, attachment, or link to another site. The only difference is that this link is in a <script tag. So if you have several sites and want to access a common /js directory on all of them the work has to be done in the web server itself (IIS/Apache).
In your web server of choice make a virtual directory (or symbolic link) to your javascript directory called /js (or whatever name you choose). Do this for all the sites, and you have one /js directory that is accessible from all the hosted domains.
My situation is that all our ColdFusion work is intranet only. While we only have a few sites, that is more than one. We also use a development server as opposed to having people develop on their hard drives.
The first thing we did was to create a mapping on "/" to point to a certain directory. Let's say that it's c:\fred. In c:\fred we have subdirectories named images, css, js, udf, etc. That allows us to do stuff like this:
<cfinclude template = "/Templates/Reportheader.cfm">
<link rel= "stylesheet" type= "text/css" href= "/css/cashflow.css" title= "style1">
<script type="text/javascript" src="/JS/browserDetect.js" ></script>
in any application.