fix sphinx config to be compatible with custom theme and default theme while building docs.