                 }
               else
                 setTimeout ->
-                  loadScript '//' + config.comment.shortname + '.disqus.com/embed.js'
+                  loadScript '//' + getConfig('shortname', 'comment') + '.disqus.com/embed.js'
             , 1000
 
           when 'duoshuo'
             setTimeout ->
               if W.DUOSHUO then DUOSHUO.EmbedThread '.ds-thread'
               else
-                W.duoshuoQuery = {short_name: config.comment.shortname}
+                W.duoshuoQuery = {short_name: getConfig('shortname', 'comment')}
                 loadScript '//static.duoshuo.com/embed.js'
             , 1000
 

        date: time(path)
      }

    document.getElementById('main').innerHTML = template 'posts-list', {posts: posts}

  getArticle = (path)->
    path = path.replace(/\/$/, '').split '/'

    request = new XMLHttpRequest()
    request.open 'GET', 'https://raw.githubusercontent.com/'  + config.github.repo + '/' + (if config.github.branch then config.github.branch + '/' else '')+ (if config.github.path then config.github.path else '') + encodeURIComponent path.join('-') + '.md'

    request.onload = ->
      if request.status >= 200 and request.status < 400
        data = request.responseText

        document.getElementById('main').innerHTML = template 'article', {
            title: path.pop(),
            date: time(path),

            url: location.href,
            comment: {
              type: if config.comment.type then config.comment.type else ''
            },

            content: (new showdown.Converter).makeHtml data

  {
    showList: showList
  }
)(this, document)