From 03e817ad57a5c1689420384483b0412e1f9909a1 Mon Sep 17 00:00:00 2001 From: David Herman Date: Wed, 16 Jan 2019 00:25:21 -0800 Subject: [PATCH] Initial add. --- .gitignore | 3 + 404.html | 24 ++++++ Gemfile | 31 ++++++++ Gemfile.lock | 79 ++++++++++++++++++++ _advanced/hooks.md | 6 ++ _advanced/index.md | 6 ++ _config.yml | 63 ++++++++++++++++ _contributing/index.md | 5 ++ _data/nav.yml | 1 + _data/sidebar.yml | 76 +++++++++++++++++++ _guide/getting-started.md | 25 +++++++ _guide/index.md | 24 ++++++ _guide/understanding.md | 79 ++++++++++++++++++++ _plugins/subnav.txt | 7 ++ _posts/2019-01-10-welcome-to-jekyll.markdown | 25 +++++++ _reference/activate.md | 5 ++ _reference/current.md | 7 ++ _reference/deactivate.md | 5 ++ _reference/fetch.md | 5 ++ _reference/help.md | 5 ++ _reference/index.md | 6 ++ _reference/install.md | 5 ++ _reference/pin.md | 5 ++ _reference/version.md | 5 ++ index.md | 6 ++ 25 files changed, 508 insertions(+) create mode 100644 .gitignore create mode 100644 404.html create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100644 _advanced/hooks.md create mode 100644 _advanced/index.md create mode 100644 _config.yml create mode 100644 _contributing/index.md create mode 100644 _data/nav.yml create mode 100644 _data/sidebar.yml create mode 100644 _guide/getting-started.md create mode 100644 _guide/index.md create mode 100644 _guide/understanding.md create mode 100644 _plugins/subnav.txt create mode 100644 _posts/2019-01-10-welcome-to-jekyll.markdown create mode 100644 _reference/activate.md create mode 100644 _reference/current.md create mode 100644 _reference/deactivate.md create mode 100644 _reference/fetch.md create mode 100644 _reference/help.md create mode 100644 _reference/index.md create mode 100644 _reference/install.md create mode 100644 _reference/pin.md create mode 100644 _reference/version.md create mode 100644 index.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..45c1505 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +_site +.sass-cache +.jekyll-metadata diff --git a/404.html b/404.html new file mode 100644 index 0000000..c472b4e --- /dev/null +++ b/404.html @@ -0,0 +1,24 @@ +--- +layout: default +--- + + + +
+

404

+ +

