Liquid Exception: Included file _includes/JB/setup not found in - jekyll

I have been using Jekyll for the past day and it has been working. I added a new file and one of my existing files began receiving the error above. I got Jekyll because it was suppose to be an easy blogging solution. This is not proving true. If I need to learn a framework just to blog I mind as well just use wordpress.

You are trying to perform jekyll serve from inside the _posts/ directory. You can only perform jekyll serve from the root directory.

One of your _layouts, post or page use an {% include JB/setup %} which is supposed to work with Jekyll Bootstrap.
This _layouts, post or page, borrowed from Jekyll Boostrap will certainly need some variables from JB/setup to work as expected.

Related

Best way to add a Hugo blog to an existing static site?

The Situation
I have a website hosted on Netlify that consists of HTML and CSS files only. Let's call it "domain.com".
I want to keep that website the same, but add a Hugo blog only on "domain.com/blog/".
What I've Tried
I've created a folder called "blog" in my "domain.com" repository and copied over all of the Hugo stuff. Then I go to Netlify's build settings and told it use Hugo to build it. I don't think this works because it's looking for a config.toml file in my root folder, which isn't there, it's in the blog folder.
Then I tried creating a new Netlify site build from the /blog/ directory of the repository with the build setting "hugo --gc --minify". This doesn't work either and definitely doesn't put the the blog at "domain.com/blog/".
What I'm Wondering Now
Is this even possible?
Would I have to just start the whole thing from scratch and start from Hugo?
Is there a better way to create a CMS on "domain.com/blog/" that's free and not Hugo?
Since asking this question I have realized that it's not a good question. I'll keep it up though in case somebody has the same thought process as I did. It's not about getting Hugo onto an existing site, it's about getting your existing site onto Hugo.
I ended up porting my existing index.html and other pages with CSS over to Hugo. Basically I just copied those into the root of my Hugo site so they look exactly the same as they did before.
The only thing that is really generated by Hugo is the blog, which is the end result I needed.

GitHub Pages Jekyll won't build

I'm trying to add a new post to a blog using Jekyll and Github Pages (Untouched since 08/2015)
However even though the Travis build passes, the Github Pages build fails without a single error message
I'm guessing it's about some outdated plugins, but I've got no idea what is it
// _config.yml
// Gemfile
Here's the repository:
https://github.com/wende/wende.github.io/
It turns out Github Pages use Jekyll 3.2.1 now. Which requires .config.yml"theme" property to be empty.
Changing theme to theme_settings and all references to it fixed the issue

How to change paths and URLs in Jekyll?

I am very new to Jekyll and I am failing to find configuration to change the following:
I built a basic Jekyll site using jekyll new . and ran jekyll serve to learn and built a layout using Jekyll. The basic test site gives me the following URL for posts: /jekyll/update/2016/01/30/welcome-to-jekyll.html. Is the URL like that because I am running jekyll serve and not jekyll build? I want to remove the the jekyll/update from the URL path, so my final URLs for posts look like the following: /2016/01/30/welcome-to-jekyll.html.
I want my pages to be stored in a separate directory _pages instead of the root directory. How can I do that?
Is there way to prepend a path to files loaded from a specific directory? For example, I want to make a /_projects directory. Then add files with the following permalinks: /prj-test1, /prj-test2, /prj-test3. When compiled, I want to get the following URLs: /projects/prj-test1, /projects/prj-test2, /projects/prj-test3, respectively. Is this possible?
Yes, everything you asked is possible.
Take a look at these examples, you might want to choose one of them. But to do as you asked, you'll need to change the permalink to /:year/:month/:day/:title.html. To do that, add this line to your _config.yml file:
permalink: /:year/:month/:day/:title.html
It depends on the structure you want to achieve. You can use collections or simply create pages inside a folder called pages (without the underscore).
Yes. You can do that via collections, for example.
I recommend you to take a look at some templates, so you can see how the code works in different ways:
Try some Jekyll Themes here and here. Download them and study their structures.
If you want to go deep, take a look how Jekyll build its own website.
Hope to have helped!

Jekyll-Redirect-From Redirects Not Being Applied

I'm contributing to an open source project that has its documentation built in Jekyll and hosted on Github Pages. I'm trying to add a redirect in the documentation, so I've forked it and am using jekyll-redirect-from in the fork. However, the redirect simply doesn't seem to be applied. That is, the jekyll build folder doesn't contain any static file to hold the <meta redirect> html that jekyll-redirect-from is supposed to generate. Instead, when I visite the URI that's supposed to be redirected, I just get a 404.
I've followed all the steps in the jekyll-redirect-from docs, including:
Adding jekyll-redirect-from to the Gemfile (code)
Adding it to my _config.yml file (code)
Adding the redirect_from key to my page's front matter (code)
I'm using jekyll 2.5.0 and jekyll-redirect-from 0.8.0 (the full gemfile is linked above). I'm building the project with bundler (using bundle exec jekyll serve), which is how the project's always been built.
Jekyll isn't showing any errors—the static file that should hold the redirect simply doesn't show up.
I can't for the life of me figure out the problem. Maybe I'm overlooking something obvious, or maybe there's some sort of subtle incompatibility in my dependencies?
D'oh. The issue was that the safe option needed to be set to false for the plugin to run. This tripped me up because I know Github Pages sets safe to false as well, and yet jekyll-redirect-from generally runs there. But that appears to be because GH Pages has made an explicit exception to allow it.
My issue was that I had:
redirect_from: /a/path/
redirect_from: /other/path
And repeated directives don't work like that in YAML.
Instead, it should be:
redirect_from:
- /a/path/
- /other/path

Publish a new post on Octopress from another computer

I am currently exploring Octopress. One question popped up during the course of my work - is there an easy way to publish a post from a random computer/device. I mean - if I do this via rake new_post['title'] I must have the whole thing set up on the machine I am doing it from - Ruby, gems etc.. Is there an easier way - like create a markdown document and than just send it to the Github repository?
I think there is no way to do that.
Since octopress is based on Jekyll, every page is rendered as follows:
Render Liquid
Convert if a converter exists for that extname(e.g. .markdown)
Render layout(s) recursively.
That is to say, for such a static website, it's unable to show a markdown document directly.
On the other hand, if what we send to repo is not a markdown file which must be converted to html to be showed, but a html directly, it's also not possible to make the site work normally.
Since not only the post page itself should be generated, but also many related parts such as index page, categories and so on.
In one word, octopress is static, we need generation before deployment.
Reference:Allow markdown to not be compiled to html