I run bundle exec jekyll build && bundle exec jekyll serve --watch
to create a _site folder, which we then upload FTP to the web server. The index.html file in the _site folder contains links to the local URL of the local host, and not the correct site URL, which leads to broken links. FTP deployment presumably means that the link text will be deployed as on a production server, and users will be redirected to "localhost" and not to our blog URL. How can i fix this? I have not encountered any problems before.
Excerpt from index.html:
<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">
Excerpt from _config.yml:
title: "The WordBrewery Blog | Language Untapped" description: "WordBrewery 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
source share