Page not found :(

+

The requested page could not be found.

+
diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..2acbe5b --- /dev/null +++ b/Gemfile @@ -0,0 +1,31 @@ +source "https://rubygems.org" + +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! +gem "jekyll", "~> 3.8.5" + +gem "notion-jekyll-theme", :git => "https://github.com/notion-cli/jekyll-theme" + +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +# gem "github-pages", group: :jekyll_plugins + +# If you have any plugins, put them here! +group :jekyll_plugins do + gem "jekyll-feed", "~> 0.6" +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1.0" if Gem.win_platform? + + +gem "nokogiri", "~> 1.10" diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..8a204e5 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,79 @@ +GIT + remote: https://github.com/notion-cli/jekyll-theme + revision: 1855ab1a5178608ade9ddd55b8665b6e1f3c5c7e + specs: + notion-jekyll-theme (0.1.0) + jekyll (~> 3.8) + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + colorator (1.1.0) + concurrent-ruby (1.1.4) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + eventmachine (1.2.7) + ffi (1.10.0) + forwardable-extended (2.6.0) + http_parser.rb (0.6.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jekyll (3.8.5) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 2.0) + kramdown (~> 1.14) + liquid (~> 4.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (>= 1.7, < 4) + safe_yaml (~> 1.0) + jekyll-feed (0.11.0) + jekyll (~> 3.3) + jekyll-sass-converter (1.5.2) + sass (~> 3.4) + jekyll-watch (2.1.2) + listen (~> 3.0) + kramdown (1.17.0) + liquid (4.0.1) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + mercenary (0.3.6) + mini_portile2 (2.4.0) + nokogiri (1.10.0) + mini_portile2 (~> 2.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (3.0.3) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) + rouge (3.3.0) + ruby_dep (1.5.0) + safe_yaml (1.0.4) + sass (3.7.3) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + +PLATFORMS + ruby + +DEPENDENCIES + jekyll (~> 3.8.5) + jekyll-feed (~> 0.6) + nokogiri (~> 1.10) + notion-jekyll-theme! + tzinfo-data + +BUNDLED WITH + 1.16.4 diff --git a/_advanced/hooks.md b/_advanced/hooks.md new file mode 100644 index 0000000..2842a2d --- /dev/null +++ b/_advanced/hooks.md @@ -0,0 +1,6 @@ +--- +title: Hooks +--- + +# Hooks + diff --git a/_advanced/index.md b/_advanced/index.md new file mode 100644 index 0000000..44a7725 --- /dev/null +++ b/_advanced/index.md @@ -0,0 +1,6 @@ +--- +title: Advanced Usage +--- + +# Advanced Usage + diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..bb7adc0 --- /dev/null +++ b/_config.yml @@ -0,0 +1,63 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. + +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. +title: Notion - Docs +email: david.herman@gmail.com +description: >- # this means to ignore newlines until "baseurl:" + Write an awesome description for your new site here. You can edit this + line in _config.yml. It will appear in your document head meta (for + Google search results) and in your feed.xml site description. +baseurl: "" # the subpath of your site, e.g. /blog +url: "" # the base hostname & protocol for your site, e.g. http://example.com +twitter_username: jekyllrb +github_username: jekyll + +collections: + guide: + output: true + permalink: /guide/:name + reference: + output: true + permalink: /reference/:name + advanced: + output: true + permalink: /advanced/:name + contributing: + output: true + permalink: /contributing/:name + +defaults: + - scope: + path: "" + values: + layout: doc + +# Build settings +markdown: kramdown +theme: notion-jekyll-theme +plugins: + - jekyll-feed + +# Exclude from processing. +# The following items will not be processed, by default. Create a custom list +# to override the default setting. +# exclude: +# - Gemfile +# - Gemfile.lock +# - node_modules +# - vendor/bundle/ +# - vendor/cache/ +# - vendor/gems/ +# - vendor/ruby/ diff --git a/_contributing/index.md b/_contributing/index.md new file mode 100644 index 0000000..dc82ff6 --- /dev/null +++ b/_contributing/index.md @@ -0,0 +1,5 @@ +--- +title: Contributing Guide +--- + +# Contributing Guide diff --git a/_data/nav.yml b/_data/nav.yml new file mode 100644 index 0000000..d3d8934 --- /dev/null +++ b/_data/nav.yml @@ -0,0 +1 @@ +track: docs diff --git a/_data/sidebar.yml b/_data/sidebar.yml new file mode 100644 index 0000000..0416359 --- /dev/null +++ b/_data/sidebar.yml @@ -0,0 +1,76 @@ +- id: guide + url: /guide/ + title: Guide + docs: + - id: index + url: /guide/ + title: Introduction + sub-headers: + - id: features + title: Features + - id: why-notion + title: Why Notion? + - id: how-does-it-work + title: How does it work? + - id: getting-started + url: /guide/getting-started/ + title: Getting Started + - id: understanding + url: /guide/understanding/ + title: Understanding Notion + sub-headers: + - id: tools-and-toolchains + title: Tools and Toolchains + - id: user-toolchain + title: User Toolchain + - id: project-toolchains + title: Project Toolchains +- id: reference + url: /reference/ + title: Reference + docs: + - id: index + url: /reference/ + title: Notion Commands + - id: fetch + url: /reference/fetch/ + title: notion fetch + - id: install + url: /reference/install/ + title: notion install + - id: pin + url: /reference/pin/ + title: notion pin + - id: current + url: /reference/current/ + title: notion current + - id: deactivate + url: /reference/deactivate/ + title: notion deactivate + - id: activate + url: /reference/activate/ + title: notion activate + - id: help + url: /reference/help/ + title: notion help + - id: version + url: /reference/version/ + title: notion version +- id: advanced + url: /advanced/ + title: Advanced + docs: + - id: index + url: /advanced/ + title: Advanced Usage + - id: hooks + url: /advanced/hooks/ + title: Hooks +- id: contributing + url: /contributing/ + title: Contributing + docs: + - id: index + url: /contributing/ + title: Contributing Guide + diff --git a/_guide/getting-started.md b/_guide/getting-started.md new file mode 100644 index 0000000..3312d16 --- /dev/null +++ b/_guide/getting-started.md @@ -0,0 +1,25 @@ +--- +title: Getting Started +--- + +# Getting Started + +## Unix Installation + +On most Unix systems, you can install Notion with a single command: + +```bash +curl -sSLf https://get.notionjs.com | bash +``` + +For [bash](https://www.gnu.org/software/bash/), this installer will automatically update your console startup script. + +To configure other shells to use Notion, edit your console startup scripts to: +- Set the `NOTION_HOME` variable to `~/.notion` +- Add `$NOTION_HOME/bin` to the beginning of your `PATH` variable + +## Windows Installation + +::: warning +A Windows installer is in development. +::: diff --git a/_guide/index.md b/_guide/index.md new file mode 100644 index 0000000..037a85d --- /dev/null +++ b/_guide/index.md @@ -0,0 +1,24 @@ +--- +title: Introduction +--- + +# Introduction + +Welcome to Notion! + +Notion is a hassle-free way to manage your JavaScript command-line tools. + +## Features + +- Speed 🚀 +- Seamless, per-project version switching +- Cross-platform support, including Windows and all Unix shells +- Support for multiple package managers +- Stable tool installation—no reinstalling on every Node upgrade! +- Extensibility hooks for site-specific customization + + +## Why Notion? + +## How does it work? + diff --git a/_guide/understanding.md b/_guide/understanding.md new file mode 100644 index 0000000..bbfd373 --- /dev/null +++ b/_guide/understanding.md @@ -0,0 +1,79 @@ +--- +title: Understanding Notion +--- + +# Understanding Notion + + +## Tools and Toolchains + +Notion's job is to manage your JavaScript command-line tools, such as `node`, `npm`, `yarn`, or executables shipped as part of JavaScript packages. + +Similar to package managers, Notion keeps track of which project (if any) you're working on based on your current directory. Notion automatically manages a separate _toolchain_—a set of tools and their versions—for each project, as well as a global _user toolchain_ for your personal use. + +By keeping toolchains separate, Notion ensures that a tool installed in one toolchain doesn't "bleed" into another where it isn't installed. This lets you use whatever Node-based tools you like for personal use, without worrying that they'll affect your project scripts. + +## User Toolchain + +Usually, once you've got Notion installed, you'll want to pick a version of Node for personal use. Most developers like to stick to a recent version, so you can leave the version unspecified and Notion will install the latest release: + +```bash +$ notion install node +``` + +If you like using the [Yarn](https://yarnpkg.com) package manager, you can also install a recent version of that into your toolchain: + +```bash +$ notion install yarn +``` + +### Installing other tools into the user toolchain + +{% include warn.html content="This feature is in development." %} + +With `notion install`, you can also install command-line tools that are distributed via npm into your user toolchain. + +```bash +# install the `ember` executable from the `ember-cli` package +$ notion install ember-cli + +# install the `vuepress` executable +$ notion install vuepress +``` + +Now each of these tools is available for your personal use, just by calling them directly: + +```bash +# create a new Ember app +$ ember new my-app + +# run a Vuepress development server +$ echo '# Hello World' > README.md +$ vuepress dev +``` + +## Project Toolchains + +Notion allows a team or community of collaborators to standardize on the development tools they use for their project. + +The `notion pin` command allows you to choose your Node or package manager version for a project: + +```bash +$ notion pin node 10.3 +``` + +Notion stores this in your `package.json` so you can commit your choice of tools to version control: + +```bash +$ grep -A 2 toolchain package.json + "toolchain": { + "node": "10.3.0" + } +``` + +This way, everyone who uses Notion to work on the project automatically gets the same version you selected: + +```bash +$ node --version +10.3.0 +``` diff --git a/_plugins/subnav.txt b/_plugins/subnav.txt new file mode 100644 index 0000000..06bfea7 --- /dev/null +++ b/_plugins/subnav.txt @@ -0,0 +1,7 @@ +class Subnav < Jekyll::Generator + def generate(site) + site.collections.guide.each do |guide| + puts guide.title + end + end +end diff --git a/_posts/2019-01-10-welcome-to-jekyll.markdown b/_posts/2019-01-10-welcome-to-jekyll.markdown new file mode 100644 index 0000000..328adf7 --- /dev/null +++ b/_posts/2019-01-10-welcome-to-jekyll.markdown @@ -0,0 +1,25 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2019-01-10 08:50:11 -0800 +categories: jekyll update +--- +You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. + +To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. + +[jekyll-docs]: https://jekyllrb.com/docs/home +[jekyll-gh]: https://github.com/jekyll/jekyll +[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/_reference/activate.md b/_reference/activate.md new file mode 100644 index 0000000..fb09161 --- /dev/null +++ b/_reference/activate.md @@ -0,0 +1,5 @@ +--- +title: notion activate +--- + +# `notion activate` diff --git a/_reference/current.md b/_reference/current.md new file mode 100644 index 0000000..1dff222 --- /dev/null +++ b/_reference/current.md @@ -0,0 +1,7 @@ +--- +title: notion current +--- + +# `notion current` + +{% include warn.html content="This command will probably change." %} diff --git a/_reference/deactivate.md b/_reference/deactivate.md new file mode 100644 index 0000000..ab8c96a --- /dev/null +++ b/_reference/deactivate.md @@ -0,0 +1,5 @@ +--- +title: notion deactivate +--- + +# `notion deactivate` diff --git a/_reference/fetch.md b/_reference/fetch.md new file mode 100644 index 0000000..f9c2c74 --- /dev/null +++ b/_reference/fetch.md @@ -0,0 +1,5 @@ +--- +title: notion fetch +--- + +# `notion fetch` diff --git a/_reference/help.md b/_reference/help.md new file mode 100644 index 0000000..941ab63 --- /dev/null +++ b/_reference/help.md @@ -0,0 +1,5 @@ +--- +title: notion help +--- + +# `notion help` diff --git a/_reference/index.md b/_reference/index.md new file mode 100644 index 0000000..6b6e50d --- /dev/null +++ b/_reference/index.md @@ -0,0 +1,6 @@ +--- +title: Notion Commands +--- + +# Notion Commands + diff --git a/_reference/install.md b/_reference/install.md new file mode 100644 index 0000000..eb16193 --- /dev/null +++ b/_reference/install.md @@ -0,0 +1,5 @@ +--- +title: notion install +--- + +# `notion install` diff --git a/_reference/pin.md b/_reference/pin.md new file mode 100644 index 0000000..70efef4 --- /dev/null +++ b/_reference/pin.md @@ -0,0 +1,5 @@ +--- +title: notion pin +--- + +# `notion pin` diff --git a/_reference/version.md b/_reference/version.md new file mode 100644 index 0000000..fb04473 --- /dev/null +++ b/_reference/version.md @@ -0,0 +1,5 @@ +--- +title: notion version +--- + +# `notion version` diff --git a/index.md b/index.md new file mode 100644 index 0000000..0b1a74f --- /dev/null +++ b/index.md @@ -0,0 +1,6 @@ +--- +# Feel free to add content and custom Front Matter to this file. +# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults + +layout: doc +---