Coder Social home page Coder Social logo

samanthacsik.github.io's People

Contributors

samanthacsik avatar jules32 avatar

Stargazers

Leting avatar LarryM avatar Tao Wen avatar Rob Wiederstein avatar Yousuf Ali avatar Rabia Karatoprak Ersen avatar Andrew Allen Bruce avatar  avatar Trevor Nishida avatar Justin Millar avatar  avatar stesiam avatar James Wolpe avatar Azuka Atum avatar Miguel Ribeiro avatar Alejandro Romero González avatar Kevin Hernández Rostrán avatar Jadey Ryan avatar Griffin Shelor avatar Daniel Borek avatar Ryan avatar Rafael González avatar Matt Leary avatar M. Fatih Tüzen avatar  avatar Andrew Villeneuve avatar Cristián Navarrete avatar shubhayan saha avatar Álex Espinosa-Correa avatar  avatar Sergio Sánchez Zavala avatar Shubham Shinde avatar Daphne Virlar-Knight avatar

Watchers

James Cloos avatar  avatar

samanthacsik.github.io's Issues

Porting website from distill to quarto

General steps:

  1. created new repo, samanthacsik-quarto-website that I'll eventually rename as samanthacsik.github.io once I decommission my distill site
  2. followed steps as outlined in the Create the scaffolding for your website section (I just went with the RStudio setup option)
  3. created .qmd file for my resources page, copied content over from .Rmd file and linked to navbar in _quarto.yml
  4. added blog following the steps outlined in #2

Misc.

  • install font awesome extension using the following in the command line:
    quarto install extension quarto-ext/fontawesome

Code chunks

  • update code chunk options = moving them from inside {} to hashpipes, #|; quarto uses - rather than _ as a separator and booleans are lowercase (e.g. true, false) rather than uppercase (e.g. TRUE, FALSE)

Blog post yaml differences:

  • note differences in author name, orcid, affiliation-url

Quarto:

title: title here
author:
   - name: Samantha Csik
   - orcid: ####-####-####-####
   - affiliation: Master of Environmental Data Science & the National Center for Ecological Analysis & Synthesis
   -  affiliation_url: https://bren.ucsb.edu/masters-programs/master-environmental-data-science

versus distill:

title: title here
author: 
   - first_name: "Samantha"
   - last_name: "Csik"
   - orcid_id: ####-####-####-####
   - affiliation: Master of Environmental Data Science & the National Center for Ecological Analysis & Synthesis
   - affiliation_url: https://bren.ucsb.edu/masters-programs/master-environmental-data-science
  • Quarto categories inside brackets ([cat1, cat2]) while distill is listed:
category:
    - cat1
    - cat 2
  • Quarto preview image option: image: preview_image.png vs. distill option: preview: preview_image.png

  • adding citation links:

citation: 
  url: https://samanthacsik.github.io/talks/2022-08-05-creating-your-personal-website-using-quarto/

Deploying

There may be a more sophisticated way of doing this, but these were the steps I took:

  1. My distill site was hosted for free via GitHub pages from the repo samanthacsik.github.io -- I first needed to free the domain name by unpublishing the distill website. To do this, go to Settings > Pages > click the three dots next to Visit Site > Unpublish site

Screen Shot 2022-09-04 at 1 49 21 PM

  1. Rename the original website repo something different (bc we'll need to rename the quarto website repo as samanthacsik.github.io. I renamed mine to samanthacsik-distill-site by going to Settings > General > Rename site (type new name in the box at the top of the page)

Screen Shot 2022-09-04 at 1 51 21 PM

  1. Go to the repo containing your quarto website and rename as samanthacsik.github.io.
  2. Go to Settings > Pages and deploy (make sure it's deploying from /docs and not /root

Logo

Created with Adobe Express Free Logo Service: https://www.adobe.com/express/create/logo

Fonts:

Montserrat Alternative, size 101.8 (thicker text)

  • Background: #98A08D
  • Line: #ABB69B
  • Text: #FDFBF7
    logo

Lato Hairline, size 132 (thinner text)

  • Background: #98A08D
  • Line: #ABB69B
  • Text: #FDFBF7
    logo_thin

Relief Single Line Regular, size 294.3 (short logo)

  • Background: #98A08D
  • Text & Icon: #ECEFE1
    logo_short

Montserrat, size 132

  • Background: #98A08D
  • Line: #D1D9CE
  • Text: #FDFBF7
    logo_montserrat

Centering buttons help

Yes I was stalking your website late at night for inspiration, I won't apologize! 🤪

Anyways... I saw in your index.qmd for your customizing quarto workshop page that you tried to center some buttons but that it didn't work (since they aren't centered on your site).

I would like to oh-so-humbly recommend the use of the following code:

<center>
   [your button code]
   [your second button code]
</center>

I used that on a page I'm still developing and it worked out 👀 okay bye!

Steps for adding a blog

  1. create subdirectory in your website project called posts -- this is where your blog posts will eventually live
  2. add a _metadata.yml file to your posts directory using touch _metadata.yml in the terminal -- options specified in this file will apply to all documents inside the posts folder. NOTE: this is not required, but can make your life easier if you want certain options to apply to all blog posts that you create. You may want to start with the following options:
# options specified here will apply to all posts in this folder

# freeze computational output
# (see https://quarto.org/docs/projects/code-execution.html#freeze)
freeze: true

# Enable banner style title blocks
title-block-banner: true
  1. add a posts.qmd to root directory -- this is your "listing page" where all your blog post previews will appear
  2. modify the yaml of posts.qmd (just some options included below, not all are necessary, some are set to defaults):
---
title: "posts"
listing:
  contents: posts
  sort: "date desc"
  type: grid
  grid-item-border: true
  grid-item-align: left
  max-description-length: 175
  date-format: medium
  categories: true
---
  1. add your listing page, posts.qmd to your website's navbar in _quarto.yml
  2. to add your first blog post, create a subdirectory inside your posts folder and add an index.qmd file to that subdirectory (e.g. posts/my_first_blog_post/index.qmd)
  3. Some yaml options to consider including for individual post index.qmd files:
---
title: "blog post title"
description: |
  blog post description (appears underneath the title in smaller text) which is included on the listing page
author: "Samantha Csik"
date: 09-24-2021
categories: [distill, R] # self-defined categories
image: preview_image.jpg
---
  1. Important: for a blog post to show up on your rendered website, you need to Render the index.qmd file before you build your site using the Render Website button. You only need to do this the first time you publish your post, unless your specify freeze: true and subsequently make changes to your post.

Learning about APIs :)

Needed a place to job down random things; need to organize better soom.

{httr2} package

HTTP protocol: there's a url that specifies the location + there can then be query parameters, which are designated by a ? + anything that follows

E.g. UC Census Bureau (not a very nicely-documented API...)
api.census.gov/data/2021/pep/population?get=DENSITY_2021,POP_2021,NAME,STATE&for=region:*&key=YOUR_KEY

  • api.census.gov/data/2021/pep/population: API endpoint, which correesponds to a resource that a server knows how to provide back; in this case, that resource is the 2021 pop estimate
  • ?get=DENSITY_2021,POP_2021,NAME,STATE&for=region:*&key=YOUR_KEY: this is the query string that contains all of the parameters (variables) that are being passed in this example API call that affect the output of the request
  • get, for, key: all accepted query string parameters
  • get accepts a list of strings, for accepts a string, and key is your API key

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.