-
Notifications
You must be signed in to change notification settings - Fork 50
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
Use Jekyll for Playbook #355
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a complete review, but let's also install and use Prettier and ESLint for JavaScript linitng and formatting.
1d5e634
to
24e1f28
Compare
Running
|
The scrolling within the file, when clicking an inner anchor link, is very slow and makes me dizzy. Is it slower because it's on my local, or could it be caused by the change of framework? |
@CristinaRO It's caused by the call to |
In line with running Prettier on JS, we could probably do with running it over all the Markdown as well to ensure it's clean and pretty (as well as throw a test in which stops people checking in messy markdown as well). |
We do use Hound for linting the Markdown, which makes the visibility of problems easier for non-devs |
(Although, at the moment, it seems to be linting the JS and Ruby too, making a helluva lot of noise!) |
7bafd3f
to
edcbe81
Compare
@CristinaRO What version of Go are you using? ( |
f5fdfc0
to
c0b3c67
Compare
Shouldn't this be part of the bootstrap standard operating procedure though? Or at least specified in the readme / dependencies. |
Yep, I’ll add that now I know that’s the issue 👍🏻 |
5149675
to
df4fe54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to help make some of the changes I'm suggesting. Let me know.
.prettierrc
Outdated
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"semi": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👎
We're running through Babel, so let's use modern standards and options. And JavaScript has strange behaviour in some cases around semicolons, so let's not turn them off. Defaults are best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, will do. I fully admit to not really knowing what the "best" way of doing these kind of things are, so appreciate the steer 👍
@@ -1,3 +1,5 @@ | |||
--- | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably be using the metadata blocks to add things like page titles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I shied away from this was I didn't want to add any additional workload for non-devs who are contributing to the Playbook. This is a very loosely-held opinion though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an upgrade. If they don't do it, it will have the default title and all will be well :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this is done now 👍
c113415
to
eddf518
Compare
# Conflicts: # package-lock.json # package.json
This fixes most of the accessilbility issues as outlined in the automated check in #350
Also, use the `*-version` files to specify the versions to use in Github actions
This isn't always available when specifying the ruby version in Actions
Also, move the dmark image out of the `build` folder
Fixes the runtime warning `Liquid Warning: Liquid syntax error (line 70): Expected end_of_string but found id in "{{A SPECIFIC PAGE}}" in guides/plugin-advisories.md`. This did not come up during linting. The text “a specific page” was not appearing, because it was being treated as a placeholder. Use square brackets instead or curly, for consistency with the other example advisories, and capitalise similarly to the other advisories. NB: The existing capitalisation goes against our style recommendations, but it is consistent throughout the plugin advisories guide.
Now the top-level headings are handled in the frontmatter, the way the navigation is handled needs tweaking slightly
We had a link that didn't go anywhere, and now we have the frontmatter, it's easier to get the title of each page to autogenerate a list
354520a
to
3276bde
Compare
Closing in favour of #365. |
Fixes #349
Until now, we've used Docsify to power the Playbook, which has worked OK, but it doesn't work at all with JavaScript turned off. We wouldn't accept this in client projects, so it makes sense for the Playbook to meet the same standards.
I've tweaked the Playbook to use Jekyll to build the site, as well as using Webpack to build the limited Javascript functionality. Unfortunately, as the Playbook is a static site, the search won't work without Javascript, but I think this is a fair trade-off.
I've got this branch deploying to Netlify, as it gives us more flexibility in how we deploy the site. Assuming we're OK with this, it'll need a bit more configuration for us to move it across.
You can see the branch deployed the Netlify here - https://competent-bhabha-662efd.netlify.app/