bundle exec jekyll build && bundle exec jekyll serve --watch
을 실행하여 _site 폴더를 생성 한 다음 FTP를 통해 웹 서버에 업로드합니다. _site 폴더의 index.html 파일에는 올바른 사이트 URL이 아닌 "localhost"로컬 URL에 대한 링크가 포함되어있어 링크가 깨졌습니다. FTP를 사용하여 배포한다는 것은 링크의 텍스트가 실제 서버에 그대로 배포되고 사용자가 블로그 URL이 아닌 "localhost"로 리디렉션된다는 것을 의미합니다. 이 문제를 어떻게 해결할 수 있습니까? 전에도 문제가 발생하지 않았습니다. index.html 파일Jekyll 빌드가 _site (프로덕션) 파일에 'localhost'링크를 넣습니다.
발췌 : _config.yml에서
<link rel="stylesheet" type="text/css" href="/blog/slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="/blog/slick/slick-theme.css"/>
<link rel="stylesheet" href="/blog/css/main.css">
<link rel="canonical" href="http://localhost:4000/blog/">
<link rel="alternate" type="application/rss+xml" title="The WordBrewery Blog | Language Untapped" href="http://localhost:4000/blog/feed.xml">
발췌 :
title: "The WordBrewery Blog | Language Untapped"
description: "WordBrewery's home for aspiring polyglots. Study tips, book and app reviews, grammar and vocabulary lessons, interviews, and other language-learning resources."
baseurl: "/blog" # the subpath of your site
url: "https://wordbrewery.com" # the base hostname & protocol for your site
feed: <link rel="alternate" type="application/rss+xml" title="{{ site.name }}" href="{{ site.url }}/feed.xml" target="_blank">
wordbrewery: "[WordBrewery](http://wordbrewery.com){:target='_blank'}"
languages-offered: "twenty"
# Jekyll settings
markdown: kramdown
permalink: /:categories/:title/
gems: [jekyll, jekyll-archives, github-pages, bundler, bourbon, neat, jekyll-seo-tag, classifier-reborn, jekyll-feed, nokogiri, jekyll-sitemap, "jekyll/figure"]
encoding: utf-8
lsi: true
timezone: America/Denver
logo: "{{ site.url }}/assets/images/logo-gold.jpg"
avatar: "{{ site.url }}/assets/images/fb-profile.jpg"
locale: "en_US"
# YAML defaults
defaults:
scope:
path: "" # an empty string here means all files in the project
values:
layout: post
title: "WordBrewery now has native-speaker audio for beginning Spanish"
author: "WordBrewery"
category: Learning
image: SpanishSpain.jpg
featured: true
sass:
sass_dir: _sass
지킬 코드가 없으므로 디버깅하기가 어렵습니다. 모든 저장소 URL? 또는'_includes/head.html' 콘텐츠 일 수도 있습니다. –