1

I'm an absolute beginner working with Jekyll sites and have currently the following issue:

I want to embed a calendar into my index.md (start page). The index.md only contains the yaml frontmatter so far. The calendar consists of a html-file referencing various .js (script src) and .css (link href) and all the files are located in a folder "calendar".

I tried to embed the calendar with {%include calendar.html} and placed the file in the _includes folder. I also tried the include_reference but I haven't been successful with both options. The .js and .css files (referenced by the calendar.html) cannot be found. The path is wrong. Can anyone help me out?

Again: index.md with frontmatter is my starting page. The calendar.html is included in the _includes folder and the calendar.html references certain .js and .css which are located in a folder "calendar" (just below the main folder). e.g. is referenced and full calendar.min.js is located in the calendar folder.

Nina
  • 11
  • 2
  • Include seems right, so the problem should be the relative paths that calendar.html are using. – marcanuy Aug 26 '17 at 14:14
  • e.g. is referenced and full calendar.min.js is located in the calendar folder. – Nina Aug 26 '17 at 15:02
  • Where is the calendar folder? – marcanuy Aug 26 '17 at 15:05
  • It' s in /Users/N./website/ – Nina Aug 26 '17 at 15:27
  • When I try to include a simple .html which references a jpg in the same folder, the error message is [2017-08-26 17:24:31] ERROR `/ – Nina Aug 26 '17 at 15:29
  • Please include all the relevant data in the question https://stackoverflow.com/help/mcve – marcanuy Aug 26 '17 at 15:36
  • You can only include an HTM fragment. If your `calendar.html` page is a complete HTML document with `html`, `head`, and `body` tags, then it won't work. Including that would result in invalid HTML. – Waylan Aug 26 '17 at 16:24
  • can I do it vice versa and include the navigation.yaml into the html of my calendar? The html works fine, I just want to embed the navigation of my Jekyll site (and the footer). – Nina Aug 26 '17 at 16:30
  • are your problem still persist? read more the [jekyll documentation](https://jekyllrb.com/docs/includes/) – Adi Prasetyo Oct 30 '17 at 03:32

0 Answers0