Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Add logic and responses for private vs public course#95

Merged
brianamarie merged 5 commits into
masterfrom
private-vs-public
Oct 11, 2018
Merged

Add logic and responses for private vs public course#95
brianamarie merged 5 commits into
masterfrom
private-vs-public

Conversation

@brianamarie

Copy link
Copy Markdown
Contributor

This adds logic bestowed upon me by @JasonEtco to add different instructions based on if the course is private or public.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an error parsing your config.yml file.

YAMLException: missed comma between flow collection entries at line 9, column 6:
        {% if registration.private %}
         ^

@brianamarie

Copy link
Copy Markdown
Contributor Author

@JasonEtco As @beardofedu asked before I closed that issue (sorry) is there anything else we need to add here, or will it work out of the box?

Also, do you know why the build is failing or how to fix it?

@brianamarie
brianamarie requested a review from JasonEtco October 11, 2018 16:10
@JasonEtco

Copy link
Copy Markdown
Contributor

Oh I'm sorry @brianamarie I wasn't clear - that {% if... %} stuff goes in the markdown. So you'll need one response file, but two "code paths" in the markdown.

@beardofedu

beardofedu commented Oct 11, 2018

Copy link
Copy Markdown
Member

@brianamarie we actually use it in the .md file.

So something like:

Welcome to your {% if registration.private %} private repo!{% else %} repo! {% endif %}

So you don't need 2 different files, you just need to flag specific content within a file for either a public or private repo.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with your course have been found! You are good to go 🚀

@brianamarie

Copy link
Copy Markdown
Contributor Author

Is this right @beardofedu @JasonEtco?

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with your course have been found! You are good to go 🚀

@beardofedu

Copy link
Copy Markdown
Member

@brianamarie yea, keep in mind, the if/else acts as content blocks, so if you need a heading regardless of public or private, you would need something like:

### :keyboard: Activity: Enable vulnerability alerts & GitHub Pages

{% if registration.private %}

1. Click the **Settings** tab in your repository.
1. Scroll down until you see **Data services**.
1. Under **Data services**, click the check boxes to enable all the data services.
1. Scroll down to **GitHub Pages**. Select `master` as a **Source**, and click **Save**.

{% else %}

1. Click the **Settings** tab in your repository.
1. Scroll down to **GitHub Pages**. Select `master` as a **Source**, and click **Save**.

{% endif %}

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with your course have been found! You are good to go 🚀

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with your course have been found! You are good to go 🚀

@brianamarie
brianamarie merged commit 42b2258 into master Oct 11, 2018
@brianamarie
brianamarie deleted the private-vs-public branch October 11, 2018 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants