Comments (8)
@dentarg A mistake – sorry!
from jekyll-redirect-from.
Is there any reason not to default to site.url
, if set, and then fall back to site.github.url
?
from jekyll-redirect-from.
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.
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.
@benbalter That would be just fine.
from jekyll-redirect-from.
@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.
👍
from jekyll-redirect-from.
Hmm... what's the reason for closing this?
from jekyll-redirect-from.
Related Issues (20)
- doesn't work with get parameters HOT 8
- Time for a new release HOT 1
- Redirection issues caused by deploying Github Pages on Vercel HOT 1
- Redirect pages not working when deployed from Netlify HOT 3
- All redirection urls are seen as pages by Jekyll HOT 3
- Automatically redirecting both with and without trailing slash HOT 1
- Time for a new release HOT 1
- Add ability to specify a list of redirects in `_config.yml` HOT 1
- `redirect_from` does not work with file extensions HOT 3
- `redirect_from` works on Jekyll preview server, not on live GitHub Pages site HOT 2
- Time for a new release HOT 1
- Time for a new release HOT 1
- Time for a new release HOT 1
- `redirect_from` is adding `site.baseurl` to `site.url` (Duplicates the baseurl on Github Pages) HOT 2
- Option to set a built default redirect for whole site. HOT 1
- File Redirection and blank page after downloading HOT 1
- Time for a new release HOT 1
- Chokes on numeric directory names
- Error when redirect from/to collisions exist at build time (again)
- Does this plugin work with the `config.toml` format?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jekyll-redirect-from.