def url_resolver(url):
    """Resolve url for both documentation and Github online.

    If the url is an IPython notebook links to the correct path.

    Args:
      url: the path to the link (not always a full url)

    Returns:
      a local url to either the documentation or the Github

    """
    if url[-6:] == '.ipynb':
        return url[4:-6] + '.html'
    else:
        return url