Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(docs): fix docs url path
  • Loading branch information
claudiahdz committed Oct 31, 2019
commit bae18601faa9d3572b11a12d6723c33f5be8c443
2 changes: 1 addition & 1 deletion docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
resolve: 'gatsby-source-filesystem',
options: {
name: 'src',
path: `${__dirname}/src/`,
path: `${__dirname}/content/`,
},
},
'gatsby-transformer-sharp',
Expand Down
13 changes: 5 additions & 8 deletions lib/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,21 @@ function viewMan (man, cb) {

function htmlMan (man) {
var sect = +man.match(/([0-9]+)$/)[1]
var f = path.basename(man).replace(/([0-9]+)$/, 'html')
var f = path.basename(man).replace(/[.]([0-9]+)$/, '')
switch (sect) {
case 1:
sect = 'cli'
break
case 3:
sect = 'api'
sect = 'cli-commands'
break
case 5:
sect = 'files'
sect = 'configuring-npm'
break
case 7:
sect = 'misc'
sect = 'using-npm'
break
default:
throw new Error('invalid man section: ' + sect)
}
return path.resolve(__dirname, '..', 'html', 'doc', sect, f)
return path.resolve(__dirname, '..', 'docs', 'public', sect, f, 'index.html')
}

function npmUsage (valid, cb) {
Expand Down