Watts-Lab / deliberation-website

public-facing website for the deliberation project
MIT License
0 stars 4 forks source link

Format code snippet in `tools` section. #12

Open JamesPHoughton opened 1 year ago

JamesPHoughton commented 1 year ago

In the "tools" tab we have a yaml code snippet for the experiment manifest that looks a bit out of place without better formatting:

image

I'm not sure what markdown renderer Jekyll is using, but would be good to format the code block in a similar way to how github does, eg. with a grey background, maybe a bit of indentation, and if possible, syntax highlighting.

- name: baseline_control
  desc: Listening study baseline condition
  playerCount: 2
  assignPositionsBy: random
  gameStages:
    - name: Intro
      type: prompt
      duration: 45
      elements:
        - intro_no_training.md
        - type: submitButton

    - name: Attitude Presurvey
      duration: 120
      elements:
        - urban_unrest_survey.md
        - type: submitButton

    - name: Discussion
      duration: 600
      chatType: video
      elements:
        - type: prompt
          file: urban_unrest_discussion.md
        - type: prompt
          file: instructions_listener.md
          showToPositions:
            - 0
        - type: prompt
          file: projects/weinstein_listening/instructions_speaker.md
          showToPositions:
            - 1

Ideally this should be done without too much change to the markdown file itself.

gumillie222 commented 1 year ago

Supposedly, ```yaml should auto format the code with highlighting, but not working for some reason.

helpful link: https://stackoverflow.com/questions/35759972/fenced-code-block-not-highlighted-properly

JamesPHoughton commented 1 year ago

Interesting. We set a markdown renderer in _config.yml as markdown:kramdown, but I don't know quite what that influences - it may talk to part of the jekyll agency theme that we're loading remotely (github fetches it).

I can either let you read more into this and try and figure it out, or we can ask the fellow who set up the template for me. What would you like to do? Are you stuck?

gumillie222 commented 1 year ago

I've tried it for a bit more but still haven't been able to figure it out, so help would be appreciated!

JamesPHoughton commented 1 year ago

@andriy0211 - sent you a message on upwork, let me know there if you're interested in this as a quick extension