@@ -6,6 +6,7 @@ module.exports = config
7var viewPaths = {github: 'blob', gitlab: 'blob', bitbucket: 'src'}
7var viewPaths = {github: 'blob', gitlab: 'blob', bitbucket: 'src'}
8var headingPrefixes = {github: '#', gitlab: '#', bitbucket: '#markdown-header-'}
8var headingPrefixes = {github: '#', gitlab: '#', bitbucket: '#markdown-header-'}
9+var topAnchors = {github: '#readme', gitlab: '#readme'}
9var lineLinks = {github: true, gitlab: true}
10var lineLinks = {github: true, gitlab: true}
11function config(ctx) {
12function config(ctx) {
@@ -17,7 +18,13 @@ function config(ctx) {
20− urlConfig = {prefix: '', headingPrefix: '#', lines: false, hostname: null}
23+ headingPrefix: '#',
22 if (repo) {
29 if (repo) {
23 info = hostedGitInfo.fromUrl(repo)
30 info = hostedGitInfo.fromUrl(repo)
@@ -36,6 +43,10 @@ function config(ctx) {
36 urlConfig.lines = lineLinks[info.type]
43 urlConfig.lines = lineLinks[info.type]
46+ if (info.type in topAnchors) {
47+ urlConfig.topAnchor = topAnchors[info.type]
39 urlConfig.hostname = info.domain
50 urlConfig.hostname = info.domain