- Notifications
You must be signed in to change notification settings - Fork0
License
mathurlabstanford/metabias.io
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Based on theMinimal Mistakes Jekyll themeunder an MIT license.
See fullconfig.The following are the most important places where you need to make changes(see comments in these files also):
- edit
_config.ymlto update site metadata- most important settings (site title, name, url) are highlighted at the top,
- you can add Google Analytics tracking ID
- edit
_data/navigation.ymlto add more tabs to the top navigation: title and url (relative to site url) - edit
assets/css/main.scssto change customized colors and fonts.
# main links in _data/navigation.ymlmain: -title:"Publication bias"url:/pubbias/ -title:"p-hacking"url:/phacking/
Open thesite.Rproj file in RStudio IDE.Open Rmd files you'd like to edit. Click render.Jekyll will ignore Rmd, and will deploy html based on the md files.
Adding a new page undermetabias.io/path/dir/:
- create folder
path/dir - add
index.Rmdinto the folder (see below for what goes into the header) - Edit Rmd then render the md
This is the part that goes into the Rmd header of the filepath/dir/index.Rmd:
---title:Add your title herelayout:archiveoutput:md_document:variant:gfmpreserve_yaml:true---
Keeping thelayout andoutput is important, so that it will show up as expected after Jekyll renders the pages.
Note: if images are included as part of the Rmd, those will be placedrelative to theindex.Rmd file and need to be added to git.
Seethis cheat sheet for markdown formatting.
Here is how you can add a page for Shiny apps that are already deployed (see themetabias-apps repo for information on how to structure and deploy them).
Create new folder in the root, e.g.my-app and add anmy-app/index.md filewith the following content: change the app url
---layout:appapp_url:https://qsu-stanford.shinyapps.io/my-app/---
This will indicate to the Jekyll template to use theapp layout (which puts the iframe around the app URL). Theapp_url is the link that will show up in the iframe.
If the website is served over https, the iframe needs to be https as well.
GitHub pages use Jekyll, so no additional steps are required.Commit changes and it is done. Make sure you go to the Settings tabof the repo and set GitHub pages deployment from the root folder ofthe master/main branch.
Set up a www subdomain (e.g.www.new-domain.com) followingthis guide.
- Go to the Settings tab of the repo, scroll down to the GitHub Pages section
- Add
www.new-domain.comto the Custom Domain field and click Save - Go to your DNS settings on your provider's page (seehere)
- In the first field, enter
wwwor the required subdomain - In the dropdown menu, select CNAME
- In the TTL field, enter 1H
- In the data field, enter
mathurlabstanford.github.io - Click Add
To edit the outer framework exclusive of the Shiny app iframe itself (e.g., the Resources tab), just edit and knit the relevant .Rmd file, commit as normal (with no special message), and push. Remember you need to knit the .Rmd file or else the changes will not be reflected in the .md file, which is what the website ultimately uses.
- Changing font sizes: Edit per comments in
assests/css/main.scss. - Changing width of text on page (i.e., change whitespace on either side of text column): Edit per comments in
_sass/minimal_mistakes/_archive.scss.
Note: We are using the "archive" layout (_sass/minimal_mistakes/_archive.scss), so if you want to change a parameter that is normally in_page.scss, you should change it in_archive.scss instead.
Install jekyll (one time setup inside the directory): skip steps as appropriate, e.g. if you have Ruby installed etc (ruby -v should return Ruby version).See more about Ruby and Jekyll installationhere.
This will install jekyll toevalue_website/vendor. Important: To avoid errors inbundle install, the entire file path to ruby (which will be inevalue_website/vendor) needs to not have spaces in the directory names. Change them to underscores before the installation.
# Install Command Line Toolsxcode-select --install# Install Homebrew/bin/bash -c"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# Install Rubybrew install ruby# Add the brew ruby path to your shell configuration:PATH="`ruby -e'puts Gem.user_dir'`/bin:$PATH"# Install Jekyllgem install --user-install bundler jekyll# Install gems (dependencies) for the templatebundle install
When you edit your files and want to check locally how the site looks, first make sure you are in the top-level directoryevalue_website (where the jekyll files live) and then use this:
bundleexec jekyll serveThis will build the site that you can check athttp://127.0.0.1:4000 inyour browser. When you change the source it render the changesbut you have to click refresh in the browser to see the changes.Stop the server with Ctrl+C in the command line.
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.