Skip to content

Commit

Permalink
some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SallyMcGrath committed Dec 3, 2024
1 parent 3c7a9df commit cd98c92
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = 'Tasks'
time = 2
emoji= '🧩'
emoji= ''
[tasks]
1='Use the Teach Tech Together guide to construct your objectives'
2='Limit the objectives to 3-5 items'
Expand Down
37 changes: 37 additions & 0 deletions common-docs/content/common-theme/render-hooks/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
+++
title="Tasks"
description="Assign learning objectives via render hook"
emoji=""
menu=["hooks"]
+++

This is a [codefence render hook](https://gohugo.io/render-hooks/code-blocks/) that allows you to assign inert learning objectives to a page. It's for pages or content sources _outside_ Hugo. You can mark up a tasks checklist on a GitHub readme, say, and then render it as a list of objectives on the page.

Tasks are an inert form of learning objectives. They will be rendered on Hugo and GitHub as task lists. They will be shown in the learning objectives section on a block. But they will _not_ be tracked as learning objectives and won't be passed to the success criteria of a sprint.

> [!TIP]
> You probably want [objectives](./objectives) instead.
### Invoke

{{<columns>}}

````
```tasks
- [ ] Use the objectives render hook
- [ ] Three backticks ```
- [ ] The word objectives
- [ ] A list of objectives in a checklist
```
````

<--->

````tasks
- [ ] Use the objectives render hook
- [ ] Three backticks ```
- [ ] The word objectives
- [ ] A list of objectives in a checklist
````

{{</columns>}}
36 changes: 36 additions & 0 deletions common-docs/content/common-theme/shortcodes/objectives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
+++
title="Objectives"
description="Passing objectives from GitHub to Hugo"
emoji="🎯"
menu=["shortcodes"]
+++

```go
<!--{{</* objectives */>}}-->
- [ ] Objective 1
- [ ] Objective 2
- [ ] Objective 3
<!--{{</* /objectives */>}}-->
```

{{< objectives >}}

- [ ] Objective 1
- [ ] Objective 2
- [ ] Objective 3

{{< /objectives >}}

If you want to add objectives from a GitHub issue or readme into your success criteria, mark up a task list and wrap it in the `objectives` shortcode. Comment out the shortcode to hide it on GitHub.

This will render the task list on GitHub and will be picked up, rendered, and _tracked_ as learning objectives by Hugo. This means:

1. readmes: any learning objectives on any readme added to a prep or dayplan will be added to the success criteria of that sprint
1. issues: any learning objectives on the entire backlog page will be added to the success criteria of the sprint
1. any issues added as single blocks will be added to the success criteria of the sprint, unless they have already been tracked on the backlog page
1. on any issue or readme block, learning objectives will be removed from the body and shown in the learning objectives details instead

([Tasks](./tasks) will be rendered but not tracked.)

> [!TIP]
> Fenced objectives will also work like this on Hugo, but on GitHub will be plain text.
27 changes: 27 additions & 0 deletions common-docs/content/common-theme/shortcodes/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
+++
title="Tasks"
description="Inert objectives"
emoji=""
menu=["shortcodes"]
+++

```go
<!--{{</* tasks */>}}-->
- [ ] Objective 1
- [ ] Objective 2
- [ ] Objective 3
<!--{{</* /tasks */>}}-->
```

{{< tasks >}}

- [ ] Objective 1
- [ ] Objective 2
- [ ] Objective 3

{{< /tasks >}}

Tasks are learning objectives you want to render but not track. They will be rendered on Hugo and GitHub as task lists. They will be shown in the learning objectives section on a block. But they will NOT be tracked as learning objectives and won't be passed to the success criteria of a sprint.

> [!TIP]
> You probably want [objectives](./objectives) instead.
1 change: 1 addition & 0 deletions common-docs/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ main_org_name = "Code Your Future"
our_name="The Docs"
org = "https://github.com/CodeYourFuture"
repo = "https://github.com/CodeYourFuture/curriculum/"
owner = "CodeYourFuture"
root = "curriculum"
orgapi = "https://api.github.com/repos/CodeYourFuture"
[caches.getresource]
Expand Down

0 comments on commit cd98c92

Please sign in to comment.