docusaurus/packages/docusaurus-1.x
PA 1bf590ea2b fix(v1): fix page title render issue when referred by search result (#1869)
* fix(v1): Fix page title render issue when referred by search result

When Algolia DocSearch query finds a match for a page's title, it attempts to generate
a permalink. Because the page title element (`h1`) does not have an `id`, Algolia
generates uses the `id` from closes parent element. Because of this, the page title
scrolls to a position that is slightly overlayed by the fixed top navigation bar.

This fix sets an `id` for the page title so that the search result is able to generate
a more accurate permalink.

* Adjust css for handling post title to be on the top when referred by an anchor

The post title can sometimes be referred by an anchor using the "id" of that element.
In that case the title will be automatically be the first element within the viewport.
Since we have a header fixed at the top of the view port, the title becomes hidden or
not visible. That's why some css adjustments are needed so that if any user ends up
with a link to a page that is referring to the post title (i.e. auto generated anchor
link by algolia DocSearch).

The css code uses pseudo element `:before` to make the adjustments. Details on this
can be found in the following article:

https://css-tricks.com/hash-tag-links-padding/

* Adjust CSS so that different selectors are on separate lines
2019-11-18 11:07:02 -08:00
..
examples misc(v1): use Node.js lts version (#1920) 2019-11-03 22:57:51 +08:00
lib fix(v1): fix page title render issue when referred by search result (#1869) 2019-11-18 11:07:02 -08:00
.eslintrc.js chore: bump dev dependencies (#1955) 2019-11-11 17:44:26 +07:00
.gitignore chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
.npmignore chore: move to monorepo (#1297) 2019-03-23 14:21:36 +07:00
package.json v2.0.0-alpha.35 2019-11-17 16:51:57 +07:00
README.md docs(v1): remove exclusive language (#1961) 2019-11-11 14:06:54 -08:00

Docusaurus

Docusaurus

npm version CircleCI Status PRs Welcome Chat code style: prettier Tested with Jest Netlify Status

Introduction

Docusaurus is a project for easily building, deploying, and maintaining open source project websites.

  • Simple to Start Docusaurus is built to be easy to get up and running in as little time possible. We've built Docusaurus to handle the website build process so you can focus on your project.
  • Localizable Docusaurus ships with localization support via CrowdIn. Empower and grow your international community by translating your documentation.
  • Customizable While Docusaurus ships with the key pages and sections you need to get started, including a home page, a docs section, a blog, and additional support pages, it is also customizable as well to ensure you have a site that is uniquely yours.

Installation

Docusaurus is available as the docusaurus package on npm.

We have also released the docusaurus-init package to make getting started with Docusaurus even easier.

Contributing

We've released Docusaurus because it helps us better scale and support the many OSS projects at Facebook. We hope that other organizations can benefit from the project. We are thankful for any contributions from the community.

Code of Conduct

Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contributing Guide

Read our contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Docusaurus.

Beginner Friendly Bugs

To help you get your feet wet and get you familiar with our contribution process, we have a list of beginner friendly bugs that might contain smaller issues to tackle first. This is a great place to get started.

Contact

We have a few channels for contact:

  • Discord with two text channels:
    • #docusaurus-users for those using Docusaurus.
    • #docusaurus-dev for those wanting to contribute to the Docusaurus core.
  • @docusaurus on Twitter
  • GitHub Issues

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

Docusaurus is MIT licensed.

The Docusaurus documentation (e.g., .md files in the /docs folder) is Creative Commons licensed.