I'm building a website hosted on Github Pages that has a gallery that sources a lot of images from a folder. I keep running into two problems:
1) I upload a picture and Github automatically rotates it?
2) HTML wont find the image if I reference it as say "example.jpg" when it is saved as "example.JPG". Less of a question, just looking for insight into why theres a distinction when capitalized.
Your best bet is to probably just manually edit (rotate/align) the photos in your computers builtin photo software.
As for the image extension, if you're running into problems with file extension capitalization then just go with what works. Change all extensions to either one uppercase or lower case would make the most sense to me.
Linux's file system is case sensitive; but in general, a best practice I follow is to point to what the URL is vs. what I want/like it to be.
Reference to another similar answer here
Here are the instructions to edit/add images to GitHub Pages
Related
I have been generating HTML documentation for my C++ code using Doxygen. Where I work, we have a MediaWiki page where we write documentation for a lot of our applications. Since this documentation is auto-generated and is already in a nice clean HTML format, it doesn't make sense to rewrite it to put it on the wiki. All I really need is to be able to put a link on the wiki to the auto-generated HTML.
I have been having a lot of trouble figuring out how to simply put a link to an HTML file in the wiki. It seems like it should be such a simple thing to do, but after doing some digging it really is not very straightforward. I don't even know where to put the file for it to be visible to the wiki server... I'm completely lost.
Does anyone know how to do this?
It turns out UNC links will work to access HTML files from the Wiki. The files just need to be stored in a location that the Wiki server can see such as a shared drive.
On a side note, in our Wiki, the links only work on internet explorer for some reason. I figured I would at least mention this in case someone else is trying to get this to work on a different browser and running into issues.
I have a JPG in the header section of a responsive HTML page. I want to use the same site content for multiple domains that will point to my single set of files at my hosted URL. Example : mysite.com will host all files. But a second site - example theirsite.com will point in a forward to my hosted files location.
All the content will be the same, EXCEPT FOR the one image file (logo.png) or can be any name, but I would like to see if I can image-substitute 1 file (logo.png) to render so that, when visitors come to mysite.com, they see my file. When visitors come to theirsite.com they will see the logo file for theirsite.com instead of for mysite.com Sorry if I have not explained this professionally.
There are two real ways to do this. The best way is to handle it server-side.
You would need some sort of dynamic site generation, such as PHP. As the site isn't changing on each request, I'd recommend doing this generation ahead of time. Then you can utilize static hosting on CDNs and such. The specifics of how you do this depend on your technology choice. And, it matters little what you pick.
Doing the switch server-side is better, as crawlers will be able to see the right version of the site. Most crawlers don't run client-side code.
The second option is to handle it client-side. In this case, I'd recommend including a site definition file for each domain and writing some JavaScript to check the hostname the site was loaded on, and load the right site definition file. That file could contain elements and attributes to replace. Again, this is less desirable of an option, but still possible.
The question is very simple and even tho I might get downvoted into oblivion for it, I can't find a good search query for this.
If I link images, stylesheets, scripts and other things with the full website url (http://url.tld/css/style.css) instead of path (css/style.css) , are the visitors affected negatively? Is there any difference?
The html page is on the same link as the resource, so we're not talking about external resources.
This only makes a difference if you change your domain name. You cannot simply transfer the scripts over but have to change each line or the include of those files then.
One small thing to keep in mind: Your string will be longer and so your file will be a very bit bigger in size but it doesn't really matter.
Either won't affect visitors. Specifying the protocol might cause problems in the future if your users can switch between http and https. Specifying the folder also means changes when you move the site. So best to use relative
I've made a website which displays images hosted on other sites using the html src="http://......" tag, however sometimes some of the images won't load. This appears somewhat random, and I don't think it is a problem with the links themselves.
I display a lot of images, so I am wondering if this is a common problem when trying to load many thumbnails from another site. Is the best solution to host all the thumbnails on my own server, and if so, is there an efficient way to do this (so I don't have to manually download and link to every image)?
Thanks
Is way better to host it on your own server.
Because if are all from other servers, you must connect to all servers and download it.
It causes worse response and increase the time required to load the page.
To the image and links downloading - I think it is possible, just go on google and try to find some advanced html page downloader. I had one and it worked directly the way you want. - can't remember the name..
(also sorry for my bad English)
Recently I have been trying to achieve a navigation for my website that can view files and folders and go up one directory etc...
I have realised that if I make a folder on my website FTP server and then within that folder I put a whole lot of other folders or files it will list them all in an "Index of/ " (as long as there is no "index.html" or similar named file)
Please use this as an example:
http://ysk.co.za/test/
So now I would like to change the CSS of that page that indexes the files and folders, and possibly edit it in other ways.
Is it possible to do so? If not is there an alternative to achieve similar results.
Answers would be much appreciated, thanks in advance
What you're seeing there is just a directory listing on the web server. Since you haven't written a page (using some sort of server-side technology like PHP, JSP, etc.) that actually lists the directory structure, you aren't going to be able to extend the functionality of the page or change the appearance using only CSS.