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

permalink conversion refinement #3

Open
epage opened this issue Aug 31, 2018 · 0 comments
Open

permalink conversion refinement #3

epage opened this issue Aug 31, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@epage
Copy link
Member

epage commented Aug 31, 2018

From cobalt-org/cobalt.rs#374

While working on migrating my blog from WP to Cobalt through Jekyll, I've used 2 different WP plugin to export to Jekyll:

wp_exporter produce this kind of frontmatter:

---
id: 3494
title: Scary Pockets
date: 2017-05-03T20:55:07+00:00
author: Geobert
layout: post
guid: http://geobert.fr/?p=3494
permalink: /2017/05/03/scary-pockets/
categories:
  - Non classé
tags:
  - funk
  - musique
  - pomplamoose
---

exit_wp:

---
author: geob
comments: true
date: 2017-05-03 19:55:07+00:00
layout: post
link: https://haurchefant.fr/2017/05/03/scary-pockets/
slug: scary-pockets
title: Scary Pockets
wordpress_id: 3494
categories:
- Non classé
tags:
- funk
- musique
- pomplamoose
---

wp_exporter produce a more Jekyll compatible front, but it has a bug that delete some links (youtube links in my example).

So I used exit_wp that keep all the content properly, but the front lack of permalink.

Another issue is that both front ends their permalink with a slash instead of .html, which makes cobalt try to generate /permalink/index.html instead of /permalink.html.

So maybe we can improve the converter by providing some options:

  • provide some regex to define how to parse the permalink attr, so we can say which field we need to convert into permalink, and how (like dropping the base url my example)
  • make sure that no trailing slash remains and add extension .html
  • or even drop the permalink completely
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant