diff --git a/build.js b/build.js index 98575d3..27ce77a 100644 --- a/build.js +++ b/build.js @@ -49,17 +49,16 @@ const includeReadme = ({ const $ = cheerio.load(indexTemplate); $('#md').append(converter.makeHtml(markdown)); $('a').each((i, elem) => { - // console.log(elem); $(elem).attr( 'id', - `${camelCase( + camelCase( $(elem) .attr('href') .replace(/\/|\.|:|#/g, ''), { pascalCase: true, }, - )}-${i}`, + ), ); }); console.log('Writing index.html'); diff --git a/package.json b/package.json index 412e9c5..fda5870 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "> A curated list of Docker resources and projects Inspired by [@sindresorhus](https://github.com/sindresorhus)' [awesome][sindresorhus] and improved by these **[amazing contributors](https://github.com/veggiemonk/awesome-docker/graphs/contributors)**.", "main": "index.js", "scripts": { - "build": "rimraf ./dist/ && node build.js && rimraf ./website/index.html", + "build": "rimraf ./dist/ && node build.js", "convert": "showdown makehtml -i README.md -o README.html --omitExtraWLInCodeBlocks --simplifiedAutoLink --excludeTrailingPunctuationFromURLs --literalMidWordUnderscores --strikethrough --tables --tablesHeaderId --ghCodeBlocks --tasklists --disableForced4SpacesIndentedSublists --simpleLineBreaks --requireSpaceBeforeHeadingText --ghCompatibleHeaderId --ghMentions --backslashEscapesHTMLTags --emoji --splitAdjacentBlockquotes", "package": "parcel build index.html --public-url /awesome-docker" }, diff --git a/website/index.tmpl.html b/website/index.tmpl.html index dba414d..776158f 100644 --- a/website/index.tmpl.html +++ b/website/index.tmpl.html @@ -7,12 +7,11 @@