├── .bowerrc ├── .gitignore ├── .travis.yml ├── CNAME ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── _articles ├── best-practices.md ├── building-community.md ├── code-of-conduct.md ├── finding-users.md ├── getting-paid.md ├── how-to-contribute.md ├── leadership-and-governance.md ├── legal.md ├── metrics.md └── starting-a-project.md ├── _config.yml ├── _data └── fields.yml ├── _includes ├── footer.html ├── head.html └── search-result.html ├── _layouts ├── article-alt.html ├── article.html ├── default.html └── landing.html ├── assets ├── css │ ├── anchor.scss │ ├── covers.scss │ ├── custom.scss │ ├── index.scss │ └── toc.scss └── images │ ├── best-practices │ └── celery.png │ ├── building-community │ ├── contributor_funnel_mikemcquaid.png │ ├── cookiecutter_submit_pr.png │ ├── django_new_contributors.png │ └── middleman_pr.png │ ├── cards │ ├── beginner.png │ ├── best-practices.png │ ├── building.png │ ├── coc.png │ ├── contribute.png │ ├── default.png │ ├── finding.png │ ├── getting-paid.png │ ├── leadership.png │ ├── legal.png │ └── metrics.png │ ├── finding-users │ ├── cartography.jpg │ ├── lena.jpg │ ├── public_speaking.jpg │ └── vagrant_homepage.png │ ├── illos │ ├── beginners.svg │ ├── best-practices.svg │ ├── bird.svg │ ├── building.svg │ ├── coc.svg │ ├── contribute.svg │ ├── finding.svg │ ├── getting-paid.svg │ ├── leadership.svg │ ├── legal.svg │ ├── metrics.svg │ ├── squirrel.png │ └── squirrel.svg │ ├── legal │ └── repo-create-name.png │ ├── metrics │ ├── clone_graph.png │ ├── repo_contributors_specific_graph.png │ └── repo_traffic_graphs_tooltip.png │ └── starting-a-project │ ├── Contributing-guidelines.jpg │ └── repository-license-picker.png ├── bower.json ├── docs ├── content-model.md ├── personas.md ├── roadmap.md └── styleguide.md ├── favicon.ico ├── index.html ├── js ├── lunr.min.js ├── script.js ├── search.js ├── search_worker.js └── vendor │ └── anchor-js │ ├── .bower.json │ ├── README.md │ ├── anchor.js │ ├── anchor.min.js │ └── bower.json ├── node_modules ├── primer-alerts │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── flash.scss │ └── package.json ├── primer-avatars │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── avatar-parent-child.scss │ │ ├── avatar-stack.scss │ │ ├── avatar.scss │ │ └── circle-badge.scss │ └── package.json ├── primer-base │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── base.scss │ │ ├── normalize.scss │ │ └── typography-base.scss │ └── package.json ├── primer-blankslate │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── blankslate.scss │ └── package.json ├── primer-box │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── box.scss │ └── package.json ├── primer-breadcrumb │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── breadcrumb.scss │ └── package.json ├── primer-buttons │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── button-group.scss │ │ └── button.scss │ └── package.json ├── primer-cards │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── cards.scss │ └── package.json ├── primer-core │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ └── package.json ├── primer-css │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ └── package.json ├── primer-forms │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── form-control.scss │ │ ├── form-group.scss │ │ ├── form-select.scss │ │ └── form-validation.scss │ └── package.json ├── primer-layout │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── columns.scss │ │ ├── container.scss │ │ ├── grid-offset.scss │ │ └── grid.scss │ └── package.json ├── primer-markdown │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── blob-csv.scss │ │ ├── code.scss │ │ ├── headings.scss │ │ ├── images.scss │ │ ├── lists.scss │ │ ├── markdown-body.scss │ │ └── tables.scss │ └── package.json ├── primer-marketing-support │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.scss │ ├── lib │ │ ├── fonts.scss │ │ └── variables.scss │ └── package.json ├── primer-marketing-type │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ └── build.css │ ├── index.scss │ ├── lib │ │ └── typography.scss │ └── package.json ├── primer-marketing │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ └── package.json ├── primer-navigation │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ ├── counter.scss │ │ ├── filter-list.scss │ │ ├── menu.scss │ │ ├── subnav.scss │ │ └── tabnav.scss │ └── package.json ├── primer-page-headers │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── headers.scss │ └── package.json ├── primer-page-sections │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── page-section.scss │ └── package.json ├── primer-product │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ └── package.json ├── primer-states │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── states.scss │ └── package.json ├── primer-support │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── index.scss │ ├── lib │ │ ├── mixins │ │ │ ├── buttons.scss │ │ │ ├── layout.scss │ │ │ ├── misc.scss │ │ │ └── typography.scss │ │ └── variables.scss │ └── package.json ├── primer-table-object │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── table-object.scss │ └── package.json ├── primer-tables │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── tables.scss │ └── package.json ├── primer-tooltips │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── tooltips.scss │ └── package.json ├── primer-truncate │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ │ ├── build.css │ │ └── index.js │ ├── index.scss │ ├── lib │ │ └── truncate.scss │ └── package.json └── primer-utilities │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── build │ ├── build.css │ └── index.js │ ├── index.scss │ ├── lib │ ├── animations.scss │ ├── borders.scss │ ├── box-shadow.scss │ ├── colors.scss │ ├── flexbox.scss │ ├── layout.scss │ ├── margin.scss │ ├── padding.scss │ ├── typography.scss │ └── visibility-display.scss │ └── package.json ├── notices.md ├── package.json ├── script ├── bootstrap ├── build ├── html-proofer ├── server ├── test └── test-prose ├── search.html └── test ├── _config.yml ├── helper.rb └── lint_test.rb /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "js/vendor" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | .bundle 3 | .DS_Store 4 | .jekyll-metadata 5 | .sass-cache/ 6 | bin 7 | node_modules 8 | /vendor 9 | Gemfile.lock 10 | 11 | css/main.scss 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - 6 5 | before_install: 6 | - rvm install 2.3.3 7 | install: 8 | - npm install 9 | - bundle install 10 | script: script/test 11 | notifications: 12 | email: false 13 | env: 14 | global: 15 | - NOKOGIRI_USE_SYSTEM_LIBRARIES=true 16 | cache: 17 | bundler: true 18 | directories: 19 | - node_modules 20 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | opensource.guide 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | require 'json' 4 | require 'open-uri' 5 | versions = JSON.parse(open('https://pages.github.com/versions.json').read) 6 | 7 | gem 'github-pages', versions['github-pages'] 8 | 9 | gem 'jekyll-octicons' 10 | gem 'jekyll-seo-tag' 11 | 12 | group :test do 13 | gem 'rake' 14 | gem 'html-proofer' 15 | end 16 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "rake/testtask" 2 | Rake::TestTask.new do |t| 3 | t.libs << "test" 4 | t.test_files = FileList["test/*_test.rb"] 5 | t.warning = false 6 | t.verbose = false 7 | end 8 | 9 | task :default => :test 10 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: "Open Source Guide" 2 | description: "A community guide for open source creators." 3 | 4 | exclude: 5 | - bin 6 | - CODE_OF_CONDUCT.md 7 | - CONTRIBUTING.md 8 | - docs 9 | - Gemfile* 10 | - node_modules 11 | - package.json 12 | - Rakefile 13 | - README.md 14 | - script 15 | - test 16 | - vendor 17 | - node_modules 18 | 19 | permalink: /:path/ 20 | 21 | collections: 22 | articles: 23 | output: true 24 | permalink: /:path/ 25 | 26 | defaults: 27 | - scope: 28 | path: "" 29 | values: 30 | image: /assets/images/cards/default.png 31 | - scope: 32 | path: "" 33 | type: articles 34 | values: 35 | layout: article 36 | 37 | gems: 38 | - jekyll-mentions 39 | - jekyll-octicons 40 | - jekyll-seo-tag 41 | - jekyll-sitemap 42 | 43 | markdown: kramdown 44 | 45 | sass: 46 | style: :compressed 47 | sass_dir: assets/css/ 48 | load_paths: 49 | - node_modules 50 | - node_modules/**/*/node_modules 51 | 52 | branch: gh-pages 53 | 54 | github: 55 | repository_nwo: github/open-source-guide 56 | 57 | twitter: 58 | username: github 59 | 60 | facebook: 61 | publisher: https://www.facebook.com/GitHub/ 62 | -------------------------------------------------------------------------------- /_data/fields.yml: -------------------------------------------------------------------------------- 1 | # Each piece of content has YAML front matter with these properties: 2 | 3 | layout: 4 | type: String 5 | 6 | title: 7 | type: String 8 | required: true 9 | 10 | contents: 11 | type: Array 12 | 13 | description: 14 | type: String 15 | 16 | class: 17 | type: String 18 | 19 | toc: 20 | type: Hash 21 | 22 | order: 23 | type: Integer 24 | 25 | image: {} 26 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 19 | {% seo %} 20 | 21 | -------------------------------------------------------------------------------- /_includes/search-result.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | 4 | {{ include.article.title }} 5 | 6 |

