Closed Dhananjay-JSR closed 2 years ago
hey, thanks for looking into this, a couple minor changes I'd like to see before merging:
styleString
variable and instead just write the style info inline in the <head><style>
const text = `
# Pelias API
### Version: [${peliasConfig.version}](https://github.com/pelias/api/releases)
${fs.readFileSync( markdownFile, 'utf8'}`
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Pelias Geocoder</title>
<style>html { font-family:monospace; }</style>
</head>
<body>
${markdown.toHTML(text)}
</body>
</html>`
can you also please remove the content negotiation code, we don't need that and AFAIK it doesn't even work 🤷♂️
the controller can be simplified to:
function controller(req, res) {
res.send(html);
}
Made the changes as stated can you please check the PR once again
I've pulled your commits into https://github.com/pelias/api/pull/1599 and merged, you may now close this PR/branch.
Thank you 🙇
:wave: I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.
Here's the reason for this change :rocket:
Here's what actually got changed
Added HTML and BODY tag in file