├── .gitignore ├── assets ├── styles.css └── styles.scss ├── build.js ├── index.js ├── list.js ├── package.json └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | docs 3 | dist 4 | repos.txt -------------------------------------------------------------------------------- /assets/styles.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700); 2 | @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700); 3 | body #choo-root.minidocs { 4 | font-family: 'Source Sans Pro', 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif; 5 | line-height: 1.5; 6 | color: #293648; } 7 | body #choo-root.minidocs a { 8 | color: #35B44F; } 9 | body #choo-root.minidocs a:hover, 10 | body #choo-root.minidocs a:focus { 11 | color: #24943A; } 12 | body #choo-root.minidocs .link--info { 13 | color: #2980B9; } 14 | body #choo-root.minidocs .link--info:hover, body #choo-root.minidocs .link--info:focus { 15 | color: #1B679A; } 16 | body #choo-root.minidocs .link--warning { 17 | color: #F0C30E; } 18 | body #choo-root.minidocs .link--warning:hover, body #choo-root.minidocs .link--warning:focus { 19 | color: #C9A001; } 20 | body #choo-root.minidocs .link--danger { 21 | color: #D8524E; } 22 | body #choo-root.minidocs .link--danger:hover, body #choo-root.minidocs .link--danger:focus { 23 | color: #B33C38; } 24 | body #choo-root.minidocs a[disabled], 25 | body #choo-root.minidocs .link--disabled { 26 | color: #A7AFB6; } 27 | body #choo-root.minidocs a[disabled]:hover, body #choo-root.minidocs a[disabled]:focus, 28 | body #choo-root.minidocs .link--disabled:hover, 29 | body #choo-root.minidocs .link--disabled:focus { 30 | color: #A7AFB6; } 31 | body #choo-root.minidocs a, 32 | body #choo-root.minidocs button, 33 | body #choo-root.minidocs input, 34 | body #choo-root.minidocs select, 35 | body #choo-root.minidocs textarea { 36 | transition-property: background-color, color; 37 | transition-duration: 0.05s; 38 | transition-timing-function: ease-out; } 39 | body #choo-root.minidocs .minidocs-header { 40 | margin: 0; } 41 | body #choo-root.minidocs .minidocs-logo { 42 | max-height: 100px; 43 | width: inherit; 44 | display: block; } 45 | body #choo-root.minidocs .minidocs-content { 46 | padding-bottom: 50px; 47 | max-width: 48em; } 48 | body #choo-root.minidocs .minidocs-sidebar { 49 | background-color: #E9EBEC; } 50 | body #choo-root.minidocs .minidocs-menu .h1::before { 51 | display: none; } 52 | body #choo-root.minidocs .minidocs-menu .h1, body #choo-root.minidocs .minidocs-menu .h2, body #choo-root.minidocs .minidocs-menu .h3 { 53 | font-weight: 400; } 54 | body #choo-root.minidocs .minidocs-menu .h1, body #choo-root.minidocs .minidocs-menu .h2 { 55 | margin-bottom: 8px; } 56 | body #choo-root.minidocs .minidocs-menu .h2 { 57 | font-size: 1.4em; } 58 | body #choo-root.minidocs .minidocs-menu .content-link { 59 | transition-property: background-color, color, border-color, padding-left; 60 | color: #505F6D; 61 | padding-left: 0; } 62 | body #choo-root.minidocs .minidocs-menu .content-link:hover, body #choo-root.minidocs .minidocs-menu .content-link:focus { 63 | color: #293648; 64 | border-left-color: transparent; 65 | padding-left: .65rem; 66 | background-color: rgba(0, 0, 0, 0.05); } 67 | body #choo-root.minidocs .minidocs-menu .content-link.active { 68 | padding-left: .65rem; 69 | border-left-color: #24943A; 70 | background-color: #FFF; } 71 | 72 | #choo-root.minidocs { 73 | font-family: 'Source Sans Pro', 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif; 74 | line-height: 1.5; 75 | color: #293648; 76 | /* header */ } 77 | #choo-root.minidocs .minidocs-sidebar { 78 | background-color: #E9EBEC; } 79 | #choo-root.minidocs .minidocs-menu .h1::before { 80 | display: none; } 81 | #choo-root.minidocs .minidocs-menu .content-link { 82 | transition-property: background-color, color, border-color, padding-left; 83 | color: #505F6D; } 84 | #choo-root.minidocs .minidocs-menu .content-link:hover, #choo-root.minidocs .minidocs-menu .content-link:focus { 85 | color: #293648; 86 | border-left-color: transparent; 87 | padding-left: .65rem; 88 | background-color: rgba(0, 0, 0, 0.05); } 89 | #choo-root.minidocs .minidocs-menu .content-link.active { 90 | padding-left: .65rem; 91 | border-left-color: #199E33; 92 | background-color: #FFF; } 93 | #choo-root.minidocs .minidocs-header { 94 | background-color: #293648; } 95 | #choo-root.minidocs .minidocs-header-link { 96 | font-size: .875rem; 97 | letter-spacing: 0.05em; 98 | color: #C3C9CD; } 99 | #choo-root.minidocs .minidocs-header-link:hover, #choo-root.minidocs .minidocs-header-link:focus { 100 | color: #FFFFFF; 101 | text-decoration: none; } 102 | #choo-root.minidocs .minidocs-header-logo { 103 | font-size: 1.5rem; 104 | font-weight: 600; 105 | color: #E9EBEC; 106 | letter-spacing: .025em; } 107 | #choo-root.minidocs .minidocs-header-logo img { 108 | transition: transform .5s ease-in-out; } 109 | #choo-root.minidocs .minidocs-header-logo:hover img, #choo-root.minidocs .minidocs-header-logo:focus img { 110 | transform: rotate(360deg); } 111 | -------------------------------------------------------------------------------- /assets/styles.scss: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700); 2 | 3 | // ugly selector needed to overwrite default styles 4 | body #choo-root.minidocs { 5 | @import '~dat-design/scss/variables/colors.scss'; 6 | @import '~dat-design/scss/variables/transitions.scss'; 7 | @import '~dat-design/scss/base/links.scss'; 8 | 9 | font-family: 'Source Sans Pro', 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif; 10 | line-height: 1.5; 11 | color: $color-neutral; 12 | 13 | // transitions on interactive elements 14 | a, 15 | button, 16 | input, 17 | select, 18 | textarea { 19 | transition-property: background-color, color; 20 | transition-duration: $transition-duration; 21 | transition-timing-function: $transition-timing-function; 22 | } 23 | 24 | .minidocs-header { 25 | margin: 0; 26 | } 27 | 28 | .minidocs-logo { 29 | max-height: 100px; 30 | width: inherit; 31 | display: block; 32 | } 33 | 34 | .minidocs-content { 35 | padding-bottom: 50px; 36 | max-width: 48em; // sets a max-width to avoid endless lines on wide screens 37 | } 38 | 39 | .minidocs-sidebar { 40 | background-color: $color-neutral--10; 41 | } 42 | 43 | .minidocs-menu { 44 | // overwrite the "#" default style 45 | .h1::before { 46 | display: none; 47 | } 48 | .h1, .h2, .h3 { 49 | font-weight: 400; 50 | } 51 | .h1, .h2 { 52 | margin-bottom: 8px; 53 | } 54 | .h2 { 55 | font-size: 1.4em; 56 | } 57 | .content-link { 58 | transition-property: background-color, color, border-color, padding-left; 59 | color: $color-neutral--80; 60 | padding-left: 0; 61 | &:hover, &:focus { 62 | color: $color-neutral; 63 | border-left-color: transparent; 64 | padding-left: .65rem; 65 | background-color: rgba(0,0,0,.05); 66 | } 67 | &.active { 68 | padding-left: .65rem; 69 | border-left-color: $color-green--hover; 70 | background-color: #FFF; 71 | } 72 | } 73 | } 74 | } 75 | 76 | @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700); 77 | $color-white: #FFFFFF; 78 | $color-black: #293648; 79 | 80 | $color-neutral: #293648; 81 | $color-neutral-90: #394B5B; 82 | $color-neutral-80: #505F6D; 83 | $color-neutral-70: #65737F; 84 | $color-neutral-60: #7C8792; 85 | $color-neutral-50: #919BA4; 86 | $color-neutral-40: #A7AFB6; 87 | $color-neutral-30: #C3C9CD; 88 | $color-neutral-20: #D3D7DB; 89 | $color-neutral-14: #E0E3E5; 90 | $color-neutral-10: #E9EBEC; 91 | $color-neutral-04: #F6F7F8; 92 | 93 | $color-green: #2ACA4B; 94 | $color-green-hover: #199E33; 95 | $color-green-darker: #006607; 96 | $color-green-disabled: #94E4A5; 97 | 98 | $color-blue: #007FFF; 99 | $color-blue-hover: #0066CC; 100 | $color-blue-darker: #003E83; 101 | $color-blue-disabled: #7FBFFF; 102 | 103 | $color-mint: #159F84; 104 | $color-mint-hover: #0B856D; 105 | $color-mint-darker: #045943; 106 | $color-mint-disabled: #8ACFC1; 107 | 108 | $color-yellow: #F2CD02; 109 | $color-yellow-hover: #C4A500; 110 | $color-yellow-darker: #9F7D07; 111 | $color-yellow-disabled: #FBF0B3; 112 | 113 | $color-red: #D8524E; 114 | $color-red-hover: #B33C38; 115 | $color-red-darker: #A52724; 116 | $color-red-disabled: #EBA8A6; 117 | 118 | $color-pink: #F9A5E4; 119 | // ugly selector needed to overwrite default styles 120 | #choo-root.minidocs { 121 | 122 | font-family: 'Source Sans Pro', 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif; 123 | line-height: 1.5; 124 | color: $color-neutral; 125 | 126 | // .minidocs-header { 127 | // margin: 0; 128 | // } 129 | 130 | // .minidocs-logo { 131 | // max-height: 100px; 132 | // width: inherit; 133 | // display: block; 134 | // } 135 | 136 | .minidocs-content { 137 | // padding-bottom: 50px; 138 | // max-width: 48em; // sets a max-width to avoid endless lines on wide screens 139 | } 140 | 141 | .minidocs-sidebar { 142 | background-color: $color-neutral-10; 143 | } 144 | 145 | .minidocs-menu { 146 | // overwrite the "#" default style 147 | .h1::before { 148 | display: none; 149 | } 150 | // .h1, .h2, .h3 { 151 | // font-weight: 400; 152 | // } 153 | // .h1, .h2 { 154 | // margin-bottom: 8px; 155 | // } 156 | // .h2 { 157 | // font-size: 1.4em; 158 | // } 159 | .content-link { 160 | transition-property: background-color, color, border-color, padding-left; 161 | color: $color-neutral-80; 162 | &:hover, &:focus { 163 | color: $color-neutral; 164 | border-left-color: transparent; 165 | padding-left: .65rem; 166 | background-color: rgba(0,0,0,.05); 167 | } 168 | &.active { 169 | padding-left: .65rem; 170 | border-left-color: $color-green-hover; 171 | background-color: #FFF; 172 | } 173 | } 174 | } 175 | 176 | .minidocs-header { 177 | background-color: $color-neutral; 178 | } 179 | 180 | /* header */ 181 | .minidocs-header-link { 182 | font-size: .875rem; 183 | letter-spacing: 0.05em; 184 | color: $color-neutral-30; 185 | &:hover, &:focus { 186 | color: $color-white; 187 | text-decoration: none; 188 | } 189 | } 190 | 191 | .minidocs-header-logo { 192 | font-size: 1.5rem; 193 | font-weight: 600; 194 | color: $color-neutral-10; 195 | letter-spacing: .025em; 196 | img { 197 | transition: transform .5s ease-in-out; 198 | } 199 | &:hover, &:focus { 200 | // color: $color-green; 201 | img { 202 | transform: rotate(360deg); 203 | } 204 | } 205 | } 206 | } -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var ndjson = require('ndjson') 3 | 4 | process.stdin.pipe(ndjson.parse()).on('data', function (obj) { 5 | fs.writeFileSync('docs/' + obj.name + '.md', obj.readme) 6 | }) 7 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joehand/minidocs-awesome/7cf390968f25a5e885a1ae2b66bdcbc6f5ce0f9c/index.js -------------------------------------------------------------------------------- /list.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var ndjson = require('ndjson') 3 | var pump = require('pump') 4 | var through = require('through2') 5 | 6 | var toc = { 7 | 'Welcome': {'Awesome Dat': 'awesome-dat.md'} 8 | } 9 | var repoList = ['datproject/awesome-dat'] 10 | 11 | pump(process.stdin, ndjson.parse(), through.obj(function (data, enc, next) { 12 | var matches = data.readme.split(/\n#{2,}(.*)\n/) 13 | if (!matches) return next() 14 | matches.forEach(function (item, i) { 15 | if (i % 2) { 16 | if (i === matches.length) return 17 | var tocRepos = {} 18 | var repos = matches[i+1].match(/github.com\/([a-zA-Z0-9_-]+\/[a-zA-Z0-9_\-\\.]+)/g) 19 | if (!repos) return 20 | 21 | repos = Array.from(new Set(repos)) 22 | repos.forEach(function (repo, i) { 23 | repos[i] = repo.replace('github.com/', '') 24 | tocRepos[repos[i]] = repos[i] + '.md' 25 | }) 26 | repoList = repoList.concat(repos) 27 | toc[item.trim()] = tocRepos 28 | } 29 | }) 30 | next() 31 | }), function (err) { 32 | if (err) throw err 33 | fs.writeFileSync('docs/contents.json', JSON.stringify(toc)) 34 | fs.writeFileSync('repos.txt', repoList.join('\n')) 35 | }) 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "awesome-minidocs", 3 | "version": "1.0.0", 4 | "description": "Automatically make a minidocs site from a awesome-repo. Pretty hacky and very WIP.", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "budo --dir dist --pushstate", 8 | "build:deploy": "npm run build:css && minidocs docs -c docs/contents.json -i awesome-dat -o dist -l ./node_modules/dat-design/public/img/dat-data-logo.svg -t 'Awesome Dat' -s assets/styles.css --full-html", 9 | "build": "npm run build:css && minidocs docs -c docs/contents.json -i awesome-dat -o dist -l ./node_modules/dat-design/public/img/dat-data-logo.svg -t 'Awesome Dat' -s assets/styles.css --pushstate", 10 | "build:css": "node-sass --importer node_modules/node-sass-magic-importer assets/styles.scss assets/styles.css", 11 | "update": "npm run update:list && npm run update:build", 12 | "update:list": "echo datproject/awesome-dat | ecosystem-docs sync && echo datproject/awesome-dat | ecosystem-docs read | node list.js", 13 | "update:build": "cat repos.txt | ecosystem-docs sync && cat repos.txt | ecosystem-docs read | node build.js", 14 | "deploy": "npm run build:deploy && echo awesome.datproject.org > dist/CNAME && gh-pages -d dist", 15 | "test": "standard && tape test/*.js | tap-spec" 16 | }, 17 | "author": "Joe Hand (https://joeahand.com/)", 18 | "license": "MIT", 19 | "dependencies": { 20 | "dat-design": "^1.4.2", 21 | "ecosystem-docs": "^1.1.1", 22 | "gh-pages": "^0.11.0", 23 | "minidocs": "github:datproject/minidocs#dat-tachyons", 24 | "ndjson": "^1.4.3", 25 | "node-sass": "^3.8.0", 26 | "node-sass-magic-importer": "^0.1.4", 27 | "pump": "^1.0.1", 28 | "through2": "^2.0.1" 29 | }, 30 | "devDependencies": { 31 | "budo": "^10.0.4" 32 | }, 33 | "repository": { 34 | "type": "git", 35 | "url": "git+https://github.com/joehand/minidocs-awesome.git" 36 | }, 37 | "bugs": { 38 | "url": "https://github.com/joehand/minidocs-awesome/issues" 39 | }, 40 | "homepage": "https://github.com/joehand/minidocs-awesome#readme" 41 | } 42 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Minidocs Awesome 2 | 3 | Automatically make a minidocs site from a awesome-repo. Pretty hacky and very WIP. 4 | 5 | ## Usage 6 | 7 | Want to try it out? Sure why not. Find all occurrences of `clkao/awesome-dat` and replace it with the github awesome repo of your choice. 8 | 9 | You'll have to replace it in: 10 | 11 | * `package.json`, `update:list` 12 | * `list.js` 13 | 14 | Run it with: `npm run update && npm run build && npm start` and maybe it will work. 15 | --------------------------------------------------------------------------------