diff --git a/.gitignore b/.gitignore index 2992c23..6b1f14f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.sublime-workspace *.swp _site/ +.jekyll-cache/ \ No newline at end of file diff --git a/Gemfile b/Gemfile index ce80b9e..c52d6fd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ source 'https://rubygems.org' -gem 'jekyll' \ No newline at end of file +gem 'jekyll' +gem "webrick" diff --git a/Gemfile.lock b/Gemfile.lock index 7084051..be9d58e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/_includes/fundingfoot.html b/_includes/fundingfoot.html index 2dd6e7e..d5588cf 100644 --- a/_includes/fundingfoot.html +++ b/_includes/fundingfoot.html @@ -1,5 +1,5 @@
- +

The Austerweil Lab thanks its previous and current funders.

{% for image in site.static_files %} @@ -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; } \ No newline at end of file diff --git a/img/fundinglogos/ARL.png b/img/fundinglogos/ARL.png new file mode 100644 index 0000000..5da6b87 Binary files /dev/null and b/img/fundinglogos/ARL.png differ diff --git a/readme.md b/readme.md index 6355cf2..31d2de8 100644 --- a/readme.md +++ b/readme.md @@ -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. @@ -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. @@ -66,7 +82,7 @@ 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. ``` @@ -74,15 +90,15 @@ News posts in particular can be exclusively the YAML front matter, but they don' 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: ``` @@ -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: @@ -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: @@ -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 ) \ No newline at end of file + ]({{page.assets}}/image.jpg)