From c3060075949a5510a514ef3dd8f7dd03e987b53d Mon Sep 17 00:00:00 2001 From: Julien Bisconti Date: Fri, 8 Jun 2018 19:38:46 +0200 Subject: [PATCH] Remove ids from links --- build.js | 18 ++---------------- package.json | 5 ++--- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/build.js b/build.js index 27ce77a..2e901b1 100644 --- a/build.js +++ b/build.js @@ -2,7 +2,6 @@ const fs = require('fs'); const showdown = require('showdown'); const cheerio = require('cheerio'); const Parcel = require('parcel-bundler'); -const camelCase = require('camelcase'); process.env.NODE_ENV = 'production'; @@ -19,7 +18,7 @@ const includeReadme = ({ md = readme, templateHTML = template, dest = merged, -}) => { +} = {}) => { const converter = new showdown.Converter({ omitExtraWLInCodeBlocks: true, simplifiedAutoLink: true, @@ -48,19 +47,6 @@ const includeReadme = ({ console.log('Merging files...'); const $ = cheerio.load(indexTemplate); $('#md').append(converter.makeHtml(markdown)); - $('a').each((i, elem) => { - $(elem).attr( - 'id', - camelCase( - $(elem) - .attr('href') - .replace(/\/|\.|:|#/g, ''), - { - pascalCase: true, - }, - ), - ); - }); console.log('Writing index.html'); fs.writeFileSync(dest, $.html(), 'utf8'); console.log('DONE 👍'); @@ -82,7 +68,7 @@ const bundle = (dest = destination) => { }; const main = () => { - includeReadme({}); + includeReadme(); bundle(); }; diff --git a/package.json b/package.json index cdd3ba7..2611e52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "awesome-docker-website", "version": "1.0.0", - "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)**.", + "description": "A curated list of Docker resources and projects Inspired by @sindresorhus and improved by amazing contributors", "main": "index.js", "scripts": { "build": "rimraf ./dist/ && node build.js", @@ -16,13 +16,12 @@ "url": "git+https://github.com/veggiemonk/awesome-docker.git" }, "author": "Julien Bisconti ", - "license": "MIT", + "license": "Apache-2.0", "bugs": { "url": "https://github.com/veggiemonk/awesome-docker/issues" }, "homepage": "https://github.com/veggiemonk/awesome-docker#readme", "dependencies": { - "camelcase": "^5.0.0", "cheerio": "^1.0.0-rc.2", "critical": "^1.3.2", "dayjs": "^1.6.4",