Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Theme ineffective #156

Open
atom-tracer opened this issue Feb 17, 2024 · 6 comments
Open

Remote Theme ineffective #156

atom-tracer opened this issue Feb 17, 2024 · 6 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@atom-tracer
Copy link

When I use order bundle exec jekyll serve locally, the page seems normal.
image
However, when I push the repo to github, it will be automatically and successfully deployed, and the page looks like this:
image
I noted that #37 has noted that problem in 2021, but I don't get it: what am I supposed to set my base_url? and what's the meaning?
Here's part of my configuraion files:

# Gemfile
# frozen_string_literal: true

source "https://rubygems.org"

gem "jekyll-theme-yat"
gem "github-pages", group: :jekyll_plugins
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
group :jekyll_plugins do
  gem "jekyll-feed"
  gem "jekyll-seo-tag"
  gem "jekyll-sitemap"
  gem "jekyll-paginate"
  gem "jekyll-spaceship"

end
# _config.yml
...
remote_theme: "jeffreytse/jekyll-theme-yat"
theme: jekyll-theme-yat

There's 1 warning on Github Action:
image
But I don't know how to fix it.

Hoping to get help,
thanks.

@jeffreytse jeffreytse self-assigned this Feb 19, 2024
@jeffreytse jeffreytse added the good first issue Good for newcomers label Feb 19, 2024
@jeffreytse
Copy link
Owner

Hi @atom-tracer

This issue was caused by your wrong base url, it made the css file loading wrongly. You can check the Readme for correcting your base url.

Thanks & Regards

@atom-tracer
Copy link
Author

Hi @atom-tracer

This issue was caused by your wrong base url, it made the css file loading wrongly. You can check the Readme for correcting your base url.

Thanks & Regards

Hi jeffreytse,
I checked the README.md, but it only points out that I should set the path correctly without telling how.
So I checked your repo and set mine the same as yours: jekyll_baseurl: "/jekyll-theme-yat" # Default is according to _config.yml
but it doesn't work.
Can you provide more information like, the item is to load css file in my repo or from other server? Or can you check my repo and give me some advice?
Thanks.

@jeffreytse
Copy link
Owner

Hi @atom-tracer

For yours, I believe it should be as below as your repository using a default github page name:

jekyll_baseurl: "/" # Default is according to _config.yml`

Note: the baseurl means the prefix for your resource path without considering the host.

Thanks & Regards

@atom-tracer
Copy link
Author

Hi,
I have done this, but the new bug come out during the Github Action, now it cannot pass the build.
Here's the info:

Configuration file: _config.yml
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
  Jekyll Spaceship: 🗂  use table-processor
  Jekyll Spaceship: 🗂  use mathjax-processor
  Jekyll Spaceship: 🗂  use plantuml-processor
  Jekyll Spaceship: 🗂  use mermaid-processor
  Jekyll Spaceship: 🗂  use polyfill-processor
  Jekyll Spaceship: 🗂  use media-processor
  Jekyll Spaceship: 🗂  use emoji-processor
  Jekyll Spaceship: 🗂  use element-processor
            Source: /github/workspace
       Destination: /github/workspace/build
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
   GitHub Metadata: Error processing value 'baseurl':
  Liquid Exception: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository. in /_layouts/post.html
             ERROR: YOUR SITE COULD NOT BE BUILT:
                    ------------------------------------
                    No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository.

@jeffreytse
Copy link
Owner

Hi @atom-tracer

According to your log, this issue caused by a Liquid Exception happened in /_layouts/post.html.

Liquid Exception: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your [github.com](http://github.com/) repository. in /_layouts/post.html

Please ensure your change on this file /_layouts/post.html is correct.

Thanks & Regards

@atom-tracer
Copy link
Author

Hi,
I see the log and, cuz I don't have any front-dev experience, I haven't changed this filepost.html. After I see the log, I copied yours and tried again, the problem still exists.
Sry for that I can't provide any useful analysis, since I haven't learned about these at all.
Can you give me more advice?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants