当我告诉Jekyll为我的网站提供服务时,一切顺利,从索引到其他页面 . 但是,当我点击查看博客文章(任何帖子)时,我开始看到这条消息:
内部服务器错误不兼容的字符编码:UTF-8和ASCII-8BIT WEBrick / 1.3.1(Ruby / 2.1.5 / 2014-11-13)at 127.0.0.1:4000
我'm running Jekyll on Ubuntu 15.10, and I' m试图更新这个网站:http://nvinhadeluz.com
编辑---
这是我的_config.yml:
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
title: Núcleo de Promoção Humana Vinha de Luz
email: contato@nvinhadeluz.com
description: > # this means to ignore newlines until "baseurl:"
O Núcleo de Promoção Humana Vinha de Luz é uma entidade filantrópica que busca proporcionar o desenvolvimento humano e social na região em que atua. Guiados pelos princípios do Cristo à luz da Doutrina Espírita, desenvolvemos uma série de atividades religiosas e educacionais. Navegue pelo site e conheça um pouco mais do nosso trabalho!
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://nvinhadeluz.com" # the base hostname & protocol for your site
paginate: 3
paginate_path: "/blog/page:num/"
#Redes sociais
twitter_username: Vinhadeluz1
facebook_username: nucleovinhadeluz
instagram_username: vinhadeluz
googleplus_username: +Nvinhadeluzbh
youtube_username: nucleovinhadeluz
# Build settings
markdown: kramdown
gems: [jekyll-paginate]
exclude: ["Gemfile", "Gemfile.lock"]
encoding: UTF-8
# Default settings
defaults:
-
values:
comments: true
2 回答
我的代码示例:
发布示例:
帖子布局:
在Jekyll的核心中我没有改变任何东西,而且这个bug从零开始 . 对不起,如果代码有点乱,我还在学习如何在这里做事 .
我认为这个问题必须与Jekyll依赖项之一有关,所以你需要一个依赖管理器,比如Bundler .
要么
cd path/to/folder
并运行:这将为您创建一个Gemfile,如下所示:
Gemfile
.如果您的站点由GitHub托管,请将其添加到您的Gemfile:
如果您没有在GitHub上托管您的网站:
运行
bundle install
:这将处理您需要的所有gems
并将Gemfile.lock
添加到项目文件夹中 .在您的
_config.yml
排除Gemfile
和Gemfile.lock
来自版本:您可以将所需的所有标志添加到此命令中,例如:
完成!
还有一件事:葡萄牙语有很多禁止的字符,因此,每次你在Yaml前面使用
á
或â
或ã
之类的东西时,请确保在_1780741之间执行此操作:而已!我想你应该没问题 .
如果这有帮助,请告诉我,是吗? :)