Code Monkey home page Code Monkey logo

Comments (8)

parkr avatar parkr commented on June 6, 2024 2

@dentarg A mistake – sorry!

from jekyll-redirect-from.

benbalter avatar benbalter commented on June 6, 2024 1

Is there any reason not to default to site.url, if set, and then fall back to site.github.url?

from jekyll-redirect-from.

dentarg avatar dentarg commented on June 6, 2024

We use GitHub Pages, but we don't use the CNAME file, because we have our own proxy and cache before GitHub Pages.

The use case for this is that we want to avoid SSL errors if someone tries HTTPS and our custom domain name.

from jekyll-redirect-from.

parkr avatar parkr commented on June 6, 2024

I'm kinda torn on this. One thing to do in the meantime is to just write a layout that uses our redirect HTML and hook it in with some front matter variables and write the redirection pages yourself.

/cc @benbalter

from jekyll-redirect-from.

parkr avatar parkr commented on June 6, 2024

@benbalter That would be just fine.

from jekyll-redirect-from.

dentarg avatar dentarg commented on June 6, 2024

@parkr @benbalter like this?

$ git diff
diff --git a/lib/jekyll-redirect-from/redirector.rb b/lib/jekyll-redirect-from/redirector.rb
index 40db8c3..91b7067 100644
--- a/lib/jekyll-redirect-from/redirector.rb
+++ b/lib/jekyll-redirect-from/redirector.rb
@@ -69,7 +69,11 @@ module JekyllRedirectFrom
     end

     def redirect_prefix(site)
-      config_github_url(site) || config_baseurl(site) || ""
+      config_url(site) || config_github_url(site) || config_baseurl(site) || ""
+    end
+
+    def config_url(site)
+      site.config.fetch('url', nil)
     end

     def config_github_url(site)

and adjustment of specs

from jekyll-redirect-from.

benbalter avatar benbalter commented on June 6, 2024

👍

from jekyll-redirect-from.

dentarg avatar dentarg commented on June 6, 2024

Hmm... what's the reason for closing this?

from jekyll-redirect-from.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.