Jekyll: Difference between revisions
No edit summary |
No edit summary |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Web Hosting]] | |||
Follow the steps below to create a custom webpage on https://stat.cmu.edu under your own personal (/~yourusername) path using Jekyll. If you do not have a "stat.cmu.edu/~yourusername" site already, you must contact "remarks.stat.cmu.edu" for initial setup. | Follow the steps below to create a custom webpage on https://stat.cmu.edu under your own personal (/~yourusername) path using Jekyll. If you do not have a "stat.cmu.edu/~yourusername" site already, you must contact "remarks.stat.cmu.edu" for initial setup. | ||
These steps involve setting up a new folder for initial Jekyll files, editing the files for base functionality, then deploying the project. | |||
1 - Sign into the server. | 1 - Sign into the server. | ||
| Line 37: | Line 41: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
jekyll build --source ~/jekyllsetupfolder --destination ~/public_html | jekyll build --source ~/jekyllsetupfolder --destination ~/public_html | ||
</syntaxhighlight>You will need to run this if you install custom themes (run inside your jekyll project folder)<syntaxhighlight lang="bash"> | |||
bundle config set --local path 'vendor/bundle' | |||
</syntaxhighlight> | |||
== Using the academic-pages theme == | |||
The preferred theme for personal websites is the [https://github.com/academicpages/academicpages.github.io academic-pages] theme. To use this theme, follow these steps | |||
1 - Git clone the academic-pages repository into your home folder in <code>stat.cmu.edu</code> | |||
<syntaxhighlight lang="bash"> | |||
git clone https://github.com/academicpages/academicpages.github.io.git ~/my_website | |||
</syntaxhighlight>2 - Set gems to be installed locally, then install the required gems<syntaxhighlight lang="bash"> | |||
cd ~/my_website | |||
bundle config set --local path 'vendor/bundle' | |||
bundle install | |||
</syntaxhighlight>3 - Once you are done editing, build the website<syntaxhighlight lang="bash"> | |||
bundle exec jekyll build --source ~/my_website --destination ~/public_html | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 02:31, 30 June 2026
Follow the steps below to create a custom webpage on https://stat.cmu.edu under your own personal (/~yourusername) path using Jekyll. If you do not have a "stat.cmu.edu/~yourusername" site already, you must contact "remarks.stat.cmu.edu" for initial setup.
These steps involve setting up a new folder for initial Jekyll files, editing the files for base functionality, then deploying the project.
1 - Sign into the server.
ssh username@stat.cmu.edu2 - Initialize a new Jekyll projet folder. Do not use your "public_html" folder for this.
jekyll new ~/jekyllsetupfolder3 - Edit the URL parameters in the config file.
nano ~/jekyllsetupfolder/_config.ymlEdit the "baseurl" and "url" values in the yml file
baseurl: "/~yourusername" # the subpath of your site, e.g. /blog
url: "https://stat.cmu.edu" # the base hostname & protocol for your site, e.g. http://example.com4 - Generate the final project files in your "/public_html" folder.
jekyll build --source ~/jekyllsetupfolder --destination ~/public_html5 - Access your site in a web browser.
https://stat.cmu.edu/~yourusername
If you need to make changes to your site after taking it live, edit the files in your "jekyllsetupfolder".
Once you've made your changes, run the command below.
jekyll build --source ~/jekyllsetupfolder --destination ~/public_htmlYou will need to run this if you install custom themes (run inside your jekyll project folder)
bundle config set --local path 'vendor/bundle'Using the academic-pages theme
The preferred theme for personal websites is the academic-pages theme. To use this theme, follow these steps
1 - Git clone the academic-pages repository into your home folder in stat.cmu.edu
git clone https://github.com/academicpages/academicpages.github.io.git ~/my_website2 - Set gems to be installed locally, then install the required gems
cd ~/my_website
bundle config set --local path 'vendor/bundle'
bundle install3 - Once you are done editing, build the website
bundle exec jekyll build --source ~/my_website --destination ~/public_html