Problems deploying to github project pages - deployment

Sorry if maybe I'm asking something very basic. I'm having some problems when deploying this repository which is not under a User or Organization Github account. When I deploy to localhost I don't have any problems at all and the blog theme runs perfectly. But this is not the case when I deploy to this Project page. You can see the publication result here.
Any tips?
Many thanks for your help!

In your index.html page you have given the path to your css, js and images from the site root eg: /images/logo.png, but your files are inside the blog folder. Change the paths in your index.html page to document-relative paths like this: images/logo.png.

Saravana is right about the inconsistency of your URLs, however I would suggest the following solution which I believe is a bit cleaner.
There is a baseurl variable that can be set in your _config.yml file. This can then be referenced in your layouts and other files with the {{ site.baseurl }} liquid templating syntax.
You can then do something like the following to get consistency across development and deployment:
<img src="{{ site.baseurl }}/images/logo.png">
The other benefit here is that if for some reason you need to update the base URL, you can do it in one place (the _config.yml) rather than having to go through and modify every URL in your site.
Read more about Jekyll configuration here.

Related

Hugo site doesn't deploy to custom domain

I recently created a personal blog site with custom theme using HUGO (source). It deploys on netlify (link) perfectly. But I wanted to publish it on my own domain (mydomain.xyz/pen). I already have a portfolio on mydomain.xyz, therefore I want to publish on a subdomain (/pen).
I tried using github pages for that but it is showing weird result without any theme (just raw HTML).
Can someone tell me how can I resolve this issue? If necessary, I can also publish using netlify but on my own custom domain.
It sounds like the links to your static files (CSS, JS, etc.) are broken, and so the CSS isn't getting loaded. Are you setting the baseURL configuration option correctly? If this is set to the root of your domain (https://mydomain.xyz) instead of the subpage (https://mydomain.xyz/pen) then this could lead to the links being broken.
If that doesn't work, then let us know what theme you are using, and let us see your configuration file (with any sensitive info redacted). This will enable us to check if there is a problem in how your theme is displaying the static content, or whether there are any other issues with your config file that are causing the links to break.

Jekyll and GitHub layout issues

I've had my blog on github for a Jekyll. Out of nowhere, when I drill into a post, the formatting of the post is not right.
Any suggestions on what to tweak to get it back to it's defaults?
https://dfinke.github.io/
https://github.com/dfinke/dfinke.github.io
Your CSS is not loading.
AND your main.js isn't loading either, and it is being called twice, and it is being called from the posts directoy like the css above.
The problem appears to be paths.
For example, your path to the css is currently the individual post's path:
https://dfinke.github.io/2017/Microsoft-PowerShell-Yaml-and-VSTS/css/main.css
Whereas I think you want it from root (looking at your files):
https://dfinke.github.io/css/main.css
Your head.html include states this:
<link rel="stylesheet" href="{{ "css/main.css" | prepend: site.baseurl }}">
I note your _config sets site url as 'https://dfinke.github.io' and baseurl as '/'.
So that seems right to me from Jekyll perspective.
Something appears to be changing the url parts on your assets' paths.
I note you seem to have .ps1 powershell scripts.
I don't know powershell scripting, but looking through New-BlogPost.ps1 it does seem to be dealing with paths.
Perhaps github now runs powershell scripts, and that is now changing your paths somehow?
Hope that helps.
PS - If it is an issue caused by your powershell scripting, you may want to update the question title to reflect that for future readers.

Issue with Jekyll on GitHub

I'm having a problem with loading work section, on my web site. This is the repo: https://github.com/Vukasin90/test/blob/gh-pages/_includes/work.html
and this is the we site: https://vukasin90.github.io/test/
when you click thumbnails, it should open a bounch of images and paragraphs, basically a html document.
When I run it locally, it works just fine, but on gh-pages it wont load (there's only a spinner animation, which I've put to show when loading is slow).
I'm guessing that it can't be done this way on GitHub, but I don't have any idea how to go around this problem. Or maybe I made mistake with links, or something. I really don't know
I think this is an issue with your js, not Jekyll.
Jquery is requesting: https://vukasin90.github.io/work/work-1.html
Instead of https://vukasin90.github.io/test/work/work-1.html
There are other js errors too - other 404s and blocked resources.
If you want to reference full paths in jekyll, you should use site.url and site.baseurl with something like:
..data-folder="{{ site.url|append: site.baseurl }}/work/work-1" style="background-image: url({{ site.url|append: site.baseurl }}/Assets/img/work/proj-1/thumb.jpg"..)
Have fun.
EDIT:
Amended above to show on page changes better.
Alternately, if you want to fix keeping your inline relative references, then change these:
...data-folder="../work/work-1"...
To:
...data-folder="../test/work/work-1"...
However, keep in mind this path reference issue between Jekyll and your js could crop up in other ways. So id recommend using full path references throughout or change your js setup to include the baseurl.

Joomla 3.6.4 home page does not use correct robots meta data

Whilst in development on a temporary subdomain I had robots set to No Index, No Follow in the Joomla 3.6.4 Global Configuration.
After moving the site to its permanent home I changed the settings to Index, Follow but, all the pages are fine, except the home page, which is still showing (when source is viewed) meta name="robots" content="noindex, nofollow"
I have changed the menu item to 'Index, Follow' rather than 'use global' and, when that made no difference, also did the same for the single article which is assigned to that page. Still no change. It doesn't change on the original development site version, either.
This is a template that I have used many times before: I keep a basic copy with some global tweaks that I have made and then adapt it for each new site. I can change the robots meta tags on this original template with no problem.
I have no SEF plugins. The only SEF tool is the System - SEF.
I have checked all the template files over and over and I am now about to tear my hair out.
Any suggestions gratefully received.
(p.s. can someone with a better reputation than me please add a Joomla3.6.4 forum tag?)

How to create a base template and use it to wrap other templates in Ionic framework?

I couldn't find anything about this. basically i want to create a base template, with all the head tag and container in body or menu, etc... so that other templates can extend it.
how would i achieve this with Ionic framework?
The way you have phrased your question leads one to think you have not quite understood how Ionic works...
A typical Ionic app has only one index.html file with a <head>. The rest of the .html files are just content templates to be rendered as the content of that page. So you don't need the "base template" you are asking about, that is all taken care of by Ionic, from the index.html.
I would suggest reading and following http://ionicframework.com/docs/guide/starting.html