Code Monkey home page Code Monkey logo

redirection's Introduction

Redirecting with GitHub pages

This is a quick demo showing you how you can redirect markdown files in GitHub pages using an HTML template. You can check the source code and fork/change it to your needs.

You can use the forward.html layout template to redirect any one of your markdown files to another document. By default, it redirects directly, but you can tweak the time and the messaging you want to show to your needs using Markdown frontmatter.

The simplest option is to choose the forward template and define a target URL to send the user to.

Plain redirect

This just sends the user directly to the URL you provide. Try plain-redirect.md

---
layout: forward
target: https://example.com
---

Other options

You have a few more options to set to customise your redirect:

---
layout: forward
target: https://example.com
targetname: Example.com
targettitle: Taking you to example.com
time: 10
message: This isn't here any more!
---
  • target is the URL to redirect to. This defaults to the target URL
  • targetname is the text to display for the URL
  • targettitle is the title shown in the heading and the page title. This defaults to "Redirecting to targetname"
  • time is the time in seconds
  • message is the message to show above the link provided as a fallback

You can try this example redirect-all-options-set.md

redirection's People

Contributors

codepo8 avatar ayoungmanwithanoldsoul avatar

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.