From 213df550332331c300b2d39226cf1fe13e50365d Mon Sep 17 00:00:00 2001 From: erciccione Date: Sun, 30 Aug 2020 11:00:11 +0200 Subject: [PATCH] Make baseurl empty and adapt README, netlify.toml and the sitemap_generator accordingly --- README.md | 2 +- _config.yml | 2 +- _plugins/sitemap_generator.rb | 2 +- netlify.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e0ce83bc..2d48c44a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ If you need support about something related to the website, plese join `#monero- Once you have the above list of things, it's typically a good idea to build the website from your local computer to make sure it works before you make any changes. To do this, complete the following steps: 1. Navigate to your local `monero-site` repository. -2. Serve the website: `bundle exec jekyll serve --baseurl ''`. If you want, you can speedup thi process by loading only the last blog post instead of all of them. Simply add `--limit_posts 1` to the command above. The resulting command will be `bundle exec jekyll serve --limit_posts 1 --baseurl ''`. +2. Serve the website: `bundle exec jekyll serve`. If you want, you can speedup this process by loading only the last blog post instead of all of them. Simply add `--limit_posts 1` to the command above. The resulting command will be `bundle exec jekyll serve --limit_posts 1`. 3. Open a browser and go to [http://127.0.0.1:4000](http://127.0.0.1:4000). 4. If all went well, you should see the Monero website and you're ready to make changes. diff --git a/_config.yml b/_config.yml index 1b573ac3..d9dd6d7b 100644 --- a/_config.yml +++ b/_config.yml @@ -2,7 +2,7 @@ email: dev@getmonero.org name: Monero description: Monero is a digital currency that is secure, private, and untraceable. keywords: "monero, xmr, bitmonero, cryptocurrency" -baseurl: "https://www.getmonero.org" +baseurl: "" url: "https://www.getmonero.org" markdown: kramdown diff --git a/_plugins/sitemap_generator.rb b/_plugins/sitemap_generator.rb index c4878bc7..f9113427 100644 --- a/_plugins/sitemap_generator.rb +++ b/_plugins/sitemap_generator.rb @@ -181,7 +181,7 @@ module Jekyll # Returns the location of the page or post def fill_location(site, page_or_post) loc = REXML::Element.new "loc" - url = site.config['baseurl'] + url = site.config['url'] + site.config['baseurl'] loc.text = page_or_post.location_on_server(url) loc diff --git a/netlify.toml b/netlify.toml index ebc4bba2..787dab7d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "_site/" - command = "jekyll build --trace --limit-posts 10 --baseurl ''" + command = "jekyll build --trace --limit-posts 10" [build.environment] RUBY_VERSION = "2.6"