Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: transformation of url to cleanUrl / pretty url #923

Merged
merged 2 commits into from
Aug 28, 2018

Conversation

endiliey
Copy link
Contributor

@endiliey endiliey commented Aug 28, 2018

Motivation

Fix #922 and babel/website#1780

cc @hzoo

Changes

  • Pretty/cleanUrl should only remove html extension and not other extension
  • Stronger test for the getPath function that transform url to clean url.
  • cleanUrl of /react/index.html should be /react/ and not /react

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

//2018-08-27-7.0.0.md
---
layout: post
title:  "Babel 7 Released"
author: Henry Zhu
authorURL: https://twitter.com/left_pad
date:   2018-08-27 18:00:00
categories: announcements
share_text: "Babel 7 Released"
---

After almost 2 years, 4k commits, over 50 pre-releases, and a lot of help we are excited to announce the release of Babel 7. It's been almost [3 years](https://babeljs.io/blog/2015/10/29/6.0.0) since the release of Babel 6! There's a lot of moving parts so please bear with us in the first weeks of release.

<!-- truncate -->

> If you appreciate the work we're doing on Babel, you can sponsor Babel on [Open Collective](https://opencollective.com/babel), support me on [Patreon](https://www.patreon.com/henryzhu), or get you or your company involved with Babel as part of work. We'd appreciate the collective ownership of this vital project in the JavaScript community!

## It's Happening! 🎉

Software is never going to be perfect but we're ready to ship something that's already been used in production for some time now! [`@babel/core`](https://www.npmjs.com/package/@babel/core) is already at 5.1 mil downloads/month because of its usage in tools like [Next.js 6](https://zeit.co/blog/next6), [vue-cli 3.0](https://medium.com/the-vue-point/vue-cli-3-0-is-here-c42bebe28fbb), [React Native 0.56](https://facebook.github.io/react-native/blog/2018/07/04/releasing-react-native-056), and even [Wordpress's frontend](https://github.com/Automattic/wp-calypso) 🙂!

## Babel's Role

I'd like to start this post by re-introducing Babel's [role](https://www.youtube.com/watch?v=fntd0sPMOtQ) in the JavaScript ecosystem over the last few years.

Header title URL should be correct now.

blogtitle

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 28, 2018
@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Aug 28, 2018

Deploy preview for docusaurus-preview ready!

Built with commit 6e02c49

https://deploy-preview-923--docusaurus-preview.netlify.com

@endiliey endiliey changed the title fix: cleanUrl should only remove html extension fix: cleanUrl only remove /\.html$/ & don't remove trailing slash for index file Aug 28, 2018
@endiliey endiliey changed the title fix: cleanUrl only remove /\.html$/ & don't remove trailing slash for index file fix: cleanUrl implementation Aug 28, 2018
@endiliey endiliey changed the title fix: cleanUrl implementation fix: transformation of url to cleanUrl / pretty url Aug 28, 2018
@existentialism
Copy link

@endiliey thanks for the quick fix!

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @endiliey

@yangshun yangshun merged commit d18b099 into facebook:master Aug 28, 2018
@endiliey endiliey deleted the blog-title branch August 28, 2018 04:23
@hzoo
Copy link
Contributor

hzoo commented Aug 28, 2018

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants