For my site some of the posts represent events. For these events I want two representations: the normal html version and an ics version.
How can I use jekyll to make a second version of the same post with a different layout?
I tried to specify multiple layouts in the front matter, but that does not seem to work
layout: post, ics
or
layout: [post, ics]
how would I do something like this?
It seems this is not currently possible in vanilla Jekyll, but if you can use plugins, the multipost plugin found on this jekyll issue should do what you want.
Related
I am a beginner at web development, and I just want to make a small website based on jekyll. So I have created 4 posts, and they show up nicely on the website. The thing is that they actually show up on the bottom of the page, under stuff I put in index.md (which takes up like the whole page); I want to find a way to move the whole post section to the right so it's parallel to the content in my index.md. I tried CSS flexbox, but I can't find where to add the codes because the posts are found in a separate folder and don't show up in my index.md. What should I do?
You might want to try a different Jekyll template from the one you are using now instead of adapting your current one. The template my university provide for Jekyll in our institutional GITLAB, for instance, has posts above content in the index.md file. And it can be tricky to adjust themes.
However, there are Jekyll templates with a two-column layout with a side-bar.
You might want to check out the "Minimal Mistakes" theme or the "Hyde" theme.
I have a template page with a number of labels. I would like to produce several html's from this template, say one per each language. Is this possible using Jekyll?
I have seen a multi-language-plugin, however it seems not working anymore.
Can Jekyll produce more pages from a single template?
If the answer is negative, do you know any other static site generator that can handle multi language?
A good way to implement multi-language sites in Jekyll is via jekyll-multiple-languages-plugin that also works with Jekyll v3.x
You can find an useful tutorials on how to install and configure the plugin here and here.
As an alternative, you can try to implement multi-language without any plugin, using this tutorial.
I'm using static html pages and incline js to generate dashboard. The backend is go.
However, as number of pages growing, I have to maintain a lot of html pages, and many of the block elements are duplicated.
I'm wondering whether there're some cases to use jekyll to generate dashboard pages, since jekyll can convert pieces of elements into complete htmls? So that I can modify one part and the modification take effect on every html pages that generated.
Are there better framework to do so?
Thank you!
If you're duplicating elements, then those are the perfect pieces of markup to put into a layout and/or include. That's exactly what those are for.
Each individual page you need can reference a specific layout in its front matter. Includes can be used within the individual pages or within the layouts or both (and can be nested).
The Jekyll Documentation is ok for this, but to wrap your head around it I find it easiest to look at the documentation together with a few existing Jekyll templates to understand how it all fits together.
after a bit more dig. I found that packages such as Grunt and Gulp can be used to generate htmls from separate parts.
I've got very simple problem: 3 static pages with the same layout. So I want to split layout and content + inject some data to layout (like page title) while compiling. Can you suggest me appropriate gulp plugin? I found gulp-pagemaki - it's exactly what I want except it doesn't work and I don't need markdown compilation.
gulp-html-extend solved my problem. It has some disadvantages but it works. Here is very good sample of using gulp-html-extend and other plugins like gulp-usemin (note: they use patched version of usemin)
I started fiddling with Octopress recently, and I found a theme for Jekyll that I liked it.
The problem is that this theme doesn't have a similar structure that Octopress needs for themes.
I tried to clone the repo directly into my Octopress folder then use rake install['name-of-theme'] but that didn't work and I just got some errors about missing folders (source, sass).
So my question(s) is, how to install a theme for Jekyll with Octopress? is there a directory structure I need to follow? what are the minimum files requires to make it work?
I Googled a little bit but I didn't find anything related to converting a Jekyll theme.
Thanks.
You can't. The author of Octopress made his own theme layout and plugins to support it. Jekyll is meant for you to create your own theme layout as you wish (it's barebones). Think of Jekyll as a great framework to write your own static site, a store front or a wiki or a blog - from scratch. Octopress, on the other hand though, adds a framework on top of Jekyll: theme layout, a number of plugins defaulted for a blog site, SEO throughout the templates, a config file for controlling this framework-on-top-of-a-framework (Octopress framework on top of Jekyll framework). Basically, you can take Jekyll and write your own theme layout any way you wish; but with Octopress, you already have a strict theme layout to adhere to.
Octopress' rake install[] command to install a theme just copies a bunch of files to specific directories, following the authors specific theme format.
He's also changing the format from time to time as well, which usually breaks even older Octopress themes working on current Octopress sites (doesn't seem to worry about backwards compatibility). I know: I really tried some old responsive ones I found only to get errors with the latest Octopress as of April 2014.
Anyhoot, after many tries, I finally just sat down and copy-n-pasted the HTML into a new Octopress theme manually myself. Created my own "theme" to try to get some older Octopress themes working.
Still didn't like it as it was buggy (and I was trying several older Octopress themes); so, I gave up and just wrote my own Octopress theme from scratch and moved on. Personally, I don't like how Octopress' layout is, well, laid out. Far too many freakin incremental files. I basically just built my own from scratch and skipped several of the "custom" stuff. This allowed me the freedom of mocking up my own raw responsive set of HTML files and organize it how I wish (http://eduncan911.com).
I understand why he added the custom stuff in the last few months: for people that don't know much about frontend or just wanted a quick place to tweak this font, change that color, or just add a JS script to the custom footer and be done with a plugin.
Me? I already had a full HTML/JSS responsive HTML mockup I wanted to use. I only needed to utilitze Octopress' articles and show/hide the pagenation and comments. I didn't need that elaborate Octopress template layout. Though, now if anyone wants my theme, they can only copy exactly what I did and will need to modify it as they want. I did keep the SCSS generation though, as I like SCSS.
https://github.com/eduncan911/eduncan911.github.io/tree/source