Windows: creating Jekyll pages not working - jekyll

Unable to render new page in browser. I'm on Win7 and have Ruby1.9.3 and DevKit installed. When I create a new Jekyll site everything works. I copied the index.html in root and renamed to about.html and that worked and was able to view both pages in the browser. I copied the about.html page and renamed to contact.html and the page fails to inherit the layout and only renders text content and Liquid tags in the browser. All of this is on my local machine. Thanks for any advice.
Repo: https://github.com/greenlightjspence/JekyllWin7/

I had similar problem today and after almost hour fighting with it I finally found that Visual Studio saved my file with 'UTF-8 with Signature' encoding which was causing issues. Changing file encoding to 'UTF-8 without Signature' helped. To change file encoding, open file (index.html in my case) and go to File->Advanced Save Options. Hope it will help you as well.
Looks like it's known issue mentioned on official Jekyll site (http://jekyllrb.com/docs/frontmatter/).

Related

My Visual- Code-Editor is not showing the included CSS in the Live preview

I just reinstalled windows on my computer. The problem here is that when I was using the visual code editor before reinstalling windows with the live preview extension and it ran perfectly, but now after I installed windows the VC do not give me live preview like before.
It is just showing the HTML structure and not the linked CSS and Javascript files. There is no styling and formatting being shown on the page even though the page displays perfectly on the browser, tried everything but nothing worked. Note that both windows versions are the same no changes in them.[Only HTML shows up][1]
[no definitions found said by vs code editor also]
Yes, it only shows the HTML preview without CSS. You have to use "Live Server" extension for that.
Download that from here:
https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
GitHub Source:
https://github.com/ritwickdey/vscode-live-server-plus-plus
Preview:
does a .vs code folder appear ? This problem happened to me once and by deleting the file everything went back to normal. IDK if it will work for you but it worked for me.
BTW there is a Youtube video on that topic, here it is a video for CSS files not working on live server

After editing css in Chrome Developer Tools, css file does not load

I'm developing a basic web page with css file on my local machine and testing by opening the html file in the browser straight from the filesystem.
This works, but now since using the Chrome developer tools to play around with different styles by editing the css file under the Sources tab, whenever I refresh the page none of the CSS loads until I again edit it in the sources tab - just adding a return to the end is enough to load all the CSS.
Also, occasionally when refreshing the page, the Sources tab shows the contents of the css file as corrupt (a load of random characters)
I've run the css through a validator and that says it is all fine and there is no javascript on the page
I'm not a web developer so probably missing something obvious...
This is happening because you are editing css inside the Inspect Element (Chrome developer tools).
This is because the css literally lives on a webpage and it is pulled from your actual css file on your desktop (css file from the folder of your website).
Because of this, you are never actually changing an actual css on your computer, just in the browser, and that is temporary, because the same old css from your computer will load everytime you reload the page (untill you modify the css on your computer).
You should edit your changes in your actual css file on your computer inside your text editor (notepad++, visual studio code, atom, sublime text, etc ...).
That way, it is going to work as you want ! Hope you understood what I meant, if not, just tell me, so I can clarify again :)
Add this to the nginx configuration:
http {
include /etc/nginx/mime.types;
....
}
this solved it for me.
Thanks

Github Jekyll page behaves not properly

I am trying to build Github Jekyll pages. Everything went fine and it gives the expected pages locally but the format of the page is really bad when it is in the Github page. On top of that any links on the page go to 404. I uploaded the basic jekyll page in github and it can be find at https://vinuvikraman.github.io/blogs/. Programs in Gemfile.lock have the similar version installed in Github.
How can I make the github page works properly?
Thank you!
Have you tried setting url and baseurl in the config. Because it looks like the site expects it to be on the root domain and not at /blog. For example, the CSS file is refrenced at:
https://vinuvikraman.github.io/assets/main.css
But is actually at:
https://vinuvikraman.github.io/blogs/assets/main.css

Chrome not rendering HTML content?

for some reason my HTML is not rendering in chrome. For some reason, I am getting an odd webpage with just the IP Adress. I am not sure if it is something related to the server. Can anyone assist?
VSCode starts the live-server in your project directory, and that's essentially what you're seeing in your browser.
Just move the HTML file into this directory (folder) and try running the server again, preferably your cursor clicked in the HTML file.
Switch the name to index.html , that should help.

Missing Doctype HTML Deployment using apache mod_proxy

I have a strange problem...
My Vaadin Application is working fine on my computer (locally). I just deployed the website and now I have a problem:
The <!Doctype html> tag in the first line is missing. I don't know why it is, but I think this is causing some problems, because the Website is being displayed in Quirks mode.
The funny thing is, when I run the application locally, the doctype tag is set.
I simply exported the application to a war file and deployed it.
I haven't found any soloution on the Internet so far...
Is this a Tomcat setting problem or anything else?
Already found the problem!
I was using Apache mod_proxy to handle my web application. The html doctype was not set in the proxy_html.conf. I simply had to define the ProxyHTMLDocType to HTML 5 in the proxy_html.conf.
proxy_html.conf:
ProxyHTMLDocType "<!DOCTYPE html>" // Sets the Doctype to HTML5
for further information just see:
http://www.xinotes.org/notes/note/762/
Sorry for posting this as an answer (I still cant comment posts :( ), but please make sure your local tomcat and production tomcat are the same version. You could also try not to package your project as a war file, but stop the server (if you are permitted of course) and copy the project yourself to make sure this is not a war-packaging issue