Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Very alpha docs upgrade #527

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/DeployPage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build and Deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fix URLs for PR preview deployment (pull request previews)
if: github.event_name == 'pull_request'
run: |
echo "PREVIEW_FRANKLIN_WEBSITE_URL=https://xenodochial-meninsky-43e5ec.netlify.app/previews/PR${{ github.event.number }}/" >> $GITHUB_ENV
echo "PREVIEW_FRANKLIN_PREPATH=previews/PR${{ github.event.number }}" >> $GITHUB_ENV
- name: Deploy (preview)
if: github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name # if this build is a PR build and the PR is NOT from a fork
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-preview
FOLDER: page/__site
TARGET_FOLDER: "previews/PR${{ github.event.number }}" # The website preview is going to be stored in a subfolder
- name: Deploy (main)
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages
FOLDER: page/__site
# NOTE: uncomment the following lines if you intend to use PyPlot
# - name: Install python
# uses: actions/setup-python@v1
# with:
# python-version: '3.8'
# - run: pip install matplotlib
- name: Install Julia
uses: julia-actions/setup-julia@v1
with:
version: 1 # Latest stable Julia version.
# NOTE
# Adjust the `input=""` on the last line to indicate where
# the source of the package page is (`page/` by default).
#
# Adjust also `output=""` on the last line if you want
# the page to be deployed in a specific folder on gh-pages
# if you do that, make sure that you adjust the `prepath`
# variable in `config.md` accordingly! so for instance
# if you set here `folder="web"` change prepath for
# `@def prepath = "YourPackage.jl/web"`
- run: julia -e '
using Pkg;
Pkg.add(["NodeJS", "PkgPage"]);
Pkg.develop("Symbolics");
using NodeJS;
run(`$(npm_cmd()) install highlight.js purgecss`);
import PkgPage;
PkgPage.optimize(input="page", output="")'
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages
FOLDER: page/__site
1 change: 1 addition & 0 deletions page/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__site
3 changes: 3 additions & 0 deletions page/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
Franklin = "713c75ef-9fc9-4b05-94a9-213340da978e"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
139 changes: 139 additions & 0 deletions page/_css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,400;0,700;0,900;1,300;1,400;1,600;1,700;1,900&family=Work+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap');
html, body {
font-family: 'Work Sans', serif;
}

h1 { color: #333; }
h1, h2, h3 {
font-family: 'Source Serif Pro';
}
.franklin-content li > p {
padding: 0;
margin: 0;
}

h2 { color: #3f3f3f; }

.franklin-content h1 {
margin-bottom: 0;
font-size: 1.66em;
border: none;
font-size: 2.24rem;
font-weight: 600;
}


.content {
padding-top: 0;
}
.franklin-content pre > code {
border: 1px solid #6B8E2340;
padding: 1.5em;
border-radius: 0;
}
pre.code-output {
background: #6B8E2340;
padding-left: 0.5em;
}

.code-output code {
border-radius: 0;
padding-left: 1em !important;
background: white;
}

.franklin-content .repl-block pre {
margin: 0;
}

.franklin-content .repl-block pre > code {
background: none;
padding: 0.5em;
padding-left: 0em;
border:none;
}
.franklin-content .repl-block {
padding: 1em 1em;
border: 2px solid #6B8E2340;
background: #fafafa;
border-radius: 0.5em;
margin-bottom: 1em;
}
.repl-block .cell-output {
padding-left: 1em;
color: #333;
padding-bottom: 0.5em;
font-family: monospace;
}
.repl-block .cell-output:empty {
display: none;
}
.repl-block .cell-output > code{
background: none;
}
.franklin-content .repl-block > p {
display: none;
}
.repl-block pre.code-output {
background: #6B8E2340;
padding-left: 0.5em;
}

.repl-block .julia-prompt {
color: #888;
display: inline;
padding-right: 1em;
padding-top: 0.33em;
font-size: 0.8em;
clear: both;
float: left;
font-family: monospace;
}

.code-output code {
border-radius: 0;
padding-left: 1em !important;
background: white;
}
.docstring {
border: 1px solid #f1f1f1;
padding: 1em;
margin-bottom: 2em;
}

.franklin-content .docstring h2.doc-header {
font-size: 1.25em;
color: #008080;
margin: 16px 0;
}

.franklin-content .docstring h1 {
font-size: 1.2em;
}
.franklin-content .docstring h2 {
font-size: 1em;
}

.docstring .doc-type {
font-size: 1em;
color: #6B8E2350;
float: right;
}

.franklin-content h2 {
border: none;
font-size: 1.5em;
margin-bottom: 0.2em;
}

.sidebar-about h1 {
font-family: 'Source Serif Pro', sans-serif;
font-style: italic;
opacity: 0.8;
font-size: 1.5em;
}

.lead {
display: none;
font-size: 0.96em;
}
Loading
Loading