From ab3e35520b34ea5e3b9aac083671290c1779d9e6 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Fri, 5 Apr 2019 16:52:13 +0200 Subject: [PATCH] Move gh-pages related stuff --- CNAME | 1 - _config.yml | 15 -------- _layouts/default.html | 86 ------------------------------------------- updateReadme.ts | 64 -------------------------------- 4 files changed, 166 deletions(-) delete mode 100644 CNAME delete mode 100644 _config.yml delete mode 100644 _layouts/default.html delete mode 100644 updateReadme.ts diff --git a/CNAME b/CNAME deleted file mode 100644 index 7c30f0e..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -mqtt-explorer.com \ No newline at end of file diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 718f9a5..0000000 --- a/_config.yml +++ /dev/null @@ -1,15 +0,0 @@ -theme: jekyll-theme-architect -title: MQTT Explorer -description: A all-round MQTT client that provides a structured topic overview -author: - name: Thomas Nordquist - picture: https://avatars1.githubusercontent.com/u/7721625?s=460&v=4 -github_username: thomasnordquist -logo: https://user-images.githubusercontent.com/7721625/52227945-5280b580-28b1-11e9-804c-75a842537393.png -plugins: - - jekyll-seo-tag -google_analytics: UA-133696837-1 - -markdown: kramdown -kramdown: - parse_block_html: true diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 84a4915..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - {% seo %} - - - -
-
- -

- - {{ site.title | default: site.github.repository_name }} -

-
-

{{ site.description | default: site.github.project_tagline }}

- {% if site.github.is_project_page %} - View project on GitHub - {% endif %} - {% if site.github.is_user_page %} - Follow me on GitHub - {% endif %} -
-
- -
-
-
- {{ content }} -
- - -
-
- - {% if site.google_analytics %} - - {% endif %} - - diff --git a/updateReadme.ts b/updateReadme.ts deleted file mode 100644 index 04e6de1..0000000 --- a/updateReadme.ts +++ /dev/null @@ -1,64 +0,0 @@ -import * as mustache from 'mustache' - -import { readFileSync, writeFileSync } from 'fs' - -import axios from 'axios' - -interface Release { - name: string - assets: Asset[] -} - -interface Asset { - name: string - browser_download_url: string -} - -function createUrl(title: string, path: string) { - return `[${title}](${path})` -} - -function fileExtension(file: string): string { - const match = file.match(/\.([a-zA-Z]+)$/) - - return (match && match[1]) || '' -} - -async function createReadme(): Promise { - const release: Release = (await axios.get('https://api.github.com/repos/thomasnordquist/mqtt-explorer/releases/latest')).data - - const linux64 = release.assets.filter(asset => /(x86_64|amd64)\.(AppImage|deb|rpm)$/.test(asset.name)) - const windowsInstaller = release.assets.find(asset => /Setup-.+\.exe$/.test(asset.name)) - const windowsPortable = release.assets.find(asset => /-(?!Setup).+\.exe$/.test(asset.name)) - const macDmg = release.assets.find(asset => /\.dmg$/.test(asset.name)) - - if (linux64.length === 0 || !windowsInstaller || !windowsPortable || !macDmg) { - console.error('failed retrieving') - process.exit(1) - return - } - - const linuxTargets = linux64 - .map(item => createUrl(fileExtension(item.browser_download_url), item.browser_download_url)) - .join(', ') - - const windowsTargets = [ - createUrl('portable', windowsPortable.browser_download_url), - createUrl('installer', windowsInstaller.browser_download_url), - ].join(', ') - - const macTargets = [ - createUrl('dmg', macDmg.browser_download_url), - ].join(', ') - - const template = readFileSync('./Readme.tpl.md').toString() - const rendered = mustache.render(template, { - linuxTargets, - windowsTargets, - macTargets, - version: release.name, - }) - writeFileSync('./Readme.md', rendered) -} - -createReadme()