Skip to content

Commit

Permalink
Merge pull request #4 from cksteven/master
Browse files Browse the repository at this point in the history
add ARL logo and update readme.md
  • Loading branch information
cksteven authored Sep 1, 2022
2 parents ea2019a + 688010d commit 063a0f7
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 95 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.sublime-workspace
*.swp
_site/
.jekyll-cache/
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
source 'https://rubygems.org'
gem 'jekyll'
gem 'jekyll'
gem "webrick"
83 changes: 43 additions & 40 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,66 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.4)
em-websocket (0.5.1)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
http_parser.rb (~> 0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.10.0)
ffi (1.10.0-x64-mingw32)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
jekyll (4.2.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.1.2)
terminal-table (~> 2.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1)
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)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.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)
public_suffix (5.0.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
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)
rexml (3.2.5)
rouge (3.30.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.8.0)
webrick (1.7.0)

PLATFORMS
ruby
x64-mingw32
arm64-darwin-21

DEPENDENCIES
jekyll
webrick

BUNDLED WITH
2.0.2
2.3.21
12 changes: 9 additions & 3 deletions _includes/fundingfoot.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id='fundingfoot'>

<p id='fundthanks'>The Austerweil Lab thanks its previous and current funders.</p>
<div id='fundlogos'>
{% for image in site.static_files %}
Expand All @@ -15,18 +15,24 @@
#fundthanks {
color: #B0BEC5;
}

.fundlogo {
max-height: 50px;
max-width: 90px;
margin: 0 2px;
}

#fundingfoot {
text-align: center;
}

#fundlogos {
margin: 0 2em;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
flex-wrap: wrap;
}

</style>
Binary file added img/fundinglogos/ARL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 56 additions & 51 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,48 @@

This page will provide some info on how to edit and deploy the lab website.



## How does Jekyll work?

[Jekyll](https://jekyllrb.com/) is a content management system for building static sites with a blog functionality. Basically, you edit code within Jekyll's framework, and Jekyll will automatically create a static site to your specification. This is really useful because you can programatically use things like html snippets, json data, etc, rather than hard-coding everything you need into each index page.

So to edit the website, you'll need to install Jekyll. I'm not going to write a whole tutorial on how it works, but there are lots of good ones online. Instead, I'll write some quick instructions on how to edit specific information.

To edit _anything_, you'll want to be running the Jekyll service in the background. So after you've downloaded the code and installed Jekyll (you'll also need ruby, ruby gems, and the gem bundler), you can install the packages we use for the page to your computer via:
### Notes on running Jekyll

To edit _anything_, you'll want to be running the Jekyll service in the background. So after you've downloaded the code and installed Jekyll (you'll also need ruby, ruby gems, and the gem bundler), you can install the packages we use for the page to your computer via:

```ruby
bundle install
```

If there are errors running that command, try delete the `./Gemfile.lock` file and run it again.

You only need to do that once, unless you start using other packages. Then you can run the service with

```ruby
bundle exec jekyll serve
bundle exec jekyll serve
```

Or just `jekyll serve`. Jekyll will then compile the website into a subdirectory (`_site/`) and you can visit it on localhost (`http://127.0.0.1:4000/`). Jekyll will monitor the files for changes, and will automatically recompile the website whenever you save a change. So just run that command and then you're good to go.

After you've made changes, you can just copy the contents of `_site/` into the root of our webserver (/volume1/web on luke) and the site _should_ work.
After you've made changes, you can just copy the contents of `_site/` into the root of our webserver (/volume1/web on luke) and the site _should_ work.

### Notes on deploying

After changes are made, you can terminate the server process (the `bundle exec jekyll serve` used above) and run the following commands to get a clean build:

```
jekyll clean
jekyll build
```

Then, connect to campus VPN (important!) and run this:

```
python send2luke.py
```

The prereq of this step is that you need to have a user account on Luke, our web server. Contact Kesong (as of fall 2022) if you need help.

## How to edit the lab members page.

Expand All @@ -36,7 +53,6 @@ I have stored all the information about lab members in a special directory: `_da

You can also see that I apply special CSS at the bottom of each page. That's just good to know if you can't figure out where in `css/style.css` a styling is applied.


## How to add a new paper.

Like in the people page, you should be able to add/edit lab papers using a json file: `_data/papers.json`. The html for this page is a bit more complex because I had to construct citations on the fly and add abstract toggling and tag functions, but you should be able to add and edit papers exclusively in the json file.
Expand Down Expand Up @@ -66,23 +82,23 @@ category: news
assets: /news/assets/location_of_post_assets
---
Some other content can go here! This will be visible to
Some other content can go here! This will be visible to
whoever clicks the link in the news post.
```

News posts in particular can be exclusively the YAML front matter, but they don't have to be.

Here's what the front matter items do:

| Field | Description |
| -------------- | ----------------------------------------------- |
| `title` | For news, this is the text that is shown on the main page. For projects, this will be the title of the project. |
| `excerpt` | This is set as the page meta description for SEO, but it might also come in handy if we ever need a quick abstract about the post. |
| `tags` | These are also used for SEO, but are additionally shown below the title of the page when you click the link to the post, so make sure they are appropriate. |
| `layout` | This references a specific HTML layout that I have written. It should always be the name of a file in `_layouts`. The one i have written, `post`, is very general and you shouldn't need to write a new one. |
| `category` | This will either be `news` or `projects`, depending on which you are writing.|
| `assets` | This is optional if it's a basic post, but important if you have images and other stuff, because it's where you specify the location of those assets. Do it by entering something like "assets: /news/assets/sample".|
| Field | Description |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | For news, this is the text that is shown on the main page. For projects, this will be the title of the project. |
| `excerpt` | This is set as the page meta description for SEO, but it might also come in handy if we ever need a quick abstract about the post. |
| `tags` | These are also used for SEO, but are additionally shown below the title of the page when you click the link to the post, so make sure they are appropriate. |
| `layout` | This references a specific HTML layout that I have written. It should always be the name of a file in `_layouts`. The one i have written, `post`, is very general and you shouldn't need to write a new one. |
| `category` | This will either be `news` or `projects`, depending on which you are writing. |
| `assets` | This is optional if it's a basic post, but important if you have images and other stuff, because it's where you specify the location of those assets. Do it by entering something like "assets: /news/assets/sample". |

The file also has to be named very particularly for Jekyll to interpret it. Here is how it should look:

```
Expand All @@ -99,10 +115,7 @@ To get these aspects going, you need to use some special syntax elements, descri

Syntax highlighting works as with any Github-flavored markdown:

```python
for i in range(3):
print(i)
```
``python for i in range(3): print(i) ``

That would produce this highlighting:

Expand Down Expand Up @@ -145,18 +158,17 @@ The default markdown table styling is _garbage_, so I have written special styli
My great markdown table:
{:.datatable}
| Column 1 | Column 2 |
| Column 1 | Column 2 |
| -------- | -------- |
| This | Table |
| Looks | Great! |
```


#### Images

Jekyll is particular about how files are organized, and so if you have locally hosted resources, such as images, you'll need to put them in a special place: `[projects|news]/assets/[post_name]/`. Then you'll need to reference those files in your post.

So, for example, if my post was in `/_posts/projects/2017-4-15-sample.md`, I would put my resources in `/projects/assets/sample/`.
So, for example, if my post was in `/_posts/projects/2017-4-15-sample.md`, I would put my resources in `/projects/assets/sample/`.

To make things a little easier, you can define the location of the page resources in your YAML frontmatter:

Expand Down Expand Up @@ -184,39 +196,32 @@ Putting all of that together, here's an example of a project post:
use_math: true
assets: /projects/assets/sample
---

Some introduction, blah blah blah. Here is some cush
ode:

```python
def BagelBites(time):
if time.lower() in ['morning','evening','suppertime']:
return('Pizza')
else:
raise Exception('When pizza\'s on a bagel, you can have pizza anytime!')
```

My special inline math: \\(y=mx+b\\)


``python def BagelBites(time): if time.lower() in ['morning','evening','suppertime']: return('Pizza') else: raise Exception('When pizza\'s on a bagel, you can have pizza anytime!') ``

My special inline math:\\(y=mx+b\\)

My special display math:
$$
e = mc^2
$$

$$
e = mc^2
$$

And, hey, look at this table!

{:.datatable}
| Column 1 | Column 2 |
| -------- | -------- |
| This | Table |
| Looks | Great! |
And an image!
![alt text]( {{page.assets}}/image.jpg )

| Column 1 | Column 2 |
| -------- | -------- |
| This | Table |
| Looks | Great! |

And an image!![alt text]({{page.assets}}/image.jpg)
*Add some caption here*

Or, for a linkable version of the image, enclose it in a [](), like so:
[![alt text]( {{page.assets}}/image.jpg )
Or, for a linkable version of the image, enclose it in a [](), like so:[![alt text]({{page.assets}}/image.jpg)
*Add some caption here*
]( {{page.assets}}/image.jpg )
]({{page.assets}}/image.jpg)

0 comments on commit 063a0f7

Please sign in to comment.