小编Oll*_*e_W的帖子

在解析块映射时,Jekyll config.yml没有找到预期的键

我在命令行终端中收到此错误:

在第18行第7行解析块映射时没有找到预期的键

我的jekyll _config.yml YAML文件如下所示:

title: Oliver Williams - Portfolio
url: "http://yourdomain.com" # the base hostname & protocol for your site

# Build settings
markdown: kramdown
permalink: /:title

defaults:
  -
    scope:
      path: "" # an empty string here means all files in the project
      type: "posts" # previously `post` in Jekyll 2.2.
    values:
      layout: "post"

       -
    scope:
      path: "" # an empty string here means all files in the project
      type: "pages" 
    values:
      layout: "page"
Run Code Online (Sandbox Code Playgroud)

yaml jekyll

6
推荐指数
2
解决办法
1万
查看次数

使用javascript从图像中删除灰度css过滤器

我正在尝试循环浏览一些图像并一次从中删除一个过滤器.

var h = 0;

function removeGreyscale() {
  document.images[h].style.webkitfilter = "grayscale(0)";
  document.images[h].style.filter = "grayscale(0)";
  h += 1;
  if (h === 8) {
    h = 0;
  }
}

setInterval(removeGreyscale, 3000);
Run Code Online (Sandbox Code Playgroud)

此代码目前无效.

javascript css filter setinterval

4
推荐指数
1
解决办法
1362
查看次数

Sudo etc/hosts 文件不起作用

我想编辑我的 etc/hosts 文件。在 Mac 上的终端/命令行中,我输入了 sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

有时它会要求我输入密码,我输入密码后什么也没发生。其他时候,它甚至不要求输入密码,也不会发生任何事情。为什么这个命令不起作用?

terminal command-line sudo hosts-file

-2
推荐指数
1
解决办法
5625
查看次数