diff --git a/.gitignore b/.gitignore index 57510a2..018a050 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,18 @@ +# This .gitignore is appropriate for repositories deployed to GitHub Pages and using +# a Gemfile as specified at https://github.com/github/pages-gem#conventional + +# Basic Jekyll gitignores (synchronize to Jekyll.gitignore) _site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +# Additional Ruby/bundler ignore for when you run: bundle install +/vendor + +# Specific ignore for GitHub Pages +# GitHub Pages will always use its own deployed version of pages-gem +# This means GitHub Pages will NOT use your Gemfile.lock and therefore it is +# counterproductive to check this file into the repository. +# Details at https://github.com/github/pages-gem/issues/768 +Gemfile.lock \ No newline at end of file diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..eedb52b --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.3.6 \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..cf10c79 --- /dev/null +++ b/Gemfile @@ -0,0 +1,37 @@ +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", "~> 4.3.3" +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima", "~> 2.5" +# 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.12" + gem 'jekyll-asciidoc' + gem "just-the-docs" +end + +# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem +# and associated library. +platforms :mingw, :x64_mingw, :mswin, :jruby do + gem "tzinfo", ">= 1", "< 3" + gem "tzinfo-data" +end + +# Performance-booster for watching directories on Windows +gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] + +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] \ No newline at end of file diff --git a/README.md b/README.md index 116db6e..4a96f5b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,29 @@ # Production Resources -The gh-pages branch of this repo is home for the files used to generate http://oreillymedia.github.io/production-resources/. +The `gh-pages` branch of this repo is home for the files used to generate http://oreillymedia.github.io/production-resources/. -The web page content is generated from markdown source (well, actually it's kramdown) using Jekyll. For details, see GitHub notes about GitHub Pages and then check out Jekyll documentation. After that, reverse engineer and Google. +The web page content is generated from markdown source (well, actually it's kramdown) using Jekyll. +## Local Preview +You can preview the files locally using `jekyll`. Clone down the repo and make sure you have the proper version of Ruby installed on your system by checking the _.ruby-version_ file. You can use [`rbenv`](https://github.com/rbenv/rbenv) to manage Ruby on your system. + +Then install the Gem dependencies: + +``` +bundle install +``` + +Then change the base URL in the _\_config.yml_ file to: + +``` +baseurl: /oreillymedia.github.io/production-resources/ +``` + +Finally, start your local server: + +``` +bundle exec jekyll serve +``` + +This should show output including the server address which will be something like: `http://127.0.0.1:4000/oreillymedia.github.io/production-resources/`. Open that URL in a browser to see how the docs will look. diff --git a/_config.yml b/_config.yml index 8b40623..0b33af5 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,9 @@ name: O'Reilly Production markdown: kramdown baseurl: http://oreillymedia.github.io/production-resources/ + +# Build settings +theme: just-the-docs +color_scheme: orm-colors +search_enabled: true +heading_anchors: true \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index 8d399b8..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - {{ page.title }} - - - - - -
- - {{ content }} - -
- - - diff --git a/_sass/color_schemes/orm-colors.scss b/_sass/color_schemes/orm-colors.scss new file mode 100644 index 0000000..026619d --- /dev/null +++ b/_sass/color_schemes/orm-colors.scss @@ -0,0 +1 @@ +$link-color: #d3002d; diff --git a/_sass/custom/custom.scss b/_sass/custom/custom.scss new file mode 100644 index 0000000..e10f674 --- /dev/null +++ b/_sass/custom/custom.scss @@ -0,0 +1,58 @@ +.nowrap { + white-space: nowrap; +} + +.hide { + display:none; +} + +.implementation_notes { + text-align:right; + color: $link-color; + margin-bottom: 0; + padding: 5px 36px 5px 0; + position: relative; + svg { + position: absolute; + right:0; + bottom:1px; + width: 2rem; + height: 2rem; + padding: .5rem; + transform: rotate(90deg); + } + svg.active { + transform: rotate(-90deg); + } + &:hover { + svg { + background-color: #f5f6fa; + } + } + +} +.implementation_notes_container td { + border-right: 1px solid $link-color; + } + + +h4 { + color: $link-color; +} +.main-content h4 { + margin-top: 3em; +} + +.eol { + color: #3d3b49; +} + +.deprecated { + color: $link-color; + text-decoration: line-through; +} + +.main-content dl, dd, dt { + display: block; + text-align: left ! important; +} diff --git a/css/main.css b/css/main.css deleted file mode 100644 index 8f46e0c..0000000 --- a/css/main.css +++ /dev/null @@ -1,286 +0,0 @@ - -body { - font-family: "Helvetica Neue", Helvetica, Arial, Sans-Serif; - font-size: 14px; - color: #333333; - margin: 60px auto; - width: 70%; -} - -.hyperlink { - word-break: break-all; -} - -nav ul, footer ul { - font-family:'Helvetica', 'Arial', 'Sans-Serif'; - padding: 0; - list-style: none; - font-weight: bold; -} -nav ul li, footer ul li { - display: inline; - margin-right: 20px; -} -a { - text-decoration: none; - color: #003399; -} -a:hover { - text-decoration: underline; -} -h1 { - font-size: 24pt; -} -p { - line-height: 1.4em; - color: #333; -} -footer { - border-top: 1px solid #d5d5d5; - font-size: .8em; -} - -ul.posts { - margin: 20px auto 40px; - font-size: 1.5em; -} - -ul.posts li, -.no-bullets { - list-style: none; - font-size: 14px; - margin-left: 0; - padding-left: 0; -} - -/* Lists */ - -dt { - padding: 1em 0 .5em .75em; -} - -ul { - list-style-type: square; -} - -ul, ol { - line-height: 1.4em; -} - -/* Tables */ - -table { - margin: 12.5pt 0; - border-collapse: collapse; - max-width: 100%; - hyphens: none; -} - -table caption { - font-style: italic; - margin-bottom: 4pt; - display: table-caption; - text-align: left; - } - - -td, th { - padding: 0.2em 0.4em 0.2em 0.4em; - vertical-align: top; - text-align: left; - word-spacing: 0.3pt; -} - -thead tr th { - font-weight: 600; -} - -/*lists within tables*/ -table ul li, -table ol li{ - margin: 0 0 0 8pt; -} - -table, th, td { - border: 1px solid black; -} - -th { - background-color: #C8C8C8; - color: black; -} - -div[data-type="warning"] { - background: #ffe9ec; -} - -div[data-type="note"], div[data-type="warning"], div[data-type="tip"] { - border: solid 1pt black; - padding-left: 2em; - padding-right: 2em; -} - - -/* Headers */ - -h2 { - font-size: 20pt; - text-align: center; - border-bottom: 1px solid #d3002d; - color: #d3002d; -} - -h3 { - font-size: 16pt; - color: #d3002d; - padding-top: 10px; -} - -h4 { - font-size: 12pt; - color: #d3002d; -} - - - - -/* ORM Word Template Quickstart Guide */ - -.no-bullets li { - background-image: url('../illustrations/download.svg'); - background-repeat: no-repeat; - display: block; - min-height: 40px; - background-size: 30px; - padding: 0 0 0 50px; - margin-right: 50px; - margin-top: 20px; - -} - - - - -/* Styled Admonitions */ - -div[data-type="note"] { - border: 1px solid #86aac8; - font-size: 10pt; - padding: 1.5em; - color: #86aac8; - padding-bottom: 5px; -} - -div[data-type="warning"] { - border: 1px solid #ac2e3d; - font-size: 12pt; - padding: 1.5em; - color: #ac2e3d; - padding-bottom: 5px; -} - -div[data-type="note"] h6 { - background-image: url('../illustrations/note.png'); - background-size:40px; - padding-top: .5em; - padding-bottom: .5em; - background-repeat: no-repeat; - display: block; - min-height: 20px; - font-size: 1.5em; - padding-left: 50px; - margin: 0 0 0 0; -} - -div[data-type="warning"] h6 { - background-image: url('../illustrations/warning.png'); - background-size:40px; - padding-top: .5em; - padding-bottom: .5em; - background-repeat: no-repeat; - display: block; - min-height: 20px; - font-size: 1.5em; - padding-left: 60px; - margin: 0 0 0 0; - -} - - - -/* Responsive */ - -@media only screen and (min-width: 800px) { -body { - font-size: 14pt; -} - -/* Headers */ - -h2 { - font-size: 24pt; - text-align: center; - border-bottom: 1px solid #d3002d; - color: #d3002d; -} - -h3 { - font-size: 20pt; - color: #d3002d; - padding-top: 10px; -} - -h4 { - font-size: 16pt; - color: #d3002d; -} - -.no-bullets li { - float: left; - margin: 0 0 35px 3px; - padding: 15px 20px 0 35px; -} - -#table-of-contents-word { - clear: left; - -} - -.no-bullets { - padding: 0; - margin: 0; -} - -div[data-type="note"], -div[data-type="warning"] { - font-size: 12pt; -} - -ul.no-bullets { - display: inline-block; -} - -.center { - width: 100%; - text-align: center; -} - -} - -@media only screen and (min-width: 950px) { -.no-bullets li { - float: left; - margin: 0 0 35px 5px; - padding: 15px 50px 0px 35px; -} - -} - -@media only screen and (min-width: 1000px) { - -#table-of-contents-word+ul { - width: 375px; - margin: 0 auto; -} - -} diff --git a/illustrations/index.md b/illustrations/index.md index 410e199..b746b7f 100644 --- a/illustrations/index.md +++ b/illustrations/index.md @@ -1,6 +1,6 @@ --- layout: default -title: styleguide +title: O'Reilly Media Illustration Guidelines --- # O'Reilly Media Illustration Guidelines diff --git a/index.md b/index.md index 515aa11..6fda561 100644 --- a/index.md +++ b/index.md @@ -1,6 +1,7 @@ --- layout: default title: Production Resources +nav_order: 0 --- # O'Reilly Media Production Resources diff --git a/oriole/index.md b/oriole/index.md deleted file mode 100644 index 458d5f1..0000000 --- a/oriole/index.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -layout: default -title: Oriole Guidelines and Resources ---- - -# O'Reilly Oriole and LaunchBot - -[Installation and Setup](#install)
-[How to Make an Oriole with LaunchBot](#make_oriole)
-[Tips for Creating a Notebook](#writing)
-[Tips for Recording an Oriole](#recording)
- -Oriole is a unique new medium that blends code, data, text, and video into a narrated learning experience with executable content. You can see a few examples here, or take a look at the complete collection on Safari. - -LaunchBot helps you discover, build, and run Docker-enabled content, such as Jupyter Notebooks and Orioles. It provides a desktop GUI in place of many of the complex command-line process for installing and running applications. Think of LaunchBot as the place authors and editors will work together to create compelling text and runnable code, and as a tool that will help production ensure that all of the dependencies are captured in the *Dockerfile* so that the Oriole or notebook will run as expected. - -You can [learn more about LaunchBot here](http://launchbot.io/docs/). - -# Installation and Setup - -## Make Sure Git Is Installed - -To check whether you have Git installed already, type `git` at the command line in a terminal window. If you see output that describes common Git commands, you have Git installed. - -Use `git config` to specify your email address (you'll need to use the same email address you use to log in to GitLab, which we'll discuss below). [Here are instructions.](https://help.github.com/articles/setting-your-email-in-git/) It's important that you use the same email address here as you do in GitLab, so you'll be able to push changes to the remote GitLab repository. - -## Install Docker for Mac - -If you already have Docker installed, please make sure it's updated to the latest version. - -Docker is needed to build an Oriole, and "Docker for Mac" is an easy way to get Docker up and running on your Mac. [Follow the instructions here](https://docs.docker.com/docker-for-mac/) to download and install Docker for Mac. - -## Get a GitLab Account and Access to the Oriole Project - -GitLab makes it easy to get a Git repo and add collaborators to work together on an Oriole project. We'll get you started with a template that includes a base *Dockerfile* that's appropriate for your project, and we'll invite you to create a GitLab account. You'll use HTTPS to clone your project into LaunchBot. - -## Install LaunchBot - -1. Use Chrome or Firefox (Safari does not render correctly). -2. Go to [launchbot.io](https://launchbot.io/) and follow the instructions for installing. -3. Start LaunchBot by typing `launchbot` at the command line or double clicking the icon. LaunchBot will start in your default browser (should be Chrome or Firefox). - -# How to Make an Oriole with LaunchBot - -Now that all of the pieces are in place, we'll take you through the steps to start a new Oriole project. - -## Cloning the Project from GitLab - -1. Start Docker if it’s not already running. (When active, a whale icon will appear in your menu bar. Click on it to check Docker’s status.) -2. Start LaunchBot -3. In LaunchBot, click the **Projects** tab. Under _Your Projects_, paste the HTTPS URL from the GitLab project into the field _Clone a project from a git url_ and click `download`. The project will now appear under _Your Projects_ and a project directory will be made in `~/launchbot/`. -4. Double click the project -5. Select the branch you want to work on under _Working Branch_ (probably `authoring_branch`). -6. Click LAUNCH PROJECT - -## Committing Your Changes Back to GitLab - -After you are satisfied with the changes you have made: - -1. Close jupyter notebook -2. Type in commit message -3. Click COMMIT -4. PUSH to remote repositor -5. Let your editor know that you're ready for editorial input. - -# Tips for Writing the Notebook Content - -* __15-25 minutes__ The Oriole should not be longer than 25 minutes; explicit details can be put in the text. Essentially, an Oriole is the author explaining the progress of code through the notebook. - -* __Write an article__ The Oriole notebook should read like an article and "stand alone" with subtitles and headers. The text refers to what the code does; feel free to write specifics in the text that you may not have time for in the video. - -* __Cell output I__ It is more interesting for the user when running the cell to see output. Find a balance between short code blocks and making sure there is output for code blocks. If the code is too long, break it into multiple blocks. - -* __Cell output II__ Keep output to a reasonable length. For rows, 3-5 should suffice. For columns, display just the ones you are talking about, if not all are relevant. - -* __Data/files must be local__ Don't pull anything from the internet. If code for downloading is important for your Oriole, please use an if-statement, e.g., if not exist: code to download. - -* __Small datasets__ Keep datasets small and quickly executable. Create a subset and refer to the larger dataset for viewers to use on their own. Long datasets cause long execution times and confuse viewers. - -* __Exercises__ Having exercises, or suggesting specific parameters to change in the code, is an excellent use of the Oriole format. Try to be explicit about what output/solution is expected. - -* __Links__ When adding links to the text, make sure to use HTML notation rather than markdown. For example, instead of `[go to this link](http:///www.oreilly.com)` use `go to this link` The `target="_blank"` is very important, to ensure that the link opens in a new window rather than the Oriole window. - -* __Math__ When formatting equations, please use a markdown editor, such as http://dillinger.io/, to check it is formatted correctly. For example, `$\Theta(n^2)$` will render correctly in the jupyter notebook, but to render correctly in the final version, it should be `$$\Theta(n^2)$$`. - -* __Importing libraries__ Import libraries into the cell where they're first needed to make it easier for the viewer to follow. - -* __Re-running cells__ Consider that the user may go back to re-run individual cells. - -* __Final check__ Before submitting, please do a final run through of the notebook by 1. creating a new image from the dockerfile ( `--no-cache` parameter when building), 2. disconnecting from the internet, 3. starting a new container 4. running all notebooks and every cell. - -# Tips for Recording the Oriole - -* __Be explicit I__ Be sure to *explicitly* mention, out loud, when the user should click Run during recording. The user does not see you scrolling and clicking through the notebook - they can only respond to your audio cues. - -* __Be explicit II__ When recording, refer specifically to "Run" cells when you are talking about them, in a way that makes them easily identifiable for cueing and for viewers. The number of the cell _is not_ a way to identify the cell, as a) the number in a regular jupyter notebook is not based on cell placement, but rather usage and b) the numbers do not appear in the Oriole. - -* __Repeatable results__ If you refer to a specific result, make sure what you say will happen each and every time the code is executed. - -* __Exercises__ If you have exercises, tell the viewers to pause the video while they work on the exercise. Take a second or two and then continue talking (perhaps starting with a "welcome back"); this makes the final cut of the video smoother. - -* __Conclusion__ Feel free to conclude your recording by thanking the audience. You do not need to add a written conclusion within the notebook. diff --git a/oriole/launchbot-settings.md b/oriole/launchbot-settings.md deleted file mode 100644 index 81d902c..0000000 --- a/oriole/launchbot-settings.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -layout: default -title: Oriole Guidelines and Resources ---- - -# LaunchBot Settings - -* *Launchbot Host:*
Check that it is http://launchbot.io -* *API Key:*
Autofilled. You get a key when you sign up. It's on the launchbot.io page under Dashboard -> Profile. Copy/paste it here if not autofilled. -* *Project Directory:*
This is where LaunchBot will save local copies of projects, using Git. The default location is: `/Users//launchbot` -* *Path to Docker Executable directory:*
Path to where Docker lives on your machine. The default is: `/usr/local/bin` -* *Path to Git executable directory:*
Use `which git` to find. Enter without the `git` ending. The default is: `/usr/bin/` -* *Docker Host:*
Autofilled. Should be: `unix:///var/run/docker.sock` -* *Host IP Address*
Autofilled. Should be: `0.0.0.0` -* *CA Certificate:*
Leave empty -* *Certificate:*
Leave empty -* *Key:*
Leave empty diff --git a/overview/index.md b/overview/index.md deleted file mode 100644 index dff419f..0000000 --- a/overview/index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -layout: default -title: Production Overview ---- - -# Write stuff here