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

chore: Changes to support static frontmatter in docs #933

Merged
merged 4 commits into from Apr 22, 2022

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Apr 13, 2022

Updated website templates to us the static frontmatter in the docs files (eslint/eslint#15782).

Changes include:

  • Updating all docs files to appropriate format
  • Updating doc.liquid to show titles from frontmatter (fall back to older way for versioned URLs such as /docs/7.0.0)
  • Added a filter to match a string to a regex

@eslint-github-bot eslint-github-bot bot added chore This change is not user-facing triage An ESLint team member will look at this issue soon labels Apr 13, 2022
@netlify
Copy link

netlify bot commented Apr 13, 2022

Deploy Preview for eslint ready!

Name Link
🔨 Latest commit f8b048c
🔍 Latest deploy log https://app.netlify.com/sites/eslint/deploys/62572ce8ceef1900090c21a7
😎 Deploy Preview https://deploy-preview-933--eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 13, 2022

Deploy Preview for eslint ready!

Name Link
🔨 Latest commit 24db645
🔍 Latest deploy log https://app.netlify.com/sites/eslint/deploys/62602cf6c92f0e000818b8bb
😎 Deploy Preview https://deploy-preview-933--eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines 11 to 8
(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
<!--FIXABLE-->
Copy link
Member

Choose a reason for hiding this comment

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

This text is generated by Makefile.js. If we remove it here, it will be lost.

https://deploy-preview-933--eslint.netlify.app/docs/rules/array-bracket-newline

(the same for recommended and suggestions).

Copy link
Member

Choose a reason for hiding this comment

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

If the goal is to generate this text during the website build, we should add to this repo some code that generates it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be generated by gensite in the ESLint repo. You already identified the bug there that caused this.

@mdjermanovic
Copy link
Member

If we want to add docs/developer-guide/architecture/index.md, we should remove docs/developer-guide/architecture.md file in this repository to allow access to https://eslint.org/docs/developer-guide/architecture/

(when there's a foo/bar.html file, Netlify redirects foo/bar/ to foo/bar even if foo/bar/index.html exists).

Step 2 in Makefile.js is actually not removing anything from the website. It looks like it expects a list of files, but gets a list of directories.

@nzakas
Copy link
Member Author

nzakas commented Apr 15, 2022

If we want to add docs/developer-guide/architecture/index.md, we should remove docs/developer-guide/architecture.md file in this repository

Could have sworn I did that but maybe didn’t make it into the last commit.

@nzakas
Copy link
Member Author

nzakas commented Apr 16, 2022

It looks like the website is now dependent on Makefile.js not removing old files (I tried fixing it but it introduced a bunch of errors due to files that live in website but aren't present in eslint). So, we should just leave that as-is until the new docs site is up and running, at which point we can remove all of that logic.

Copy link
Member

@mdjermanovic mdjermanovic 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!

@mdjermanovic mdjermanovic merged commit acfcb9c into master Apr 22, 2022
@mdjermanovic mdjermanovic deleted the docs-fm-update branch April 22, 2022 02:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore This change is not user-facing triage An ESLint team member will look at this issue soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants