make toc available as soon as enabled

* make toc available as soon as enabled.
* include js/css with relative path.