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

Update manifest and handbook pages before initial import #80

Conversation

@coffee2code
Copy link

@coffee2code coffee2code commented May 15, 2021

A few things that should be addressed prior to initial import:

  • Reorder manifest entries to match order currently found in live handbook. (To retain order of pages.)
  • Don't escape forward slashes in manifest. (While not problematic, it's not necessary.)
  • Don't escape brackets for shortcodes. (Escaping prevents them from being treated as shortcodes.)
@javiercasares
Copy link
Contributor

@javiercasares javiercasares commented May 15, 2021

Hi @coffee2code

We use the WP-CLI command to create this file... so... how can we order the files? Should we do it manually?

The escaping is something the WP-CLI command does automatically :(

We just use: wp hosting-handbook gen-all

Loading

Escaping prevents them from being treated as shortcodes.
@coffee2code coffee2code force-pushed the update-manifest-before-initial-import branch from 7872988 to 34ed9c5 May 24, 2021
@coffee2code
Copy link
Author

@coffee2code coffee2code commented May 24, 2021

Ok, based on the comments by @javiercasares, I've updated the PR to omit changes to handbook-manifest.json.

To address the three things I was targeting with my original PR:

Reorder manifest entries to match order currently found in live handbook. (To retain order of pages.)

Given that the manifest is auto-generated, there isn't a good way to configure page order. The manifest can define order via an order attribute per-page, but there isn't a straightforward way to define that in your current auto-generated approach. Barring that, handbook pages are ordered in the order they are listed, which for this repo is the filename order. Technically you could prefix a number to order the page (e.g. 01-get-involved.md), but then you'd have to rename files to change the order (though that may not be an issue here).

Ultimately, the page order can be expicitly set in WP after the import and it'll be retained, so we can just ignore the page ordering issue.

Don't escape forward slashes in manifest. (While not problematic, it's not necessary.)

As I originally noted, being escaped wasn't really an issue. I wasn't aware the manifest was auto-generated, so I thought the escaping was being done manually. As a result, this need not be changed.

Don't escape brackets for shortcodes. (Escaping prevents them from being treated as shortcodes.)

This still needs to be done and is all that remains of my original PR.

Loading

@javiercasares
Copy link
Contributor

@javiercasares javiercasares commented May 26, 2021

Don't escape brackets for shortcodes. (Escaping prevents them from being treated as shortcodes.)
This still needs to be done and is all that remains of my original PR.

We did this because when copying manually the shortcodes from Github to Make it was an issue... I'll make some changes around this.

Loading

@javiercasares
Copy link
Contributor

@javiercasares javiercasares commented Jun 9, 2021

The shortcodes are in the master... so it should work fine now...

Loading

@javiercasares
Copy link
Contributor

@javiercasares javiercasares commented Jun 15, 2021

I think we have this done with #81

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants