简体   繁体   中英

Jekyll and SinglePaged theme

I am trying to get a page up and running on GitHub using Jekyll, and in particular I found the SinglePaged theme ( https://github.com/t413/SinglePaged ). I followed the instructions to fork and everything, and created two posts:

  • 2000-01-01-intro.md
  • 2000-01-02-education.md

The contents of the second post are simple:

---
title: "education"
bg: turquoise
color: white
---
# Title
test

But when I run on a local jekyll server, only this second post is being rendered. When I look at the index.html generated in _site/ , it only contains:

<h1 id="title">Title</h1>

<p>test</p>

I tested it out by adding more posts, and only the last one (ie with the latest date) is being rendered with nothing else. Moreover, the CSS is not being applied on the browser even though all the files are present. Has anyone seen this before?


Edit: Look at all the code in my GitHub repository https://github.com/muhammadkhan/muhammadkhan.github.io

The problem is in line 10 of your _config.yml . You are setting the permalink to / for every single page.

Remove that line, and you'll get your index.html the way you expect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM