Skip to content

Commit

Permalink
initial project page commit
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyichen committed Mar 6, 2024
0 parents commit f1f6a3f
Show file tree
Hide file tree
Showing 16 changed files with 587 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy project page to GitHub Pages

on:
# Runs on pushes to any branch with this workflow
push:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.gem
.bundle
.jekyll-cache
.sass-cache
_site
.jekyll-metadata
vendor
Gemfile.lock

33 changes: 33 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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!

# THis is using GitHub Pages, to upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 228", group: :jekyll_plugins
gem "webrick", "~> 1.8"
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-seo-tag"
gem "jekyll-remote-theme"
gem "jekyll-default-layout"
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]
107 changes: 107 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Getting Started

This project is designed to be both configurable and lightweight.
Most likely if you're using this as a project specific page, you only need one markdown file to describe the whole page.

**Do NOT fork this repo to use the template!**
This repo holds the remote-theme for GitHub Pages in an orphan branch and as a result, forking it means you are actually downloading much more than you need (even if the theme isn't that big).
Besides, it makes it more difficult to get running as a project page anyway!
All you should do is download the archive for one of the example branches (where you're reading this from right now!) and upload these files.
These examples are close to the minimal files needed.

If you are planning to use this to make an organization specific template, then forking is reasonable.
Just make sure to change the `remote_theme` key inside of `_config.yml` to match your organization's setup.
More information on that can be found at the [jekyll-remote-theme repo](https://github.com/benbalter/jekyll-remote-theme).

## Create an orphan branch and ensure that it is clean

You'll want to keep your website code separate from the history of your actual project.
To do this, first create an orphan branch and ensure it's clean of any other files.
It may be worth recloning your target repository onto another system to ensure you aren't adding extra gitignored files.

```bash
git switch --orphan gh-pages
# Check if you have any extra files
git status
# And make sure to delete them
```

Alternately, you can create a new folder and initialize it as a new git repo.
In this scenario, you can set the same remote repository as the upstream repo, and just make sure to commit the website files to a dedicated branch separate from the others.

## Extract these files to your desired location

From within your repository, execute the following commands.

```bash
wget "https://github.com/BuildingAtom/project-pages/archive/refs/heads/main-v1-examples.zip" -O /tmp/project-pages-starter.zip
unzip /tmp/project-pages-starter.zip -d /tmp/
rsync -a /tmp/project-pages-main-v1-examples/ ./
# Verify that you have .gitignore and .github copied
ls -la
```

I suggest `rsync` here because it's able to copy the hidden files that globbing with `mv` or `cp` run the risk of ignoring.
Windows users shouldn't have a problem with using Windows Explorer as that doesn't hide `.` prefixed files.
Just download the zip from the top if you're a Windows user and extract it to your desired repository location.

## Delete extra examples

These examples are obviously going to remain accessible through this repo.
Go ahead and delete them before you commit anything.

```bash
rm armour-dev.markdown sel_map.markdown
```

At this point, it's reasonable to make an initial commit on the orphan branch, so go ahead and do that.
A workflow is included in these files already, so this should trigger a github action, but it will likely fail to deploy.
Verify that your Pages section in Settings is set correctly as [per this tutorial](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).
*Note that you shouldn't need to create a new workflow.*
After that, verify that you have enabled deploy permissions for the `gh-pages` branch, or whichever name you used, to the `github-pages` environment under the Environments tab in Settings.

```bash
git commit -a -m "Initial project-pages template commit."
git push -u origin gh-pages
```

## (Optional) Get Jekyll running locally

Follow the [Jekyll installation instructions](https://jekyllrb.com/docs/installation/).
Then, inside of the repo folder, install and setup the required Gems with `Bundler`.
After that, you can launch the server (preferably with livereload because that makes life easier).

```bash
bundle install
bundle exec jekyll server --livereload
```

This way, any edits you make to anything but the Gemfiles and `_config.yml` will reload your browser window for you.

---

# Configuration

**There are 4 files:**
* `_config.yml`: Holds core key values that you'll want to configure first.
These are not reloaded during live preview and require a restart of the server whenever they're changed.
* `index.markdown`: Although this isn't solely a configuration file, the first part (the Front Matter) holds a lot of additional metadata that will need filling out.
There should be ample comments for both of the above.
* `_data/fonts.yml`: This is a font configuration file based on Google Fonts.
From the Google Fonts page, after you have selected whatever fonts you want, go to your selections in the top right, then go to the `Use on the web` section.
In that box there should be 3 lines.
Just copy the string associated with the last `href` tag and add that to the `google-fonts-href` list in this file.
The rest of the file is fairly self-explainable.
* `css/stylesheet.scss`: This holds variable definitions for a lot of the parameters that are used throughout the scss files.
Each of these should be self-explanatory, but change these to change the appearance of the site.

**Note**: In addition to `css/stylesheet.scss`, you can make your own `css/overrides.css` or `css/overrides.scss` file.
If it exists, this file is imported after `css/stylesheeet.scss` and can be used to override some of the style I have written.

If you wish to add plugins, check [GitHub Pages Dependency Versions](https://pages.github.com/versions/) to make sure your desired plugin is supported!

---

At this point, you have all the most basic initial configuration down!
Read through `index.markdown` to see what can be done in terms of actual contet.
The kramdown interpreter is used here, with the rouge code-highlighter.
60 changes: 60 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# User configuration file
# Important for initial setup
# The first three are needed for the project-pages theme.
plugins:
- jekyll-seo-tag # Easy SEO
- jekyll-remote-theme # So we can use the theme
- jekyll-default-layout # So we can use the theme easily
# If you have additional plugins, you can add them here.
# Make sure GitHub supports them here: https://pages.github.com/versions/

# Don't change! (or do change if you really want ig)
remote_theme: BuildingAtom/project-pages@v1.2-theme

# Metadata and SEO-helper stuff
# This title here should correspond to your base site or as a shared title
title: Reachability-based Trajectory Design via Exact Formulation of Implicit Neural Signed Distance Functions
baseurl: "/redefined" # the subpath of your site, e.g. /blog
url: "https://roahmlab.github.io" # the base hostname & protocol for your site, e.g. http://example.com
# This sets window title, not the title you read on the page
title-format: page-site # options are page-site, page, site.
lang: en

# Shenanigans from the template default because that's actually not a thing.
credit:
copyright-symbol: false
text: >- # supports markdown
[Project pages template](https://www.github.com/BuildingAtom/project-pages)
built by Adam Li / [@BuildingAtom](https://www.github.com/BuildingAtom)
# Hide the credits in the footer by setting this false.
show-credit: false

# Disable the footer by just setting the above false AND making the below blank
footer:
# connections-pre: # This prefixes the connections section at the botom.
# connections-post: Socials
connections:
github: https://github.com/roahmlab/redefined
# arxiv: # TODO


# Only leave the icon libraries you want to use enabled.
# The supported libraries are:
#
# simpleicons (no need to enable), bootstrap-icons, css.gg,
# ionicons, feathericons, academicons
#
# simpleicons doesn't require any extra loading.
icon-libraries:
- bootstrap-icons

# Keep mathjax disabled because it's a bit expensive. (Disabled by default)
# You can enable this on a page-by-page basis, if you somehow are using mutliple pages.
mathjax: false

# Code highlighter
highlighter: rouge

# There is room for extra SEO shenanigans. jekyll-seo-tag is included,
# so check out that repo to see what you can do.
38 changes: 38 additions & 0 deletions _data/fonts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Additional Fonts using Google Fonts (copy the last href from google fonts)
# Review README for more details.
google-fonts-href:
- "https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Cabin:wght@300;400;700&display=swap"
- "https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Sans+KR:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap"

# Specify your fonts for your site.
# If a section's font isn't specified, it will use the base font
# You can specify title-font, subtitle-font, heading-font.
# subtitle-font is used for the description
# Body font will always be the base-font.
base-font: >
"Noto Sans"
title-font: >
"Cabin"
subtitle-font: >
"Noto Sans"
heading-font: >
"Noto Sans"
# Additional font classes for inline usage can be specified below
fonts:
- class: jp
font: >
"Noto Sans JP"
- class: sc
font: >
"Noto Sans SC"
- class: kr
font: >
"Noto Sans KR"
- class: cabin
font: >
"Cabin"
Binary file added assets/REDEFINED_0.25s_scaled.mp4
Binary file not shown.
Binary file added assets/REDEFINED_0.30s_scaled.mp4
Binary file not shown.
Binary file added assets/REDEFINED_0.35s_scaled.mp4
Binary file not shown.
Binary file added assets/REDEFINED_overview.mp4
Binary file not shown.
Binary file added assets/REFINE_0.25s_scaled.mp4
Binary file not shown.
Binary file added assets/REFINE_0.30s_scaled.mp4
Binary file not shown.
Binary file added assets/REFINE_0.35s_scaled.mp4
Binary file not shown.
Binary file added assets/redefine_method_final-compressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions css/stylesheet.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# Import main from _sass
---

///////////////////////////////////////
// load fonts data here
// Change these values through _data/fonts.yml instead of here!
///////////////////////////////////////
$data-base-font: {{ site.data.fonts.base-font | strip }};
$data-title-font: {{ site.data.fonts.title-font | strip }};
$data-subtitle-font: {{ site.data.fonts.subtitle-font | strip }};
$data-heading-font: {{ site.data.fonts.heading-font | strip }};
$data-fonts: ({%- for font in site.data.fonts.fonts -%}{{ font.class }}: {{- font.font | strip -}}{%- unless forloop.last -%}, {%- endunless -%}{%- endfor -%});

///////////////////////////////////////
// Edit settings below here (ALL DEFAULTS SHOWN)
///////////////////////////////////////

// // full width of overall site
// $full-width: 1000px;
// $mobile-width: 500px;

// $base-font-size: 16px;
// $tablet-font-scale: 0.88;
// $mobile-font-scale: 0.75;
// $title-font-scale: 3.33;
// $description-font-size: 1.66em;
// $description-max-width: $full-width;
// $authors-base-font-size: 1.25em;
// $base-font-weight: 400;
// $small-font-size: 0.8rem;
// $base-line-height: 1.75;

// $spacing-unit: 1.8rem;

// //add themeing later
// $text-color: #111;
// $heading-color: #000000AA;
// $heading-weight: 300;
// $background-color: #fff;
// $link-color: #3B7CC1;

// $grey-color: #828282;

// // https://codepen.io/sosuke/pen/Pjoqqp if you want to change the color
// // #707070 here
// $social-icon-filter: invert(43%) sepia(3%) saturate(20%) hue-rotate(330deg) brightness(99%) contrast(87%);

// $table-text-align: left;

@import "{{ site.theme }}";
Loading

0 comments on commit f1f6a3f

Please sign in to comment.