Skip to content

Remove leading 'fbOnly' sections from the DOM if non-FB viewer #1129

Open

Description

@fredemmott

This is most important for API reference pages.

Right now, we hide them with CSS. The problem with this is it shows up in Google results - e.g. search for 'vec map hhvm', and 'Facebook Engineer? This is available as Vec\map in the www repository. ' is just a waste of space there and makes google less useful.

This is not about confidentially etc, as the site (and all of its' inputs) are open source and made on public systems, and the FB-specific content will still be in the public docker images. This is just about making the text that google shows more useful.

This isn't quite trivial as we currently pregenerate the entire .html file. There's a few options:

  • filter them out of the HTML at render time (brittle, slow, but straightforward)
  • stop putting them in the HTML. Inject at render time (only works for leading fbonly messages, unless very complicated)
  • render separate _fb.html files. Show either foo.html or foo_fb.html depending on ASN

For all of these, it would probably be worth adding a markdown extension to explicitly recognize fbonly, instead of using <div class='fbOnly'>, so they can be more-reliably matched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions