Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

feat: use cmark-gfm for rendering blog posts #2160

Merged
merged 31 commits into from
Mar 18, 2019
Merged

feat: use cmark-gfm for rendering blog posts #2160

merged 31 commits into from
Mar 18, 2019

Conversation

BinaryMuse
Copy link
Contributor

@BinaryMuse BinaryMuse commented Feb 18, 2019

Per #2102, this PR updates the site to use cmark-gfm (via BinaryMuse/electron-markdown) instead of hubdown for rendering blog posts (this is the only markdown rendering done directly by the site). The PR also makes a few other refactoring-style changes to the blog route handlers.

  • Replaces hubdown with cmark-gfm
  • Removes blog middleware and replaces it with actual routes that use a new blog lib for finding and parsing blog posts
  • Modifies blog feed to use the new blog lib
  • Ensures blog posts are loaded asynchronously; fixes race condition where blog routes could run with no posts loaded
  • Moves blog views from views/posts to views/blog
  • Changes Node version from 8 to 10

Todo:

  • Add IDs to headings
  • Turn headings into links
  • Syntax highlighting
  • Fix extra space at bottom of code listings
  • Fix iframes (e.g. YouTube videos on /blog/2015-whats-new-in-electron)

@BinaryMuse BinaryMuse added the wip DO NOT MERGE, Work in Progress label Feb 18, 2019
@BinaryMuse BinaryMuse changed the title Use cmark-gfm for rendering blog posts feat: use cmark-gfm for rendering blog posts Feb 18, 2019
@electron-bot electron-bot temporarily deployed to electron-website-pr-2160 February 18, 2019 21:36 Inactive
@BinaryMuse BinaryMuse added wip DO NOT MERGE, Work in Progress and removed wip DO NOT MERGE, Work in Progress labels Feb 18, 2019
@BinaryMuse BinaryMuse changed the title feat: use cmark-gfm for rendering blog posts [WIP] feat: use cmark-gfm for rendering blog posts Feb 18, 2019
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 19, 2019 14:31 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 19, 2019 14:33 Inactive
@BinaryMuse
Copy link
Contributor Author

Okay, I believe this is feature-complete when compared with the previous renderer. I still want to do some comparisons of the old and new results to make sure nothing unexpected broke.

@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 19, 2019 15:15 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 19, 2019 15:21 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 20, 2019 16:43 Inactive
@BinaryMuse BinaryMuse changed the title [WIP] feat: use cmark-gfm for rendering blog posts feat: use cmark-gfm for rendering blog posts Feb 20, 2019
@BinaryMuse
Copy link
Contributor Author

BinaryMuse commented Feb 20, 2019

@electron/wg-website This is ready for review.

I downloaded a copy of every blog post on the current site and on this PR's deployment, and generated a diff for each. The results show that the changes are either (1) whitespace changes (particularly an extra non-visible newline at the end of code blocks), (2) single/double quote changes, (3) some <li> elements no longer have their contents wrapped in <p>, and (4) the addition of autolinks.

@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 20, 2019 17:10 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 20, 2019 17:47 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 20, 2019 21:01 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 21, 2019 09:04 Inactive
Copy link
Contributor

@vhashimotoo vhashimotoo left a comment

Choose a reason for hiding this comment

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

:electron:

@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 February 22, 2019 08:17 Inactive
@BinaryMuse BinaryMuse temporarily deployed to electron-website-pr-2160 March 7, 2019 17:19 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants