cant publish my boostrap page on github page - html

I published my website on Github page. for the second time. But error appears which I don't understand. I used bootstrap for my page, here is the error
"Your site is having problems building: A file was included in
bootstrap-3.3.7/docs/components.html that is a symlink or does not
exist in your _includes directory. For more information, see
https://help.github.com/articles/page-build-failed-file-is-a-symlink/."
here is my github repository https://github.com/makopa/portfolio

I had a similar issue while deploying on GitHub an old website built in 2017 with Bulma. After updating all my dependencies, I still got the same error as Makopa. I deleted the /docs folder, redeployed with git status, add, commit and push and it worked!

That bootstrap-3.3.7/docs/components.html does indeed have include directives:
{% include components/glyphicons.html %}
{% include components/dropdowns.html %}
{% include components/button-groups.html %}
And the help page does mention:
Search for the include tag to see where you've referenced other files. For example: {% include cool_header.html %}.
Copy or move any symlinked files into the _includes directory of your GitHub Pages repository.
Maybe you could simply not include the doc folder of the bootstrap framework (so delete it) in your repo.

Related

Problem with CSS styling in a html page in Django

So, i am literarily one week into learning web development and i'm following this Django tutorial, i got the index page that i swiped from online to compile properly with it's static elements also. Ran the "python3 manage.py collectstatic" command and everything.
So now i'm linking a registration page which i setup up as a new app in the project and when i try and put the css styling file it doesn't work. i've tried just puting in the same directory as the html templates, then i've moved it to styles and rerun the earlier python command so it's also present in assets, also made use of the "{% static 'abcde.css' %}" as well as {% load static %} in the register.html (only did it in the index initially) and i'm still having no luck with styling the page, any help would be appreciated
Edit:
I previously said i moved the css file but i meant the static file and run gatherstatics again so theres a copy in assets as well.
So now i'm linking a registration page which I setup up as a new app in the project and when i try and put the css styling file it doesn't work.
You should not put it in the same directory as the templates, nor in the directories for templates at all. It should be in a directory you use for static files, so the path is relative to the static root.
This thus means that if /static/ is the directory you marked with the STATIC_ROOT settingĀ [Django-doc], and the file is located at /static/foo/bar.css, you use {% static 'foo/bar.css' %}.
I figured it out but I don't think I should be deleting my stack overflow question. It was just a simple syntax problem
what i had: {% static 'styles/style.css' % }
what you need: {% static 'styles/style.css' %}
that gap between the percentage and bracket was the problem

Github Pages - trouble rendering a Page with Jekyll

Whilst using Github Pages I can't get Jekyll to render a contact page.
I am using the following template: https://github.com/antonostrovsky/tale
If I clone the template into a local repo and run bundle exec jekyll serve I get a page with a Contact link that I can successfully follow. The generated _site folder contains a subfolder 'contact' with index.html within it.
I then create an empty repository (https://github.com/antonostrovsky/test_site) at Github and specify this template in _config.yml:
remote_theme: antonostrovsky/tale
The template is successfully rendered, I can see the template on the index page (https://antonostrovsky.github.io/test_site/), and the Contact link leads to nowhere, resulting in "Not Found" error.
Can anyone please help me understand how I can troubleshoot this? Does Jekyll have any debug output that could be placed on a github page?
Does anyone know what could be going wrong?
Thank you in advance
I made a diff between your repo and the template repo and noticed that at some stage you deleted the baseurl property in the _config.yml file.
Forking your repo and re-adding baseurl: "/tale" to the _config.yml file fixes the contact page link for me.
UPDATE:
While the above gets the page working as a fork it doesn't work as a remote template which is what the asker needs.
The test_site has the theme and it builds, however it has no content. There are no pages in test_site repo.
If you copy your contact.md page from the theme template repo into pages/contact.md in the test site repo and then rebuild then your link should now work.
Note: Neither the file nor folder can start with an _ in the test-site repo because it will get skipped over by jekyll.
Tip: Open the dev console and disable page caching then reload to see your changes on github faster. It also helps to add change some page content so that you know you're seeing the most recent version.
To add to the accepted answer and explain this strange behaviour. Pages from the remote theme are NOT included by design:
Custom theme files can be placed in:
assets/allposts.html
with the front matter
---
permalink: allposts.html
---
which results in the
_site/allposts.html
file being generated.
Source: https://github.com/benbalter/jekyll-remote-theme/issues/64

Could not get disqus to work with jekyll and git pages

I am using Github Pages and Jekyll. I added the Disqus configuration but it could not appear on the posts.
I added disqus.html in the _includes directory. and added my disqus shortname into _config.yml.
Called {% include disqus.html %} from _layout/post.html.
Tried the comment:true option in the markdown files as well.
You may view my work at:
https://github.com/motleis/weekActivities
Thank you for your help.
EDIT: So far, I tried to converge the problem and noticed that {% if site.disqus %} is not evaluated to true. The only thing I can think of is filling the 'disqus' parameter in the _config.yml.
Any other things?
Finally I figured this out!!
"put your short-name inside quotation marks!"

Jekyll not finding images in root _pics folder

I've a Jekyll site that I'm developing locally with jekyll serve and I'm editing a post in the _posts directory and I'm storing images in a _pics directory.
I'm trying to reference the image inline with all sorts of things...
../_pics/image.png
/_pics/image.png
{{ site.url }}/_pics/image.png
{{ site.url }}_pics/image.png
The last two really don't work, because when I inspect it, it's of course referencing my github URL, which makes no sense if I'm trying to develop locally first.
What's the right way to handle this if I want to develop locally and not have the images not break when they get pushed up to GitHub?
I noticed that changing the _pics folder to pics with no underscore fixed it...Not sure why that is though. There may be a special meaning for underscore prepended folders with Jekyll?
_pics and generally all folder beginning with underscore are ignored by jekyll.
You can instruct jekyll to process a specific "underscored" folder by adding this folder in the include configuration array.
In _config.yml, add :
include :
- _pics

How to link on local filesystem with Jekyll?

I'd like to use Jekyll to share a page that cannot be served anywhere. I need to share this information using sync clients (Dropbox, Google Drive, WorkDocs, etc) and i'd like the links on the pages to work, regardless of the path where they are synced.
When i generate a new jekykll site with jekyll new somesite, then build with jekyll build, then open index.html from the filesystem, the links are broken because they are absolute.
For example, the href to the sample "Welcome to Jekyll" is generated as "/jekyll/update/2015/09/12/welcome-to-jekyll.html" and thus opens to "file:///jekyll/update/2015/09/12/welcome-to-jekyll.html" on my browser.
If it would generate us relative links, such as "jekyll/update/2015/09/12/welcome-to-jekyll.html", they would open fine regardless of the system or path they are opened from.
Would it be possible to change jekyll to use relative links instad of the default absolute links?
A fast and dirty way
If your page is in the root of the website (e.g. index.html), you could create relative links to posts using liquid filters, e.g.:
{% for post in site.posts %}
{{post.title}}
{% endfor %}
But, if you want relative links from every possible page in you site, I think that the only solution is to write a custom liquid filter that generate a relative link considering the current page location and the link location.
A clean way
Another (and more clean) way could be to use different _config.yml files for every destination. Here you can config each host and permalink structure to match the destination.
E.g. to serve your jekyll blog from http://example.com/my/subdir/blog:
# _config-example-com.yml
host: example.com
permalink: /my/subdir/blog/:year/:month/:title
Then build your blog using:
jekyll build --config _config-example-com.yml
If you have X targets, you could use a script to run jekyll X times (using every time a different config file) and then copy every output from _site to another directory, or upload directly where you want.