Comments (10)
Hey @ndarville - your question has several avenues that end in different results, depending on which path you choose to travel.
The easiest way is pretty obvious: use a system that already exists (bitly, tinyurl, is.gd, etc.) to create the short URLs. These services - like anything else on the internet - have the possibility of going under, which would cause those shortened URLs to disappear.
Another way would be to host your own URL shortening service. It's way more involved, but obviously gives you total control over the system. The popular self-hosted URL shorteners (YOURS and phurl) are PHP scripts that live on some server that you are in charge of.
Here's another idea: if you are using GitHub Pages and have a server that you'd like to use to help automate the creation of these short URLs, take a gander at the page_build
webhook. This hook fires when GitHub publishes your site to their Pages platform, giving you the ability to create a script that crawls the site as soon as it is built and dynamically create shortened URLs as it come across new pages.
Which route you decide to take depends on the level of effort you wish to trade off for the amount of control you want to have over the system.
Personally, I think URL shorteners are very rarely necessary. The only time I need to shorten a link is when I'm sending a tweet, but Twitter does that automatically through its t.co service.
from jekyll-help.
@troyswanson @ndarville what about something with jekyll-redirect-from
? I've never used that gem but from my understanding it does redirects from different URLs. I may also be completely wrong.
from jekyll-help.
Same, I've never used it, but I believe it deals with creating redirects within your site, which is only for your own domain. For instance, setting up a "vanity URL" like http://example.com/a-new-hope
which would redirect to http://example.com/2014/4/1/star-wars-a-new-hope-review/
.
from jekyll-help.
@troyswanson yes, but it may work for what @ndarville wants; and as you said, that be, e.g. http://example.com/XdFdE
would redirect to http://example.com/2014/4/1/star-wars-a-new-hope-review/
he will just need a rake task or whatever script to generate a draft with the redirect_from:
and the base64.
from jekyll-help.
It would be awesome to have some special keyword built into https://github.com/jekyll/jekyll-redirect-from ... :)
from jekyll-help.
@parkr On second thought, maybe not, huh?
from jekyll-help.
Yurrrrp.
from jekyll-help.
So the parting advice is to not involve Jekyll in the process at all?
from jekyll-help.
My parting advice would be to use jekyll-redirect-from and use more semantic short URL's, rather than the base 64 encoded gobbledy-gook we love so much. ;) E.g. My post "The Crime of Net Neutrality and What We Can Do to Fix It", I'd probably shorten that to redirect_from: /net-neutrality
or something. Or, if you wish, you can even make up a lil set of nonsense chars: redirect_from: /b32JakI
from jekyll-help.
Bingo. π
from jekyll-help.
Related Issues (20)
- undefined method 'activate_bin_path' HOT 1
- files not able to be accessed HOT 1
- bundle problem HOT 1
- Bundler could not find compatible versions for gem βkramdownβ HOT 1
- Jekyll Error not helpful HOT 1
- Every thing is perfect in local server. But not in GitHub. HOT 1
- favicon for minima theme HOT 1
- Installation Process NEED HELP HOT 1
- Jekyll Server Stripping URLs From Generated Code HOT 1
- Jekyll category names from folder name & frontmatter HOT 1
- cannot install HOT 1
- jniujhcv HOT 1
- Saving a file while running jekyll serve causes an error HOT 1
- GH-pages build and local jekyll build have different display formats for posts HOT 1
- Need Jekyll Help in running multiple jekyll instances on different port and using nginx server HOT 1
- Installation fails on CentOS 7 due to dependencies HOT 1
- Jekyll Build Not Working after MacOS High Sierra Update HOT 1
- Accessing specific data items not working HOT 1
- Jekyll not found after running gem install HOT 1
- GitHub published site appears much different than local site HOT 1
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-help.