Set a variable if we're building for the live docs site or not

This is useful to customize online / offline search and whether to
include things like Google Analytics.

Fixes #9875
Merge pull request #12097 from whiteinge/docs-ga-opt-in

Set a variable if we're building for the live docs site or not