1

This question was the start of the problems, but that was solved, and now I have another one.

After having problems saying that the theme could not be found, when I solved the issue, now the webpage is deployed but CSS styles and links are not working. I know this deployment can be done, in my local vm it worked, and it's a really simple page with a basic theme (not the default, but still basic).

If you want to see the code, you can see my repo here. If you want to check out the website, you can do it here.

Edit

Here you have all the output of the job in gitlab which deployed the web

Running with gitlab-runner 12.3.0 (a8a019e0)
  on docker-auto-scale ed2dce3a
Using Docker executor with image ruby:2.5 ...
Pulling docker image ruby:2.5 ...
Using docker image sha256:092689b795107d1b2eadb82494acf4764191baa0aa5bf4673b8ee2a50f70ba97 for ruby:2.5 ...
Running on runner-ed2dce3a-project-14628881-concurrent-0 via runner-ed2dce3a-srm-1571224453-869b1d6e...
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/unveiled_adri/jekyll_project/.git/
Created fresh repository.
From https://gitlab.com/unveiled_adri/jekyll_project
 * [new ref]         refs/pipelines/89187526 -> refs/pipelines/89187526
 * [new branch]      master                  -> origin/master
Checking out 94a836f5 as master...

Skipping Git submodules setup
$ gem install jekyll
Successfully installed public_suffix-4.0.1
Successfully installed addressable-2.7.0
Successfully installed colorator-1.1.0
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.6.0
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
Successfully installed em-websocket-0.5.1
Successfully installed concurrent-ruby-1.1.5

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Successfully installed i18n-1.7.0
Building native extensions. This could take a while...
Successfully installed ffi-1.11.1
Building native extensions. This could take a while...
Successfully installed sassc-2.2.1
Successfully installed jekyll-sass-converter-2.0.1
Successfully installed rb-fsevent-0.10.3
Successfully installed rb-inotify-0.10.0
Successfully installed listen-3.2.0
Successfully installed jekyll-watch-2.2.1
Successfully installed kramdown-2.1.0
Successfully installed kramdown-parser-gfm-1.1.0
Successfully installed liquid-4.0.3
Successfully installed mercenary-0.3.6
Successfully installed forwardable-extended-2.6.0
Successfully installed pathutil-0.16.2
Successfully installed rouge-3.12.0
Successfully installed safe_yaml-1.0.5
Successfully installed unicode-display_width-1.6.0
Successfully installed terminal-table-1.8.0
-------------------------------------------------------------------------------------
Jekyll 4.0 comes with some major changes, notably:

  * Our `link` tag now comes with the `relative_url` filter incorporated into it.
    You should no longer prepend `{{ site.baseurl }}` to `{% link foo.md %}`
    For further details: https://github.com/jekyll/jekyll/pull/6727

  * Our `post_url` tag now comes with the `relative_url` filter incorporated into it.
    You shouldn't prepend `{{ site.baseurl }}` to `{% post_url 2019-03-27-hello %}`
    For further details: https://github.com/jekyll/jekyll/pull/7589

  * Support for deprecated configuration options has been removed. We will no longer
    output a warning and gracefully assign their values to the newer counterparts
    internally.
-------------------------------------------------------------------------------------
Successfully installed jekyll-4.0.0
26 gems installed
$ gem install jekyll-theme-basically-basic -v 1.4.1
Successfully installed i18n-0.9.5
Successfully installed sass-listen-4.0.0

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

Successfully installed sass-3.7.4
Successfully installed jekyll-sass-converter-1.5.2
Successfully installed kramdown-1.17.0
Successfully installed jekyll-3.8.6
Successfully installed jekyll-sitemap-1.3.1
Successfully installed jekyll-seo-tag-2.6.1
Successfully installed jekyll-paginate-1.1.0
Successfully installed jekyll-feed-0.12.1
Successfully installed jekyll-theme-basically-basic-1.4.1
11 gems installed
$ gem install tzinfo -v 1.2.2
Successfully installed thread_safe-0.3.6
Successfully installed tzinfo-1.2.2
2 gems installed
$ gem install tzinfo-data
Successfully installed tzinfo-data-1.2019.3
1 gem installed
$ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using public_suffix 4.0.1
Using addressable 2.7.0
Using bundler 1.17.3
Using colorator 1.1.0
Using concurrent-ruby 1.1.5
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using ffi 1.11.1
Using forwardable-extended 2.6.0
Using i18n 1.7.0
Using sassc 2.2.1
Using jekyll-sass-converter 2.0.1
Using rb-fsevent 0.10.3
Using rb-inotify 0.10.0
Using listen 3.2.0
Using jekyll-watch 2.2.1
Using kramdown 2.1.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.3.6
Using pathutil 0.16.2
Using rouge 3.12.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.6.0
Using terminal-table 1.8.0
Using jekyll 4.0.0
Using jekyll-feed 0.12.1
Using jekyll-paginate 1.1.0
Using jekyll-seo-tag 2.6.1
Using jekyll-sitemap 1.3.1
Fetching jekyll-theme-basically-basic 1.4.4
Installing jekyll-theme-basically-basic 1.4.4
Fetching minima 2.5.1
Installing minima 2.5.1
Bundle complete! 4 Gemfile dependencies, 33 gems now installed.
Bundled gems are installed into `/usr/local/bundle`
$ jekyll build --trace -d public/
Configuration file: /builds/unveiled_adri/jekyll_project/_config.yml
            Source: /builds/unveiled_adri/jekyll_project
       Destination: /builds/unveiled_adri/jekyll_project/public
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
                    done in 0.442 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
Uploading artifacts...
public: found 52 matching files                    
Uploading artifacts to coordinator... ok            id=322520499 responseStatus=201 Created token=PxjpDi2z
Job succeeded

The website it's deployed but as I said, no errors, but css and links are not working

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Look at your browser's developer console: `Loading failed for the – Max Oct 16 '19 at 15:37
  • I saw it yes, but I don't know what this means. I can't understand where this problem is coming from and how to solve it :/ – Adrián Jaramillo Oct 16 '19 at 15:43
  • Probably the CSS/javascript files are not ending up in right location, or the paths for loading those files in gitlab are looking in the wrong place. You need to make sure you're putting these files in the right place in the repo and that you're specifying their location in a way that is portable – Max Oct 16 '19 at 15:48
  • Well I didn't anything, I'm just creating the markdown files and generating the files with jekyll, and in the config I changed the theme. That's basically all I did, but when I deploy this, it's broken. Locally it's working but with the docker vm in gitlab is not working, so I guess that something is happening, but I really can't tell – Adrián Jaramillo Oct 16 '19 at 15:53
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Oct 17 '19 at 18:02
  • Thanks for the suggestion I'll take that into account for my next posts. I was just running out of time and I desperately looked for help – Adrián Jaramillo Oct 17 '19 at 18:28

1 Answers1

3

SOLUTION

I just needed to change this in _config.yml

baseurl: "/jekyll_project" # the subpath of your site, e.g. /blog
url: "https://unveiled_adri.gitlab.io/" # the base hostname & protocol for your site, e.g. http://example.com

When I was first testing this locally I didn't need to fill this fields, but since now I am deploying the website on gitlab pages hosting, then I needed to fill the fields. I found this solution thanks to this post https://gitlab.com/pages/jekyll/issues/22

Finally yep, it works, but I don't really understand why this is working. If someone could comment on this answer and explain to me what happened I would be really glad, I always want to learn what is happening and why! <3

  • 1
    Tip of the day : https://stackoverflow.com/questions/27386169/change-site-url-to-localhost-during-jekyll-local-development/27400343#27400343 – David Jacquel Oct 16 '19 at 19:20