Code Monkey home page Code Monkey logo

Comments (7)

parkr avatar parkr commented on September 2, 2024

What is the expected output? Can you try moving the file to you destination and ensuring it's served as HTML?

from jekyll-redirect-from.

ilg-ul avatar ilg-ul commented on September 2, 2024

the current output is:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="/blog/index.html">
<meta http-equiv=refresh content="0; url=/blog/index.html">
<h1>Redirecting...</h1>
<a href="/blog/index.html">Click here if you are not redirected.</a>
<script>location='/blog/index.html'</script>

I would expect something like

<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="/blog/">
<meta http-equiv=refresh content="0; url=/blog/">
<h1>Redirecting...</h1>
<a href="/blog/">Click here if you are not redirected.</a>
<script>location='/blog/'</script>

I did not try this, but any other idea that makes the redirected page not show the ending /index.html in the address bar should be fine.

from jekyll-redirect-from.

parkr avatar parkr commented on September 2, 2024

Ok, now I see. What does your redirect_from statement look like?

from jekyll-redirect-from.

ilg-ul avatar ilg-ul commented on September 2, 2024

file /blog/index.html

---
layout: blog
title: GNU ARM Eclipse News
author: Liviu Ionescu
redirect_from:
  - /news/

---

{% if site.paginate %}
...

(full file available from https://github.com/gnuarmeclipse/gnuarmeclipse.github.io-source/blob/master/blog/index.html)

from jekyll-redirect-from.

brandonb927 avatar brandonb927 commented on September 2, 2024

Came here to mention this as well. We use extension-less URLs on www.sendwithus.com and we're having an issue with the plugin where it's generating .html in the redirect path.

Note: this is copied from minified HTML so there's no quotes in the URLs.

Redirect YAML in filename resources/components.html:

redirect_from:
  - /resources/bulletproof-html-email-components/

Expected output:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href=/resources/components>
<meta http-equiv=refresh content="0; url=/resources/components">
<h1>Redirecting...</h1><a href=/resources/components>Click here if you are not redirected.</a>
<script>
location = "/resources/components"
</script>

Generated output:

<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href=/resources/components.html>
<meta http-equiv=refresh content="0; url=/resources/components.html">
<h1>Redirecting...</h1><a href=/resources/components.html>Click here if you are not redirected.</a>
<script>
location = "/resources/components.html"
</script>

from jekyll-redirect-from.

KittyGiraudel avatar KittyGiraudel commented on September 2, 2024

Confirmed.

from jekyll-redirect-from.

parkr avatar parkr commented on September 2, 2024

I don't have time to look into this for the next few weeks, so if someone has time to fiddle with the code and submit a patch, it'd be much appreciated.

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.