Skip to content

Commit

Permalink
upgrade fastpages
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboychan committed Sep 9, 2020
1 parent 1364604 commit dd593d3
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI
on:
push:
branches:
- main # need to filter here so we only deploy when there is a push to master
- master # need to filter here so we only deploy when there is a push to master
# no filters on pull requests, so intentionally left blank
pull_request:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
repo: context.repo.repo,
title: 'Initial Setup',
head: 'fastpages-automated-setup',
base: 'main',
base: 'master',
body: `${contents}`
})
4 changes: 2 additions & 2 deletions .github/workflows/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
git checkout -b fastpages-automated-upgrade
git add -A
git commit -m'upgrade fastpages'
git push -f --set-upstream origin fastpages-automated-upgrade main
git push -f --set-upstream origin fastpages-automated-upgrade master
env:
GH_USERNAME: ${{ github.event.issue.user.login }}

Expand All @@ -208,7 +208,7 @@ jobs:
repo: context.repo.repo,
title: '[fastpages] Update repo with changes from fastpages',
head: 'fastpages-automated-upgrade',
base: 'main',
base: 'master',
body: `${contents}`
})
.then(result => console.log(`::set-output name=pr_num::${result.data.number}`))
Expand Down
2 changes: 1 addition & 1 deletion _action_files/settings.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DEFAULT]
lib_name = nbdev
user = fastai
branch = main
branch = master
version = 0.2.10
description = Writing a library entirely in notebooks
keywords = jupyter notebook
Expand Down
2 changes: 1 addition & 1 deletion _fastpages_docs/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.40
2.1.41
5 changes: 0 additions & 5 deletions _includes/custom-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@


{%- include favicons.html -%}
{% seo %}
<link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet" />
<link rel="stylesheet" href="//use.fontawesome.com/releases/v5.0.7/css/all.css">
{%- feed_meta -%}
{%- if jekyll.environment == 'production' and site.google_analytics -%}
{%- include google-analytics.html -%}
{%- endif -%}

{%- if site.annotations -%}
<script src="https://hypothes.is/embed.js" async></script>
Expand Down
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="twitter:card" content="summary" />
<meta name="twitter:card" content="summary_large_image" />
{%- seo -%}
<link rel="stylesheet" href="{{ "/assets/css/style.css" | relative_url }}">
{%- feed_meta -%}
Expand Down
2 changes: 1 addition & 1 deletion _includes/notebook_binder_link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="px-2">
<a href="https://mybinder.org/v2/gh/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/{{page.branch | default: "main"}}?filepath={{page.nb_path | url_encode }}" target="_blank">
<a href="https://mybinder.org/v2/gh/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/{{page.branch | default: "master"}}?filepath={{page.nb_path | url_encode }}" target="_blank">
<img class="notebook-badge-image" src="{{ "assets/badges/binder.svg" | relative_url }}" alt="Open In Binder"/>
</a>
</div>
4 changes: 2 additions & 2 deletions _includes/notebook_colab_link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="px-2">
<a href="https://colab.research.google.com/github/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/blob/{{page.branch | default: "main"}}/{{page.nb_path}}" target="_blank">
<a href="https://colab.research.google.com/github/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/blob/{{page.branch | default: "master"}}/{{page.nb_path}}" target="_blank">
<img class="notebook-badge-image" src="{{ "assets/badges/colab.svg" | relative_url }}" alt="Open In Colab"/>
</a>
</div>
</div>
4 changes: 2 additions & 2 deletions _includes/notebook_github_link.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="px-2">
{% if page.layout == 'notebook' %}
<a href="https://github.com/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/tree/{{page.branch | default: "main" }}/{{page.nb_path}}" role="button" target="_blank">
<a href="https://github.com/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/tree/{{page.branch | default: "master" }}/{{page.nb_path}}" role="button" target="_blank">
{% elsif page.layout == 'post' %}
<a href="https://github.com/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/tree/{{page.branch | default: "main" }}/{{page.path}}" role="button" target="_blank">
<a href="https://github.com/{{site.github_username}}/{{site.github_repo | default: site.baseurl | remove: "/" }}/tree/{{page.branch | default: "master" }}/{{page.path}}" role="button" target="_blank">
{% endif -%}
<img class="notebook-badge-image" src="{{ "assets/badges/github.svg" | relative_url }}" alt="View On GitHub">
</a>
Expand Down
17 changes: 13 additions & 4 deletions _sass/minima/fastpages-dracula-highlight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $dt-green-light: rgb(172, 229, 145);
// for Jupyter Notebook HTML Code Cells modified from https://www.fast.ai/public/css/hyde.css

.input_area pre, .input_area div {
margin-bottom:2rem !important;
margin-bottom:1.0rem !important;
margin-top:1.5rem !important;
padding-bottom:0 !important;
padding-top:0 !important;
Expand All @@ -42,11 +42,11 @@ $dt-green-light: rgb(172, 229, 145);
text-rendering: optimizeLegibility;
font-family: Menlo, Monaco, Consolas, "Lucida Console", Roboto, Ubuntu, monospace;
border-radius: 5px;
font-size: 100%;
font-size: 105%;
}
.output_area pre, .output_area div {
margin-bottom:1rem !important;
margin-top:1rem !important;
margin-top:0rem !important;
padding-bottom:0 !important;
padding-top:0 !important;
}
Expand All @@ -56,6 +56,7 @@ $dt-green-light: rgb(172, 229, 145);
.output_area pre {
border-left: 1px solid grey;
margin-left: 1rem !important;
font-size: 16px;
}

.code_cell table { width: auto; }
Expand All @@ -76,6 +77,7 @@ $dt-green-light: rgb(172, 229, 145);
pre, code {
background: $dt-code-cell-background;
color: $dt-gray-light;
font-size: 110%;
}

.hll,
Expand Down Expand Up @@ -145,10 +147,13 @@ $dt-green-light: rgb(172, 229, 145);
.ch,
.cm,
.cpf,
.c1,
.cs {
color: $dt-blue;
}

.c1 {
color: gray;
}

.kd,
.kt,
Expand Down Expand Up @@ -211,3 +216,7 @@ $dt-green-light: rgb(172, 229, 145);
color: $dt-red;
}
}

p code{
font-size: 19px;
}
26 changes: 11 additions & 15 deletions _sass/minima/fastpages-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,14 @@ h6:hover .anchor-link {
font-weight:bold;
}

// Handle Overflow With Table Output

table {
display: block !important;
overflow-x: auto;
white-space: nowrap;
font-size: 75%;
white-space: normal;
max-width: 100%;
font-size: 100%;
border:none;
th{
text-align: center! important;
}
td{
text-overflow:ellipsis;
overflow:hidden;
max-width: 15em;
}
}

// customize scrollbars
Expand Down Expand Up @@ -252,11 +244,15 @@ table {
// }
// }

.output_wrapper{
overflow: scroll;
}

.svg-icon.orange{
width: 30px;
height: 23px;
}

.code_cell {
margin: 1.5rem 0px !important;
}

pre code {
font-size: 15px !important;
}
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ services:
<<: *fastpages
command: /fastpages/action_entrypoint.sh

notebook:
<<: *fastpages
command: jupyter notebook --allow-root --no-browser --ip=0.0.0.0 --port=8080 --NotebookApp.token='' --NotebookApp.password=''
ports:
- "8080:8080"

watcher:
<<: *fastpages
command: watchmedo shell-command --command /fastpages/action_entrypoint.sh --pattern *.ipynb --recursive --drop
Expand Down

0 comments on commit dd593d3

Please sign in to comment.