Jekyll - Add custom page - jekyll

I want to add some custom pages under a different folder, not the _posts
I want to use _doc inside I have multiple files.
_doc
|_installation.md
|_configure.md
|_uninstall.md
I tried this. But when I hit the URL I got 404 error.
installation.md file in _doc folder
---
layout: post
date: 2020-06-06 22:00:00 +0530
title: DOC for installation
description: DOC for installation
categories:
- doc
tags:
- doc
permalink: /doc/installation
---
Rest of the content goes here

Im able to solve this.
Just add the _doc in config file.
include: ['_doc']

Related

How to get Jekyll category blog listings with jekyll-archive

I installed the Jekyll plugin jekyll-archives and I set this up in the config.yml file:
jekyll-archives:
enabled: []
layout: archive
permalinks:
category: 'category/:name/'
However, I can't get the category listings to show up when I visit category/category-name I just get 404. Please help.
I needed to set enabled to all and to create a layout called archive. Code that worked for me:
jekyll-archives:
enabled: all
layout: archive
permalinks:
category: '/category/:name/'

How to add permalink and variables globally to Jekyll pages inside a specified directory

I'm setting up a website with multi language support.
In the root directory I have one or more directories based on the language locale, e.g.: /en /it
I'm trying to set one language as default and let Jekyll generate its pages in the root of the _site directory, by setting the defaults section in _config.yml as described below. Other directories will be generated as usual.
I don't want:
to use a plugin since it have to work also with GitHub pages
to set a lang: en variable in each page front-matter but setting it globally in _config.yml instead if possible
put a load of files/directories in the root directory, just the various en, it, fr etc (if not having something like described below, but using a master pages directory).
I tried various solutions, including:
using collections: it works as expected with the example below but I don't want to use them for various reasons, like not having sitemap plugin working with them
using this solution, but it doesn't work with multiple pages with same name and other types of documents
This works with collections with an _en directory in the root:
collections:
en:
output: true
permalink: /:path
defaults:
...
- scope:
path: ""
type: "en"
values:
layout: "default"
lang: "en"
permalink: /:path
Not this, IMHO as it should be for pages:
defaults:
...
- scope:
path: "en"
type: "pages"
values:
layout: "default"
lang: "en"
permalink: /:path
In brief I need:
custom variables set for each page in the specified directory globally instead in each page front matter
make Jekyll to generate all pages from the specified directory to build in the root of _site directory using a global permalink

Jekyll include image files next to markdown post file

I started working with Jekyll a couple of days to import a Hugo blog.
There is this simple thing that I can't figure out.
It's my understanding that all folders starting with _ will not be processed. It doesn't matter where the folder is it will not be processed except the _posts and _pages.
Let's assume I've got the following structure:
- _posts
- folder1
- 2017-02-05-Post1.md
- 2017-02-05-Post1.png
Then my output is:
- _site
- 2016
- 02
- 05
- Post1.html
I can't figure out how to make Jekyll do something with the image.
I've tried all of the following the _config.yaml.
include:
- .htaccess
- "_posts/**/*.gif"
- "/_posts/**/*.gif"
- "/_posts/*.png"
- "_posts/**/*.gif"
- "_posts/*.png"
- "**/*.gif"
- "**/*.png"
# - "_posts\**\*.gif"
# - "_posts\*.png"
I can't understand Jekyll.

Octopress blog - atom.xml generation - Entity 'ldquo' not defined

I am trying to re-setup an existing Octopress blog to a new PC.
And When I generate pages.
An atom.xml is generated with following content at the first line.
And when I hit the browser I get an error:
This page contains the following errors: error on line 1 at column 28:
Entity 'ldquo' not defined Below is a rendering of the page up to the
first error.
My _config.yml file has this:
subscribe_rss: /atom.xml
subscribe_email:
root: /
permalink: /blog/:year-:month-:day/:title/
source: source
destination: public
plugins: plugins
code_dir: downloads/code
category_dir: blog/categories
markdown: rdiscount
rdiscount:
extensions:
- autolink
- footnotes
- smart
highlighter: pygments
I think I am aware that ' chars are changed to ldquo due to rdiscount smart extension. But If thats the case, I should not be getting the error on browser.
I am confused. Any help would be great.
If I remove 'smart' extension, then the generated atom.xml does not contain the > , due to which it fails again and throws some other error.
Please help
Also raised here:
https://github.com/imathis/octopress/issues/1759
I dont think its your config file.
Try to change the markup engine and see if its still displaying the error.
As i see it the engine replace them and since i cannot see your code its hard to find out the exact problem.
Replace the markdown configuration and test it again.

Jekyll: blog post ignored - how to debug?

I am trying to set up a blog on github.io using jekyll (site, source)
My problem is that my article in the _posts folder semms to be ignored. I would like to debug the site generation.
I have seen this advice to debug jekyll, but so far I did not understood what is missing.
Can I see if jekyll consider my file or if it is ignored?
In your files names replace underscore by hyphen.
wrong : 2014-11-01_part_of_it.md
good : 2014-11-01-part-of-it.md
the article/post needs a publish date in the front matter
---
date: 2014-11-01 08:57:00 GMT
---
Also keep in mind that your post won't be generated if the publishing date (including the daylight saving time, in my case) is in the future.
date: 2018-07-18 18:00:00 +0100
Reading: _posts/2018-07-18-no-more-ssh-login.markdown
Skipping: _posts/2018-07-18-no-more-ssh-login.markdown has a future date
Had to run bundle exec jekyll serve --verbose to realize it.