7 | {{ include.article.excerpt }} 8 |
9 | -------------------------------------------------------------------------------- /_layouts/article-alt.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 24 | 25 |
26 |
27 |

{{ page.title }}

28 |

{{ page.description }}

29 |
30 |
31 | 32 |
33 |
34 | {{ content }} 35 |
36 |
37 | 38 | {% include footer.html %} 39 | -------------------------------------------------------------------------------- /_layouts/article.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 24 | 25 |
26 |
27 | 28 |

{{ page.title }}

29 |

{{ page.description }}

30 | 44 |
45 | {{ page.title }} Illustration 46 |
47 |
48 |
49 | 50 |
51 |
52 | {{ content }} 53 |
54 |
55 | 56 | {% include footer.html %} 57 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 |
6 |
7 | {{ content }} 8 |
9 |
10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /_layouts/landing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 |
6 | {{ content }} 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /assets/css/anchor.scss: -------------------------------------------------------------------------------- 1 | .anchorjs-link { 2 | transition: all .25s linear; 3 | color: $gray-light; 4 | 5 | &:hover { 6 | color: $gray; 7 | text-decoration: none; 8 | } 9 | } 10 | 11 | *:hover > .anchorjs-link { 12 | margin-left: -1.125em !important; 13 | } 14 | -------------------------------------------------------------------------------- /assets/css/index.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "primer-core/index.scss"; 5 | @import "primer-marketing/index.scss"; 6 | @import "toc.scss"; 7 | @import "custom.scss"; 8 | @import "covers.scss"; 9 | @import "anchor.scss"; 10 | -------------------------------------------------------------------------------- /assets/css/toc.scss: -------------------------------------------------------------------------------- 1 | .toc .card { 2 | @include breakpoint(md) { 3 | position: absolute; 4 | left: 0; 5 | right: 0; 6 | max-width: 350px; 7 | } 8 | } 9 | 10 | .toc-trigger { 11 | &:hover { 12 | text-decoration: none; 13 | cursor: pointer; 14 | } 15 | } 16 | 17 | .icon-flip { 18 | transition: all 0.5s ease-in-out; 19 | } 20 | 21 | .toc-open .icon-flip { 22 | transform: rotate(180deg); 23 | } 24 | 25 | .toc-list { 26 | display: none; 27 | transition: all 0.5s ease-in-out; 28 | 29 | &.is-shown { 30 | display: block; 31 | } 32 | 33 | ul { 34 | border-bottom: $border; 35 | margin-bottom: $spacer-2; 36 | } 37 | 38 | a { 39 | &:hover { 40 | color: #333; 41 | border-left: 3px solid $blue; 42 | text-decoration: none; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /assets/images/best-practices/celery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/best-practices/celery.png -------------------------------------------------------------------------------- /assets/images/building-community/contributor_funnel_mikemcquaid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/building-community/contributor_funnel_mikemcquaid.png -------------------------------------------------------------------------------- /assets/images/building-community/cookiecutter_submit_pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/building-community/cookiecutter_submit_pr.png -------------------------------------------------------------------------------- /assets/images/building-community/django_new_contributors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/building-community/django_new_contributors.png -------------------------------------------------------------------------------- /assets/images/building-community/middleman_pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/building-community/middleman_pr.png -------------------------------------------------------------------------------- /assets/images/cards/beginner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/beginner.png -------------------------------------------------------------------------------- /assets/images/cards/best-practices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/best-practices.png -------------------------------------------------------------------------------- /assets/images/cards/building.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/building.png -------------------------------------------------------------------------------- /assets/images/cards/coc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/coc.png -------------------------------------------------------------------------------- /assets/images/cards/contribute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/contribute.png -------------------------------------------------------------------------------- /assets/images/cards/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/default.png -------------------------------------------------------------------------------- /assets/images/cards/finding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/finding.png -------------------------------------------------------------------------------- /assets/images/cards/getting-paid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/getting-paid.png -------------------------------------------------------------------------------- /assets/images/cards/leadership.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/leadership.png -------------------------------------------------------------------------------- /assets/images/cards/legal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/legal.png -------------------------------------------------------------------------------- /assets/images/cards/metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/cards/metrics.png -------------------------------------------------------------------------------- /assets/images/finding-users/cartography.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/finding-users/cartography.jpg -------------------------------------------------------------------------------- /assets/images/finding-users/lena.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/finding-users/lena.jpg -------------------------------------------------------------------------------- /assets/images/finding-users/public_speaking.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/finding-users/public_speaking.jpg -------------------------------------------------------------------------------- /assets/images/finding-users/vagrant_homepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/finding-users/vagrant_homepage.png -------------------------------------------------------------------------------- /assets/images/illos/bird.svg: -------------------------------------------------------------------------------- 1 | bird -------------------------------------------------------------------------------- /assets/images/illos/squirrel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/illos/squirrel.png -------------------------------------------------------------------------------- /assets/images/legal/repo-create-name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/legal/repo-create-name.png -------------------------------------------------------------------------------- /assets/images/metrics/clone_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/metrics/clone_graph.png -------------------------------------------------------------------------------- /assets/images/metrics/repo_contributors_specific_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/metrics/repo_contributors_specific_graph.png -------------------------------------------------------------------------------- /assets/images/metrics/repo_traffic_graphs_tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/metrics/repo_traffic_graphs_tooltip.png -------------------------------------------------------------------------------- /assets/images/starting-a-project/Contributing-guidelines.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/starting-a-project/Contributing-guidelines.jpg -------------------------------------------------------------------------------- /assets/images/starting-a-project/repository-license-picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/assets/images/starting-a-project/repository-license-picker.png -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "open-source-guide", 3 | "description": "This guide is a collection of resources to help individuals, communities, and companies sustainably embrace open source software. It explains not only how to accomplish a task, but why you'd want to, and how that task fits into the larger story of consuming, contributing to, and producing open source software.", 4 | "main": "script/server", 5 | "authors": [ 6 | "GitHub", 7 | "Inc. " 8 | ], 9 | "license": "CC-BY", 10 | "homepage": "https://github.com/github/open-source-guide", 11 | "dependencies": { 12 | "anchor-js": "^3.2.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docs/roadmap.md: -------------------------------------------------------------------------------- 1 | # Roadmap 2 | 3 | Our vision for Open Source Guides is to provide a jumping off point for individuals, communities, and companies to sustainably embrace open source. 4 | 5 | ### H1 2017 6 | 7 | We started by focusing on open source creators, because they play a critical role in growing healthy projects. Creators help set good examples for contributors and consumers of open source. We also noticed there were very few comprehensive resources aimed at helping creators. 8 | 9 | * [x] Create a first set of guides that help creators start and grow their own open source project 10 | * [x] Make the guides public and release it as an open source project 11 | * [x] Expand [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/) to include community best practices for contributors, and move it to Open Source Guides 12 | * [ ] Foster healthy community dynamics so the guides become a place to codify community best practices 13 | 14 | ### H2 2017 15 | 16 | We'll improve upon existing content and start to focus on additional content for open source consumers and contributors. 17 | 18 | * [ ] Continue to improve the content for open source creators 19 | * [ ] Improve guide discoverability for open source creators 20 | * [ ] Expand the Open Source Guides to include content for open source consumers 21 | 22 | ### Beyond 23 | 24 | Open source is complicated, especially for newcomers. Experienced contributors have learned many lessons about the best way to use, contribute to, and produce open source software. Everyone shouldn't have to learn those lessons the hard way. To give it more prominence, we want to move it from https://opensource.guide to a permanent home on https://github.com/open-source, where it will live alongside features and programs that help individuals, communities, and companies sustainably embrace open source. The content will remain open source for anyone to use. 25 | 26 | This is our current plan. As with everything in the Open Source Guides project, it is open to community feedback. 27 | -------------------------------------------------------------------------------- /docs/styleguide.md: -------------------------------------------------------------------------------- 1 | # Style Guide 2 | 3 | From the GitHub Manual of Style, which this style guide inherits from: 4 | 5 | > Words are an important part of how software works. Just as we have a style guide for our code, we have a style guide for our tone and our voice. Even though there may be dozens of people creating a product, it should still sound like we speak in one consistent voice. 6 | > 7 | > In other words, the way we write is just as important as the way we design. Consider these things when writing copy. 8 | 9 | Where possible, [automated tests](../test/test-prose) enforce style rules. 10 | 11 | ## Content Principles 12 | All written content should follow these principles: 13 | 14 | * **Approachability:** Don't assume reader has prior knowledge 15 | * **Brevity:** Keep it simple, link to outside content for deeper dives 16 | * **Curation:** Amplify community best practices vs. any individual's point of view 17 | 18 | Content should maintain a light-hearted, but wise (think classy, not overly excited) tone. Open source is fun! Readers should inspired, not discouraged, by the tone of your writing, and they should trust you to help them get started. 19 | 20 | ## Mentions 21 | 22 | When referring to people that use GitHub, use @mentions of their username instead of their full name. 23 | 24 | - :smile: As @jessfraz put it... 25 | - :cry: As [Jess Frazelle](https://github.com/jessfraz) put it... 26 | 27 | When referring to a project on GitHub, link to the repository so others can dive deeper, if they choose. 28 | 29 | - :smile: @maxogden took a similar approach to [Dat](https://github.com/datproject/dat)... 30 | - :cry: @maxogden took a similar approach to Dat... 31 | 32 | ## Capitalization 33 | 34 | "Guides" is capitalized when referring to the "Open Source Guides", but not when saying "the guide" or "this guide". 35 | 36 | - :smile: Welcome to Open Source Guides! 37 | - :smile: The guide is meant to.. 38 | - :cry: The goal of this Guide is to... 39 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidpgero/open-source-guide/90780f07bb4f18c86ccbf9428687de3097add093/favicon.ico -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: landing 3 | --- 4 | 5 | 19 | 20 |
21 | 22 |
23 |
24 |

Open Source Guides

25 |

26 | Open source software is made by people just like you. Learn how to launch and grow your project. 27 |

28 |
29 |
30 | 31 |
32 |
33 | {% assign articles = site.articles | sort: 'order' %} 34 | {% for article in articles %} 35 | 53 | {% endfor %} 54 |
55 |
56 | 57 |
58 | 59 | {% include footer.html %} 60 | -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | // Toggle Nav on Click 3 | $('.toc-trigger').click(function() { 4 | // Calling a function in case you want to expand upon this. 5 | $(this).toggleClass('toc-open'); 6 | $('.toc-list').toggleClass('is-shown'); 7 | }); 8 | }); 9 | 10 | //$(function() { 11 | // $('a[href*="#"]:not([href="#"])').click(function() { 12 | // if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { 13 | // var target = $(this.hash); 14 | // target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); 15 | // if (target.length) { 16 | // $('html, body').animate({ 17 | // scrollTop: target.offset().top 18 | // }, 1000); 19 | // return false; 20 | // } 21 | // } 22 | // }); 23 | //}); 24 | -------------------------------------------------------------------------------- /js/search_worker.js: -------------------------------------------------------------------------------- 1 | --- 2 | layout: 3 | --- 4 | // http://jekyll.tips/jekyll-casts/jekyll-search-using-lunr-js/ 5 | 6 | importScripts("{{ "/js/lunr.min.js" | prepend: site.baseurl }}"); 7 | 8 | var store = { 9 | {% for article in site.articles %} 10 | {% capture html %}{% include search-result.html article=article %}{% endcapture %} 11 | "{{ article.url | xml_escape }}": { 12 | "title": "{{ article.title | xml_escape }}", 13 | "content": {{ article.content | markdownify | strip_html | strip_newlines | jsonify }}, 14 | "url": "{{ article.url | xml_escape }}", 15 | "html": {{ html | jsonify }} 16 | }{% unless forloop.last %},{% endunless %} 17 | {% endfor %} 18 | }; 19 | 20 | // Initalize lunr 21 | var idx = lunr(function () { 22 | this.ref('url'); 23 | this.field('title', { boost: 10 }); 24 | this.field('content'); 25 | }); 26 | 27 | // Add content to index 28 | for(var id in store) { 29 | idx.add(store[id]); 30 | } 31 | 32 | onmessage = function (e) { 33 | var results = idx.search(e.data).map(function(result) { 34 | return store[result.ref].html; 35 | }); 36 | postMessage(results); 37 | } 38 | -------------------------------------------------------------------------------- /js/vendor/anchor-js/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "anchor-js", 3 | "version": "3.2.1", 4 | "authors": [ 5 | "Bryan Braun" 6 | ], 7 | "description": "A Javascript utility for adding deep anchor links to online docs.", 8 | "main": "anchor.js", 9 | "license": "MIT", 10 | "homepage": "https://github.com/bryanbraun/anchorjs", 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests", 17 | "package.json" 18 | ], 19 | "_release": "3.2.1", 20 | "_resolution": { 21 | "type": "version", 22 | "tag": "3.2.1", 23 | "commit": "688c1be39ad11a5f41421644d721ffabad6bbf63" 24 | }, 25 | "_source": "https://github.com/bryanbraun/anchorjs.git", 26 | "_target": "^3.2.1", 27 | "_originalSource": "anchor-js", 28 | "_direct": true 29 | } -------------------------------------------------------------------------------- /js/vendor/anchor-js/README.md: -------------------------------------------------------------------------------- 1 | # AnchorJS [![Build Status](https://img.shields.io/travis/bryanbraun/anchorjs/master.svg?style=flat)](https://travis-ci.org/bryanbraun/anchorjs) 2 | 3 | A JavaScript utility for adding deep anchor links ([like these](http://ux.stackexchange.com/q/36304/33248)) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies. 4 | 5 | **[See Live Examples in the Documentation](http://bryanbraun.github.io/anchorjs#examples).** 6 | 7 | ![Anchoring links](http://bryanbraun.com/sites/default/files/anchoring-links_0.png) 8 | 9 | ## Installation 10 | 11 | Download AnchorJS using npm, 12 | 13 | ```bash 14 | npm install anchor-js 15 | ``` 16 | 17 | or bower: 18 | 19 | ```bash 20 | bower install anchor-js --save-dev 21 | ``` 22 | 23 | (or just [download it from github](https://github.com/bryanbraun/anchorjs/releases)). 24 | 25 | Then include the anchor.js file (or anchor.min.js) in your webpage. 26 | 27 | ```html 28 | 29 | ``` 30 | 31 | You could also include it via a CDN like [CDNJS](https://cdnjs.com/libraries/anchor-js) or [jsDelivr](http://www.jsdelivr.com/projects/anchorjs). 32 | 33 | ##Usage 34 | See **[the Documentation](http://bryanbraun.github.io/anchorjs#basic-usage)** for detailed instructions. 35 | 36 | ## Compatibility 37 | Currently Supports: IE9+ and modern browsers 38 | 39 | ## Contributing [![devDependency Status](https://img.shields.io/david/dev/bryanbraun/anchorjs.svg?style=flat)](https://david-dm.org/bryanbraun/anchorjs#info=devDependencies) 40 | To contribute: 41 | 42 | 1. Fork/Clone the repo. 43 | 2. Make your changes. 44 | 3. Write tests as needed. 45 | 4. Run tests locally to confirm everything is working: 46 | - Install phantomjs: `brew install phantomjs` 47 | - Install test modules: Run `npm install` 48 | - Run all tests: `npm test` 49 | 5. Minify the code: `npm run release` 50 | 6. Submit a Pull Request. 51 | 52 | ## License 53 | Licensed with the [MIT License](http://opensource.org/licenses/MIT). 54 | -------------------------------------------------------------------------------- /js/vendor/anchor-js/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "anchor-js", 3 | "version": "3.2.1", 4 | "authors": [ 5 | "Bryan Braun" 6 | ], 7 | "description": "A Javascript utility for adding deep anchor links to online docs.", 8 | "main": "anchor.js", 9 | "license": "MIT", 10 | "homepage": "https://github.com/bryanbraun/anchorjs", 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests", 17 | "package.json" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /node_modules/primer-alerts/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/primer-alerts/build/build.css: -------------------------------------------------------------------------------- 1 | .flash{position:relative;padding:16px;color:#246;background-color:#e2eef9;border:1px solid #bac6d3;border-radius:3px}.flash p:last-child{margin-bottom:0}.flash-messages{margin-bottom:24px}.flash-close{float:right;padding:16px;margin:-16px;color:inherit;text-align:center;cursor:pointer;background:none;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.6}.flash-close:hover{opacity:1}.flash-action{float:right;margin-top:-3px;margin-left:24px}.flash-warn{color:#4c4a42;background-color:#fff9ea;border-color:#dfd8c2}.flash-error{color:#911;background-color:#fcdede;border-color:#d2b2b2}.flash-success{color:#22662c;background-color:#e2f9e5;border-color:#bad3be}.flash-full{margin-top:-1px;border-width:1px 0;border-radius:0}.warning{padding:0.5em;margin-bottom:0.8em;font-weight:600;background-color:#fffccc} 2 | -------------------------------------------------------------------------------- /node_modules/primer-alerts/build/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {"cssstats":{"size":837,"gzipSize":394,"humanizedSize":"837B","humanizedGzipSize":"394B","rules":{"total":11,"size":{"graph":[6,1,1,12,1,3,3,3,3,3,4],"max":12,"average":3.6363636363636362}},"selectors":{"total":11,"type":1,"class":11,"id":0,"pseudoClass":2,"pseudoElement":0,"values":[".flash",".flash p:last-child",".flash-messages",".flash-close",".flash-close:hover",".flash-action",".flash-warn",".flash-error",".flash-success",".flash-full",".warning"],"specificity":{"max":21,"average":11.909090909090908}},"declarations":{"total":40,"unique":38,"properties":{"position":["relative"],"padding":["16px","16px","0.5em"],"color":["#246","inherit","#4c4a42","#911","#22662c"],"background-color":["#e2eef9","#fff9ea","#fcdede","#e2f9e5","#fffccc"],"border":["1px solid #bac6d3","0"],"border-radius":["3px","0"],"margin-bottom":["0","24px","0.8em"],"float":["right","right"],"margin":["-16px"],"text-align":["center"],"cursor":["pointer"],"background":["none"],"-webkit-appearance":["none"],"-moz-appearance":["none"],"appearance":["none"],"opacity":["0.6","1"],"margin-top":["-3px","-1px"],"margin-left":["24px"],"border-color":["#dfd8c2","#d2b2b2","#bad3be"],"border-width":["1px 0"],"font-weight":["600"]}},"mediaQueries":{"total":0,"unique":0,"values":[],"contents":[]}}} -------------------------------------------------------------------------------- /node_modules/primer-alerts/index.scss: -------------------------------------------------------------------------------- 1 | // support files 2 | @import "primer-support/index.scss"; 3 | @import "./lib/flash.scss"; 4 | -------------------------------------------------------------------------------- /node_modules/primer-alerts/lib/flash.scss: -------------------------------------------------------------------------------- 1 | // Default flash 2 | // stylelint-disable selector-no-type 3 | .flash { 4 | position: relative; 5 | padding: $spacer-3; 6 | color: $flash-text-blue; 7 | background-color: $flash-bg-blue; 8 | border: 1px solid $flash-border-blue; 9 | border-radius: 3px; 10 | 11 | p:last-child { 12 | margin-bottom: 0; 13 | } 14 | } 15 | 16 | // Contain the flash messages 17 | .flash-messages { 18 | margin-bottom: $spacer-4; 19 | } 20 | 21 | // Close button 22 | .flash-close { 23 | float: right; 24 | padding: $spacer-3; 25 | margin: -$spacer-3; 26 | color: inherit; 27 | text-align: center; 28 | cursor: pointer; 29 | // Undo ` 55 | 56 | 57 | ``` 58 | 59 | 60 | 61 | ## License 62 | 63 | [MIT](./LICENSE) © [GitHub](https://github.com/) 64 | 65 | [primer-css]: https://github.com/primer/primer 66 | [docs]: http://primercss.io/ 67 | [npm]: https://www.npmjs.com/ 68 | [install-npm]: https://docs.npmjs.com/getting-started/installing-node 69 | [sass]: http://sass-lang.com/ 70 | -------------------------------------------------------------------------------- /node_modules/primer-table-object/build/build.css: -------------------------------------------------------------------------------- 1 | .TableObject{display:table}.TableObject-item{display:table-cell;width:1%;white-space:nowrap;vertical-align:middle}.TableObject-item--primary{width:99%} 2 | -------------------------------------------------------------------------------- /node_modules/primer-table-object/build/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {"cssstats":{"size":152,"gzipSize":123,"humanizedSize":"152B","humanizedGzipSize":"123B","rules":{"total":3,"size":{"graph":[1,4,1],"max":4,"average":2}},"selectors":{"total":3,"type":0,"class":3,"id":0,"pseudoClass":0,"pseudoElement":0,"values":[".TableObject",".TableObject-item",".TableObject-item--primary"],"specificity":{"max":10,"average":10}},"declarations":{"total":6,"unique":6,"properties":{"display":["table","table-cell"],"width":["1%","99%"],"white-space":["nowrap"],"vertical-align":["middle"]}},"mediaQueries":{"total":0,"unique":0,"values":[],"contents":[]}}} -------------------------------------------------------------------------------- /node_modules/primer-table-object/index.scss: -------------------------------------------------------------------------------- 1 | @import "./lib/table-object.scss"; 2 | -------------------------------------------------------------------------------- /node_modules/primer-table-object/lib/table-object.scss: -------------------------------------------------------------------------------- 1 | // TableObject is a module for creating dynamically resizable elements that 2 | // always sit on the same horizontal line (e.g., they never wrap). Using 3 | // tables means it's cross browser friendly. 4 | 5 | .TableObject { 6 | display: table; 7 | } 8 | 9 | // Place this on every "cell" 10 | .TableObject-item { 11 | display: table-cell; 12 | width: 1%; 13 | white-space: nowrap; 14 | vertical-align: middle; 15 | } 16 | 17 | // Place this on the largest or most important "cell" 18 | .TableObject-item--primary { 19 | width: 99%; 20 | } 21 | -------------------------------------------------------------------------------- /node_modules/primer-tables/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # v0.1.1 2 | 3 | * bumping the version - Jon Rohan [github/github@4a72b25](https://github.com/github/github/commit/4a72b25) 4 | * Pointing main js file to build - Jon Rohan [github/github@3575651](https://github.com/github/github/commit/3575651) 5 | * don't change the versions yet - Jon Rohan [github/github@6bebcff](https://github.com/github/github/commit/6bebcff) 6 | * Bumping version - Jon Rohan [github/github@df8b91c](https://github.com/github/github/commit/df8b91c) 7 | * Cleaning up devDependencies versions and simplifying npm scripts - Jon Rohan [github/github@2c42571](https://github.com/github/github/commit/2c42571) 8 | * Sorting and table objects. We also don't need homepage - Jon Rohan [github/github@798629d](https://github.com/github/github/commit/798629d) 9 | * Removing duplicate headers - Jon Rohan [github/github@225cee1](https://github.com/github/github/commit/225cee1) 10 | 11 | # v0.1.0 12 | 13 | * Rename repository with prefix primer- - Jon Rohan [github/github@ec8774a](https://github.com/github/github/commit/ec8774a) 14 | * Fix broken paths - Patrick Marsceill [github/github@b5dc395](https://github.com/github/github/commit/b5dc395) 15 | * Update the names in the README files - Patrick Marsceill [github/github@75fed58](https://github.com/github/github/commit/75fed58) 16 | * Update names for npm publising - Patrick Marsceill [github/github@451f97a](https://github.com/github/github/commit/451f97a) 17 | * Fix import path across all scss files - Patrick Marsceill [github/github@a566f31](https://github.com/github/github/commit/a566f31) 18 | * Linting - Patrick Marsceill [github/github@987f2ad](https://github.com/github/github/commit/987f2ad) 19 | * Add type & tables to docs - Sophie Shepherd [github/github@31ff53f](https://github.com/github/github/commit/31ff53f) 20 | * Fix variable collisions and add basecoat to site to test sass compilation errors - Patrick Marsceill [github/github@c73eee3](https://github.com/github/github/commit/c73eee3) 21 | * Remove basecoat - Patrick Marsceill [github/github@1b1503d](https://github.com/github/github/commit/1b1503d) 22 | * prefix bc => marketing - Patrick Marsceill [github/github@04d509a](https://github.com/github/github/commit/04d509a) 23 | * pull in ye olde basecoat files from branch - Patrick Marsceill [github/github@09d47e9](https://github.com/github/github/commit/09d47e9) -------------------------------------------------------------------------------- /node_modules/primer-tables/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/primer-tables/README.md: -------------------------------------------------------------------------------- 1 | # Primer Marketing CSS Tables 2 | 3 | [![NPM version](http://img.shields.io/npm/v/primer-tables.svg)](https://www.npmjs.org/package/primer-tables) 4 | [![Build Status](https://travis-ci.org/primer/primer-tables.svg?branch=master)](https://travis-ci.org/primer/primer-tables) 5 | 6 | > Styles to display tabular data for marketing websites at GitHub. 7 | 8 | This repository is a module of the full [primer-css][primer] repository. 9 | 10 | ## Documentation 11 | 12 | 16 | 17 | Documentation & refactor coming very soon 18 | 19 | 20 | 21 | ## Install 22 | 23 | This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-tables` with this command. 24 | 25 | ``` 26 | $ npm install --save primer-tables 27 | ``` 28 | 29 | ## Usage 30 | 31 | The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this. 32 | 33 | ```scss 34 | @import "primer-tables/index.scss"; 35 | ``` 36 | 37 | You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._ 38 | 39 | ## Build 40 | 41 | For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css` 42 | 43 | ``` 44 | $ npm run build 45 | ``` 46 | 47 | ## License 48 | 49 | MIT © [GitHub](https://github.com/) 50 | 51 | [primer]: https://github.com/primer/primer 52 | [primer-support]: https://github.com/primer/primer-support 53 | [support]: https://github.com/primer/primer-support 54 | [docs]: http://primercss.io/ 55 | [npm]: https://www.npmjs.com/ 56 | [install-npm]: https://docs.npmjs.com/getting-started/installing-node 57 | [sass]: http://sass-lang.com/ 58 | -------------------------------------------------------------------------------- /node_modules/primer-tables/build/build.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Roboto;font-style:normal;font-weight:300;src:local("Roboto Light"),local("Roboto-Light"),url("/static/fonts/roboto/roboto-light.woff") format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("/static/fonts/roboto/roboto-regular.woff") format("woff")}@font-face{font-family:Roboto;font-style:normal;font-weight:500;src:local("Roboto Medium"),local("Roboto-Medium"),url("/static/fonts/roboto/roboto-medium.woff") format("woff")}@font-face{font-family:Roboto;font-style:italic;font-weight:400;src:local("Roboto Italic"),local("Roboto-Italic"),url("/static/fonts/roboto/roboto-italic.woff") format("woff")}.data-table{width:100%;margin-top:16px;border-collapse:collapse;border:1px #e5e5e5 solid;box-shadow:0 1px 1px rgba(0,0,0,0.05)}.data-table th{font-weight:400;text-align:left}.data-table td,.data-table th{padding:16px;border-right:1px #e5e5e5 solid;border-bottom:1px #e5e5e5 solid}.data-table tbody th{width:25%}.data-table tbody th,.data-table tbody td{border-bottom-color:#f5f5f5}.data-table tbody tr:last-child th,.data-table tbody tr:last-child td{border-bottom:1px #e5e5e5 solid} 2 | -------------------------------------------------------------------------------- /node_modules/primer-tables/build/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {"cssstats":{"size":1180,"gzipSize":372,"humanizedSize":"1kB","humanizedGzipSize":"372B","rules":{"total":6,"size":{"graph":[5,2,3,1,1,1],"max":5,"average":2.1666666666666665}},"selectors":{"total":9,"type":8,"class":9,"id":0,"pseudoClass":2,"pseudoElement":0,"values":[".data-table",".data-table th",".data-table td",".data-table th",".data-table tbody th",".data-table tbody th",".data-table tbody td",".data-table tbody tr:last-child th",".data-table tbody tr:last-child td"],"specificity":{"max":23,"average":13.88888888888889}},"declarations":{"total":13,"unique":12,"properties":{"width":["100%","25%"],"margin-top":["16px"],"border-collapse":["collapse"],"border":["1px #e5e5e5 solid"],"box-shadow":["0 1px 1px rgba(0,0,0,0.05)"],"font-weight":["400"],"text-align":["left"],"padding":["16px"],"border-right":["1px #e5e5e5 solid"],"border-bottom":["1px #e5e5e5 solid","1px #e5e5e5 solid"],"border-bottom-color":["#f5f5f5"]}},"mediaQueries":{"total":0,"unique":0,"values":[],"contents":[]}}} -------------------------------------------------------------------------------- /node_modules/primer-tables/index.scss: -------------------------------------------------------------------------------- 1 | // support files 2 | @import "primer-support/index.scss"; 3 | @import "primer-marketing-support/index.scss"; 4 | @import "./lib/tables.scss"; 5 | -------------------------------------------------------------------------------- /node_modules/primer-tables/lib/tables.scss: -------------------------------------------------------------------------------- 1 | // stylelint-disable selector-no-type, selector-max-compound-selectors 2 | 3 | .data-table { 4 | width: 100%; 5 | margin-top: $spacer-3; 6 | border-collapse: collapse; 7 | border: $border; 8 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); 9 | 10 | th { 11 | font-weight: 400; 12 | text-align: left; 13 | } 14 | 15 | td, 16 | th { 17 | padding: $spacer-3; 18 | border-right: $border; 19 | border-bottom: $border; 20 | } 21 | 22 | tbody { 23 | th { 24 | width: 25%; 25 | } 26 | 27 | th, 28 | td { 29 | border-bottom-color: $marketing-gray-light; 30 | } 31 | 32 | tr:last-child { 33 | th, 34 | td { 35 | border-bottom: $border; 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /node_modules/primer-tooltips/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/primer-tooltips/index.scss: -------------------------------------------------------------------------------- 1 | @import "primer-support/index.scss"; 2 | @import "./lib/tooltips.scss"; 3 | -------------------------------------------------------------------------------- /node_modules/primer-truncate/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/primer-truncate/README.md: -------------------------------------------------------------------------------- 1 | # Primer CSS Truncate 2 | 3 | [![NPM version](http://img.shields.io/npm/v/primer-truncate.svg)](https://www.npmjs.org/package/primer-truncate) 4 | [![Build Status](https://travis-ci.org/primer/truncate.svg?branch=master)](https://travis-ci.org/primer/truncate) 5 | 6 | > .css-truncate will shorten text with an ellipsis. The maximum width of the truncated text can be changed by overriding the max-width of the .css-truncate-target. 7 | 8 | This repository is a module of the full [primer-css][primer-css] repository. 9 | 10 | ## Install 11 | 12 | This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-truncate` with this command. 13 | 14 | ``` 15 | $ npm install --save primer-truncate 16 | ``` 17 | 18 | ## Usage 19 | 20 | The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this. 21 | 22 | ```scss 23 | @import "primer-truncate/index.scss"; 24 | ``` 25 | 26 | You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._ 27 | 28 | ## Build 29 | 30 | For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package. 31 | 32 | ``` 33 | $ npm run build 34 | ``` 35 | 36 | ## Documentation 37 | 38 | 42 | 43 | `.css-truncate` will shorten text with an ellipsis. The maximum width of the truncated text can be changed by overriding the max-width of `.css-truncate-target`. Unless the full text is so long that it affects performace, always add `title` to the truncated element so the full text can still be seen. 44 | 45 | ```html 46 | 47 | really-long-branch-name 48 | 49 | ``` 50 | 51 | You can reveal the entire string on hover with the addition of `.expandable`. 52 | 53 | ```html 54 | 57 | ``` 58 | 59 | 60 | ## License 61 | 62 | [MIT](./LICENSE) © [GitHub](https://github.com/) 63 | 64 | [primer-css]: https://github.com/primer/primer 65 | [docs]: http://primercss.io/ 66 | [npm]: https://www.npmjs.com/ 67 | [install-npm]: https://docs.npmjs.com/getting-started/installing-node 68 | [sass]: http://sass-lang.com/ 69 | -------------------------------------------------------------------------------- /node_modules/primer-truncate/build/build.css: -------------------------------------------------------------------------------- 1 | .css-truncate.css-truncate-target,.css-truncate .css-truncate-target{display:inline-block;max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:top}.css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target,.css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target,.css-truncate.expandable:hover .css-truncate-target,.css-truncate.expandable:hover.css-truncate-target{max-width:10000px !important} 2 | -------------------------------------------------------------------------------- /node_modules/primer-truncate/build/index.js: -------------------------------------------------------------------------------- 1 | module.exports = {"cssstats":{"size":453,"gzipSize":196,"humanizedSize":"453B","humanizedGzipSize":"196B","rules":{"total":2,"size":{"graph":[6,1],"max":6,"average":3.5}},"selectors":{"total":6,"type":0,"class":6,"id":0,"pseudoClass":2,"pseudoElement":0,"values":[".css-truncate.css-truncate-target",".css-truncate .css-truncate-target",".css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target",".css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target",".css-truncate.expandable:hover .css-truncate-target",".css-truncate.expandable:hover.css-truncate-target"],"specificity":{"max":40,"average":33.333333333333336}},"declarations":{"total":7,"unique":7,"properties":{"display":["inline-block"],"max-width":["125px","10000px"],"overflow":["hidden"],"text-overflow":["ellipsis"],"white-space":["nowrap"],"vertical-align":["top"]}},"mediaQueries":{"total":0,"unique":0,"values":[],"contents":[]}}} -------------------------------------------------------------------------------- /node_modules/primer-truncate/index.scss: -------------------------------------------------------------------------------- 1 | @import "./lib/truncate.scss"; 2 | -------------------------------------------------------------------------------- /node_modules/primer-truncate/lib/truncate.scss: -------------------------------------------------------------------------------- 1 | // Truncate 2 | // 3 | // css-truncate will shorten text with an ellipsis. 4 | 5 | .css-truncate { 6 | // Truncate double target 7 | // 8 | // css-truncate will shorten text with an ellipsis. The maximum width 9 | // of the truncated text can be changed by overriding the max-width 10 | // of the .css-truncate-target 11 | &.css-truncate-target, 12 | .css-truncate-target { 13 | display: inline-block; 14 | max-width: 125px; 15 | overflow: hidden; 16 | text-overflow: ellipsis; 17 | white-space: nowrap; 18 | vertical-align: top; 19 | } 20 | 21 | &.expandable.zeroclipboard-is-hover .css-truncate-target, 22 | &.expandable.zeroclipboard-is-hover.css-truncate-target, 23 | &.expandable:hover .css-truncate-target, 24 | &.expandable:hover.css-truncate-target { 25 | max-width: 10000px !important; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 GitHub Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/README.md: -------------------------------------------------------------------------------- 1 | # Primer CSS Utilities 2 | 3 | [![NPM version](http://img.shields.io/npm/v/primer-utilities.svg)](https://www.npmjs.org/package/primer-utilities) 4 | [![Build Status](https://travis-ci.org/primer/utilities.svg?branch=master)](https://travis-ci.org/primer/utilities) 5 | 6 | > There are a handful of utilities in Primer for quick behaviors, floats, colors, alignment, and more. 7 | 8 | This repository is a module of the full [primer-css][primer-css] repository. 9 | 10 | ## Install 11 | 12 | This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-utilities` with this command. 13 | 14 | ``` 15 | $ npm install --save primer-utilities 16 | ``` 17 | 18 | ## Usage 19 | 20 | The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this. 21 | 22 | ```scss 23 | @import "primer-utilities/index.scss"; 24 | ``` 25 | 26 | You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._ 27 | 28 | ## Build 29 | 30 | For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package. 31 | 32 | ``` 33 | $ npm run build 34 | ``` 35 | 36 | ## Documentation 37 | 38 | You can read more about utilities in the [docs folder](./docs/). 39 | 40 | ## License 41 | 42 | [MIT](./LICENSE) © [GitHub](https://github.com/) 43 | 44 | [primer-css]: https://github.com/primer/primer 45 | [docs]: http://primercss.io/ 46 | [npm]: https://www.npmjs.com/ 47 | [install-npm]: https://docs.npmjs.com/getting-started/installing-node 48 | [sass]: http://sass-lang.com/ 49 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/index.scss: -------------------------------------------------------------------------------- 1 | @import "primer-support/index.scss"; 2 | // utilities 3 | @import "./lib/animations.scss"; 4 | @import "./lib/borders.scss"; 5 | @import "./lib/box-shadow.scss"; 6 | @import "./lib/colors.scss"; 7 | @import "./lib/flexbox.scss"; 8 | @import "./lib/layout.scss"; 9 | @import "./lib/margin.scss"; 10 | @import "./lib/padding.scss"; 11 | @import "./lib/typography.scss"; 12 | // Visibility and display should always come last in the imports so that they override other utilities with !important 13 | @import "./lib/visibility-display.scss"; 14 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/lib/borders.scss: -------------------------------------------------------------------------------- 1 | // Border utilities 2 | // stylelint-disable block-opening-brace-space-before, primer/selector-no-utility, comment-empty-line-before 3 | 4 | /* Add a gray border */ 5 | .border { border: $border !important; } 6 | /* Add a gray border to the top */ 7 | .border-top { border-top: $border !important; } 8 | /* Add a gray border to the right */ 9 | .border-right { border-right: $border !important; } 10 | /* Add a gray border to the bottom */ 11 | .border-bottom { border-bottom: $border !important; } 12 | /* Add a gray border to the left */ 13 | .border-left { border-left: $border !important; } 14 | /* Add a gray border to the left and right */ 15 | .border-y { 16 | border-top: $border !important; 17 | border-bottom: $border !important; 18 | } 19 | 20 | .border-dashed { border-style: dashed !important; } 21 | 22 | /* Use with .border to turn the border blue */ 23 | .border-blue { border-color: $border-blue !important; } 24 | /* Use with .border to turn the border blue */ 25 | .border-blue-dark { border-color: $border-blue-dark !important; } 26 | /* Use with .border to turn the border red */ 27 | .border-red { border-color: $border-red !important; } 28 | /* Use with .border to turn the border red */ 29 | .border-red-dark { border-color: $border-red-dark !important; } 30 | /* Use with .border to turn the border gray-light */ 31 | .border-gray-light { border-color: $border-gray-light !important; } 32 | /* Use with .border to turn the border gray-dark */ 33 | .border-gray-dark { border-color: $border-gray-dark !important; } 34 | 35 | // Without borders 36 | /* Remove all borders */ 37 | .border-0 { border: 0 !important; } 38 | /* Remove the top border */ 39 | .border-top-0 { border-top: 0 !important; } 40 | /* Remove the right border */ 41 | .border-right-0 { border-right: 0 !important; } 42 | /* Remove the bottom border */ 43 | .border-bottom-0 { border-bottom: 0 !important; } 44 | /* Remove the left border */ 45 | .border-left-0 { border-left: 0 !important; } 46 | 47 | // Rounded corners 48 | /* Remove the border-radius */ 49 | .rounded-0 { border-radius: 0 !important; } 50 | /* Add a border-radius to all corners */ 51 | .rounded-1 { border-radius: $border-radius !important; } 52 | /* Add a 2x border-radius to all corners */ 53 | .rounded-2 { border-radius: $border-radius * 2 !important; } 54 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/lib/box-shadow.scss: -------------------------------------------------------------------------------- 1 | // Box shadow utilities 2 | // stylelint-disable primer/selector-no-utility 3 | 4 | // Box shadows 5 | 6 | .box-shadow { 7 | box-shadow: $box-shadow !important; 8 | } 9 | 10 | .box-shadow-medium { 11 | box-shadow: $box-shadow-medium !important; 12 | } 13 | 14 | .box-shadow-large { 15 | box-shadow: $box-shadow-large !important; 16 | } 17 | 18 | // Turn off box shadow 19 | 20 | .box-shadow-none { 21 | box-shadow: none !important; 22 | } 23 | -------------------------------------------------------------------------------- /node_modules/primer-utilities/lib/visibility-display.scss: -------------------------------------------------------------------------------- 1 | // Visibility and display utilities 2 | // stylelint-disable block-opening-brace-space-after, block-opening-brace-space-before, primer/selector-no-utility 3 | // stylelint-disable comment-empty-line-before 4 | 5 | // Visibility utilities 6 | /* Visibility hidden */ 7 | .v-hidden { visibility: hidden !important; } 8 | /* Visibility visible */ 9 | .v-visible { visibility: visible !important; } 10 | 11 | // Display utilites 12 | /* Set the display to table */ 13 | .d-table { display: table !important; } 14 | /* Set the display to table-cell */ 15 | .d-table-cell { display: table-cell !important; } 16 | /* Set the table-layout to fixed */ 17 | .table-fixed { table-layout: fixed !important; } 18 | 19 | /* Set the display to block */ 20 | .d-block { display: block !important; } 21 | /* Set the display to inline */ 22 | .d-inline { display: inline !important; } 23 | /* Set the display to inline-block */ 24 | .d-inline-block { display: inline-block !important; } 25 | /* Set the display to none */ 26 | .d-none { display: none !important; } 27 | 28 | // Responsive display utlities 29 | // .d-sm-none, .d-lg-inline, ... 30 | @each $breakpoint in map-keys($breakpoints) { 31 | @include breakpoint($breakpoint) { 32 | /* Set the display to table at the #{$breakpoint} breakpoint */ 33 | .d-#{$breakpoint}-table { display: table !important; } 34 | /* Set the display to table cell at the #{$breakpoint} breakpoint */ 35 | .d-#{$breakpoint}-table-cell { display: table-cell !important; } 36 | /* Set the display to block at the #{$breakpoint} breakpoint */ 37 | .d-#{$breakpoint}-block { display: block !important; } 38 | /* Set the display to inline at the #{$breakpoint} breakpoint */ 39 | .d-#{$breakpoint}-inline { display: inline !important; } 40 | /* Set the display to inline block at the #{$breakpoint} breakpoint */ 41 | .d-#{$breakpoint}-inline-block { display: inline-block !important; } 42 | /* Set the display to none at the #{$breakpoint} breakpoint */ 43 | .d-#{$breakpoint}-none { display: none !important; } 44 | } 45 | } 46 | 47 | // Hide utilities for each breakpoint 48 | // Each hide utility only applies to one breakpoint range. 49 | @media (max-width: $width-sm) { 50 | .hide-sm { 51 | display: none !important; 52 | } 53 | } 54 | 55 | @media (min-width: $width-sm) and (max-width: $width-md) { 56 | .hide-md { 57 | display: none !important; 58 | } 59 | } 60 | 61 | @media (min-width: $width-md) and (max-width: $width-lg) { 62 | .hide-lg { 63 | display: none !important; 64 | } 65 | } 66 | 67 | @media (min-width: $width-lg) { 68 | .hide-xl { 69 | display: none !important; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "open-source-guide", 3 | "private": true, 4 | "scripts": { 5 | "test": "script/test" 6 | }, 7 | "devDependencies": { 8 | "async": "^2.0.0", 9 | "glob": "^7.0.5", 10 | "ignore": "^3.1.3", 11 | "js-yaml": "^3.6.1", 12 | "remark-lint": "^5.0.0", 13 | "remark-parse": "^2.0.0", 14 | "remark-retext": "^2.0.0", 15 | "remark-stringify": "^2.0.0", 16 | "retext-english": "^2.0.0", 17 | "retext-equality": "^2.3.2", 18 | "retext-quotes": "^1.0.0", 19 | "retext-readability": "^3.0.0", 20 | "retext-repeated-words": "^1.0.0", 21 | "retext-sentence-spacing": "^1.0.0", 22 | "retext-simplify": "^3.0.0", 23 | "retext-words": "bkeepers/retext-words", 24 | "to-vfile": "^2.1.0", 25 | "unified": "^5.0.0", 26 | "vfile-reporter": "^3.0.0", 27 | "vfile-statistics": "^1.0.0" 28 | }, 29 | "dependencies": { 30 | "primer-css": "^4.7.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | export CC=gcc 5 | 6 | echo "==> Installing gem dependencies…" 7 | bundle check --path vendor/gems 2>&1 > /dev/null || { 8 | time bundle install --binstubs bin --path vendor/gems 9 | } 10 | 11 | echo "==> Installing node dependencies…" 12 | npm install 13 | -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "==> Building the site…" 3 | bundle exec jekyll build $@ 4 | -------------------------------------------------------------------------------- /script/html-proofer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "bundler/setup" 4 | require "html-proofer" 5 | 6 | url_ignores = [ 7 | 'https://karissa.github.io/post/okf-de', 8 | 'https://this-week-in-rust.org/', 9 | 'https://www.vagrantup.com/' 10 | ] 11 | 12 | HTMLProofer::Runner.new(["_site"], 13 | :type => :directory, 14 | :url_ignore => url_ignores, 15 | :verbose => !!ENV["VERBOSE"], 16 | :check_html => true 17 | ).run 18 | -------------------------------------------------------------------------------- /script/server: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | bundle exec jekyll serve --watch --incremental --baseurl '' 6 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | script/build --config _config.yml,test/_config.yml 6 | bundle exec rake 7 | script/html-proofer 8 | script/test-prose 9 | -------------------------------------------------------------------------------- /search.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 | -------------------------------------------------------------------------------- /test/_config.yml: -------------------------------------------------------------------------------- 1 | # Override config for tests 2 | baseurl: "" 3 | 4 | collections: 5 | articles: 6 | output: true 7 | permalink: /:path/ 8 | -------------------------------------------------------------------------------- /test/helper.rb: -------------------------------------------------------------------------------- 1 | require "minitest/autorun" 2 | require "jekyll" 3 | 4 | module Helper 5 | class << self 6 | attr_accessor :config, :site 7 | end 8 | end 9 | 10 | def source 11 | File.expand_path('../', File.dirname(__FILE__)) 12 | end 13 | 14 | def config 15 | Helper.config ||= Jekyll.configuration("source" => source) 16 | end 17 | 18 | def docs 19 | (site.pages + site.collections["articles"].docs) 20 | end 21 | 22 | def pages 23 | docs.map { |doc| doc.to_liquid } 24 | end 25 | 26 | def site 27 | Helper.site ||= begin 28 | site = Jekyll::Site.new(config) 29 | site.reset 30 | site.read 31 | site 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /test/lint_test.rb: -------------------------------------------------------------------------------- 1 | require_relative "./helper" 2 | 3 | describe "lint test" do 4 | 5 | pages.each do |page| 6 | next unless page["path"].match(/\.md$/) 7 | 8 | describe page["path"] do 9 | 10 | describe "frontmatter" do 11 | 12 | before do 13 | # Load raw metadata to skip defaults 14 | @data = SafeYAML.load_file(page["path"]) 15 | end 16 | 17 | it "has valid fields" do 18 | assert_valid_fields @data, site.data["fields"] 19 | end 20 | end 21 | end 22 | end 23 | 24 | def assert_valid_fields(data, fields) 25 | extra_fields = data.keys - fields.keys 26 | assert extra_fields.empty?, "Unexpected metadata: #{extra_fields.inspect}" 27 | 28 | fields.each do |name, attrs| 29 | if attrs["required"] 30 | assert data.key?(name), "#{name} is required" 31 | end 32 | 33 | if attrs["type"] && @data[name] 34 | assert_kind_of Kernel.const_get(attrs["type"]), @data[name] 35 | end 36 | 37 | # Check subfields 38 | if attrs["fields"] && @data[name] 39 | @data[name].each do |d| 40 | assert_valid_fields(d, attrs["fields"]) 41 | end 42 | end 43 | end 44 | end 45 | end 46 | --------------------------------------------------------------------------------