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

docs: add anchors for blogs #271

Merged
merged 4 commits into from
Jul 22, 2022
Merged

Conversation

harish-sethuraman
Copy link
Member

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

Fixes eslint/eslint#16128

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Added anchor-js library and add anchors for headings inside docs

Is there anything you'd like reviewers to focus on?

check if any other element is getting anchors. I verified that table of content was h2 and was getting the anchor so I've move it to be a paragraph text and added font-weight alone to match the styling. If you are aware of any other elements like that need help. I verified once 😅 and everything seems to work fine

@netlify
Copy link

netlify bot commented Jul 15, 2022

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/62d9e90dc2660f0007b5dec8
😎 Deploy Preview https://deploy-preview-271--es-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 Jul 15, 2022

Deploy Preview for new-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/62d9e90dcdca3e0009bdb89f
😎 Deploy Preview https://deploy-preview-271--new-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 Jul 15, 2022

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/62d9e90d85b63c0008ce7e64
😎 Deploy Preview https://deploy-preview-271--ja-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 Jul 15, 2022

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/62d9e90d3a9e4b000895881f
😎 Deploy Preview https://deploy-preview-271--hi-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 Jul 15, 2022

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/62d9e90d6db7310008ab2391
😎 Deploy Preview https://deploy-preview-271--pt-br-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 Jul 15, 2022

Deploy Preview for cn-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/cn-eslint/deploys/62d9e90dc093300008ebaf04
😎 Deploy Preview https://deploy-preview-271--cn-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 Jul 15, 2022

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit b00083e
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/62d9e90d8965120008c56b5b
😎 Deploy Preview https://deploy-preview-271--fr-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.

@nzakas
Copy link
Member

nzakas commented Jul 16, 2022

Thanks for looking at this. Because this is only targeting blog posts, could all of the changes be made to layouts/post.html instead? That way everything that is post-specific is in one file.

@eslint-github-bot eslint-github-bot bot added the documentation Improvements or additions to documentation label Jul 16, 2022
@harish-sethuraman
Copy link
Member Author

bump for review

@@ -89,3 +89,7 @@
});
}
})();

document.addEventListener("DOMContentLoaded", () => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you also move this into post.html as an inline script? This causes an error on non-blog post pages now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@nzakas
Copy link
Member

nzakas commented Jul 20, 2022

@harish-sethuraman please don't bump for review. :) I already get notifications when pull requests are updated. If for some reason you don't get a response after a week, then it's appropriate to ask again.

@nzakas
Copy link
Member

nzakas commented Jul 22, 2022

Thanks. Just a note: in this repo, we don’t prefix everything with “docs:”, that’s just in the eslint repo.

@nzakas nzakas merged commit fd4f0ad into eslint:main Jul 22, 2022
@harish-sethuraman harish-sethuraman deleted the feat/add-anchors branch July 23, 2022 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Anchor link missing on headers
2 participants