From 7e31337d1d687704dd7707b322faf6b3f46b2367 Mon Sep 17 00:00:00 2001 From: damithc Date: Tue, 8 Aug 2023 13:28:19 +0800 Subject: [PATCH] Add baseUrl to embeds --- _course-CS2103/weeklyAdminTasks-fragment.md | 1 + admin/admin-tasks-fragment.md | 20 ++++++++++++++------ admin/common-tutorials-fragment.md | 2 +- admin/gradeBreakdown.md | 8 ++++---- admin/ip-tasks-fragment.md | 10 +++++----- admin/policies-fragment.md | 2 +- admin/tp-tasks-fragment.md | 4 ++-- admin/tutorials.md | 2 +- admin/weeklySchedule.md | 4 ++-- book | 2 +- common/macros.njk | 4 ++-- git-trail/index.md | 2 +- schedule/week4/notices-cs2103-fragment.md | 2 +- 13 files changed, 36 insertions(+), 27 deletions(-) diff --git a/_course-CS2103/weeklyAdminTasks-fragment.md b/_course-CS2103/weeklyAdminTasks-fragment.md index 1ee616eda..2a5b4d9b9 100644 --- a/_course-CS2103/weeklyAdminTasks-fragment.md +++ b/_course-CS2103/weeklyAdminTasks-fragment.md @@ -6,6 +6,7 @@ week1: [ {id: 'set_up_tools', deadline: "before the lecture"}, {id: 'submit_pre_course_survey', deadline: get_date(date_w1_start, 4), graded: true}, {id: 'learn_about_the_course'}, + {id: 'follow_the_git_learning_trail'}, {id: 'attend_the_first_lecture'} ], week2: [ diff --git a/admin/admin-tasks-fragment.md b/admin/admin-tasks-fragment.md index 386ffef14..ce71e10e2 100644 --- a/admin/admin-tasks-fragment.md +++ b/admin/admin-tasks-fragment.md @@ -14,7 +14,7 @@ * **Read prerequisite [{{ show_as_tab('Topics', icon_tab_topics) }}](../schedule/week1/topics.html)** allocated for week 1. **Submit `Week 1 Quiz`** (on Canvas) to test your knowledge of those topics. Ideally, finish the quiz before the first lecture, latest by the given deadline. The quiz is counted for participation. -{{ embed_topic("participation.md#main", "Admin " + icon_embedding + " **Participation**", "2", indent="2") }} +{{ embed_topic(baseUrl+"/admin/participation.md#main", "Admin " + icon_embedding + " **Participation**", "2", indent="2") }} {#====================================================================================================================#} @@ -28,7 +28,7 @@ The tools in the following panels are the same as what you used in TIC4001. -{{ embed_topic("programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="2") }} +{{ embed_topic(baseUrl+"/admin/programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="2") }} {{ embed_topic("tools.md#github", "Admin " + icon_embedding + " **Tools - GitHub**", "2", indent="2") }} {{ embed_topic("tools.md#rcs", "Admin " + icon_embedding + " **Tools - Git**", "2", indent="2") }} {{ embed_topic("tools.md#ide", "Admin " + icon_embedding + " **Tools - IDE**", "2", indent="2") }} @@ -59,17 +59,17 @@ The tools in the following panels differ slightly from TIC4001. The info in the following panels are as the same as TIC4001. -{{ embed_topic("courseExpectations.md#main", "Admin " + icon_embedding + " **Course expectations and ==topic levels==**", "1", indent="2", type="danger") }} +{{ embed_topic(baseUrl+"/admin/courseExpectations.md#main", "Admin " + icon_embedding + " **Course expectations and ==topic levels==**", "1", indent="2", type="danger") }} {{ embed_topic("usingThisWebsite.md#essential", "Admin " + icon_embedding + " **Using this website [essential info]**", "1", indent="2", type="danger") }} {{ embed_topic("usingThisWebsite.md#more", "Admin " + icon_embedding + " **Using this website [more info]**", "3", indent="2", type="info") }} {% if not (tic4001 or tic4002) %} -{{ embed_topic("weeklySchedule.md#main", "Admin " + icon_embedding + " **Weekly schedule**", "2", indent="2", type="warning") }} +{{ embed_topic(baseUrl+"/admin/weeklySchedule.md#main", "Admin " + icon_embedding + " **Weekly schedule**", "2", indent="2", type="warning") }} {% endif %} The info in the following panels differs from TIC4001. -{{ embed_topic("courseOverview.md#main", "Admin " + icon_embedding + " **Course overview**", "4", indent="2", type="success") }} +{{ embed_topic(baseUrl+"/admin/courseOverview.md#main", "Admin " + icon_embedding + " **Course overview**", "4", indent="2", type="success") }} {#====================================================================================================================#} Attend the first lecture @@ -77,7 +77,15 @@ The info in the following panels differs from TIC4001. * Attend the first lecture on {{ get_date(date_first_lecture, time='') }}(==**compulsory**==). -{{ embed_topic("lectures.md#main", "Admin " + icon_embedding + " **Lectures**", "1", indent="2") }} +{{ embed_topic(baseUrl+"/admin/lectures.md#main", "Admin " + icon_embedding + " **Lectures**", "1", indent="2") }} + + +{#====================================================================================================================#} +[Optional] Follow the Git learning trail +
+ +* If you have time to spare while waiting for the semester to start, and would like to get a headstart on learning Git and GitHub (used a lot in this course), you are welcome to follow the [Git Learning Trail]({{ baseUrl }}/git-trail.html).
+ Doing so is totally optional, as the same content will be covered during the subsequent weeks as well.
{#====================================================================================================================#} diff --git a/admin/common-tutorials-fragment.md b/admin/common-tutorials-fragment.md index a9a35f762..3d743da23 100644 --- a/admin/common-tutorials-fragment.md +++ b/admin/common-tutorials-fragment.md @@ -5,7 +5,7 @@ * Form teams, under the guidance of the tutor. See the panel below for _team forming constrains_ and other related info.
-{{ embed_topic("tp-teams.md#main", "Admin " + icon_embedding + " **Teams → Team Forming Constraints**", "2", indent="2") }} +{{ embed_topic(baseUrl+"/admin/tp-teams.md#main", "Admin " + icon_embedding + " **Teams → Team Forming Constraints**", "2", indent="2") }}
diff --git a/admin/gradeBreakdown.md b/admin/gradeBreakdown.md index 5b5136e68..a5030fb9b 100644 --- a/admin/gradeBreakdown.md +++ b/admin/gradeBreakdown.md @@ -23,13 +23,13 @@ skinparam backgroundcolor transparent @endwbs -{{ embed_topic("participation.md#main", "Admin " + icon_embedding + " Participation Marks", "3") }} +{{ embed_topic(baseUrl+"/admin/participation.md#main", "Admin " + icon_embedding + " Participation Marks", "3") }}

-{{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " Individual Project (iP) Grading", "3") }} +{{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " Individual Project (iP) Grading", "3") }}

-{{ embed_topic("tp-grading.md#main", "Admin " + icon_embedding + " Team Project (tP) Grading", "3") }} +{{ embed_topic(baseUrl+"/admin/tp-grading.md#main", "Admin " + icon_embedding + " Team Project (tP) Grading", "3") }}

-{{ embed_topic("exams.md#main", "Admin " + icon_embedding + " Exams", "3") if course not in ["TIC4001", "TIC4002"] else "" }} +{{ embed_topic(baseUrl+"/admin/exams.md#main", "Admin " + icon_embedding + " Exams", "3") if course not in ["TIC4001", "TIC4002"] else "" }}

diff --git a/admin/ip-tasks-fragment.md b/admin/ip-tasks-fragment.md index 9ade009c1..ae91dd972 100644 --- a/admin/ip-tasks-fragment.md +++ b/admin/ip-tasks-fragment.md @@ -398,8 +398,8 @@ If your fork doesn't have the `add-gradle-support` branch (i.e., you did not cop * **Read the following two sections**, if you haven't done so already: -{{ embed_topic("ip-overview.md#main", "Admin " + icon_embedding + " **iP - Overview**", "3", indent="1") }} -{{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }} +{{ embed_topic(baseUrl+"/admin/ip-overview.md#main", "Admin " + icon_embedding + " **iP - Overview**", "3", indent="1") }} +{{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }} {#====================================================================================================================#} Set up prerequisites @@ -407,7 +407,7 @@ If your fork doesn't have the `add-gradle-support` branch (i.e., you did not cop * **Ensure you have followed the :fas-hard-hat: Preparation sections of the following course tools:** -{{ embed_topic("programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="1") }} +{{ embed_topic(baseUrl+"/admin/programmingLanguages.md#main", "Admin " + icon_embedding + " **Programming Language**", "2", indent="1") }} {{ embed_topic("tools.md#rcs", "Admin " + icon_embedding + " **Tools → Git**", "2", indent="1") }} {{ embed_topic("tools.md#github", "Admin " + icon_embedding + " Tools → **GitHub**", "2", indent="1") }} {{ embed_topic("tools.md#ide", "Admin " + icon_embedding + " Tools → **Intellij IDEA**", "2", indent="1") }} @@ -421,7 +421,7 @@ If your fork doesn't have the `add-gradle-support` branch (i.e., you did not cop Read through this week's topics before starting the project.
**If you encounter technical problems** while doing the iP, follow the guidelines given below: -{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "2") }} +{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "2") }} 1. **Fork** [{{ url_course_org }}/{{ ip_repo_name }}]({{ url_course_org }}/{{ ip_repo_name }}), while noting the points below:
@@ -739,7 +739,7 @@ This activity is worth `2x2=4` participation points. * {{ icon_deadline }} **Soft deadline**: midnight before the tutorial {% endif %} 1. **Double-check to confirm your iP meets the criteria for for full marks**: - {{ embed_topic("ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }} + {{ embed_topic(baseUrl+"/admin/ip-grading.md#main", "Admin " + icon_embedding + " **iP - Grading**", "1", indent="1") }} 2. **Create a new jar file** * Create the JAR file {% if tic4002 or cs2103%}[using Gradle](https://se-education.org/guides/tutorials/gradle.html) -- this needs to be a [fat JAR file](https://se-education.org/guides/tutorials/jar.html#fat-jar-files:~:text=given%20here.-,Fat%20JAR%20files,-A%20normal%20JAR) (hence, it's best created [using Gradle's shadow plugin](https://se-education.org/guides/tutorials/jar.html#:~:text=Creating-,JAR%20files,With%20Gradle,-With%20Intellij%20IDEA)).{% else %}in one of these ways: * If you have added a GUI or using third-party libraries: [use Gradle](https://se-education.org/guides/tutorials/gradle.html). diff --git a/admin/policies-fragment.md b/admin/policies-fragment.md index 7cd0c3ffd..2f97a5fff 100644 --- a/admin/policies-fragment.md +++ b/admin/policies-fragment.md @@ -53,7 +53,7 @@ The promptness of a reply is even more important when the email is requesting yo %%Related: [[Admin: Appendix D: Getting Help](#admin-appendixD-help-anchor)]%% -{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "3") }} +{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "3") }} diff --git a/admin/tp-tasks-fragment.md b/admin/tp-tasks-fragment.md index 71015b750..b89f1ecd1 100644 --- a/admin/tp-tasks-fragment.md +++ b/admin/tp-tasks-fragment.md @@ -349,8 +349,8 @@ As we are still at the early stages of identifying a problem to solve, do not th -{{ embed_topic("tp-expectations.md#main", "Admin " + icon_embedding + " **tP: Expectations**", "3", indent="2") }} -{{ embed_topic("tp-constraints.md#main", "Admin " + icon_embedding + " **tP: Constraints**", "3", indent="2") }} +{{ embed_topic(baseUrl+"/admin/tp-expectations.md#main", "Admin " + icon_embedding + " **tP: Expectations**", "3", indent="2") }} +{{ embed_topic(baseUrl+"/admin/tp-constraints.md#main", "Admin " + icon_embedding + " **tP: Constraints**", "3", indent="2") }} {{ embed_topic("tp-grading.md#criteria-productDesign", "Admin " + icon_embedding + " **tP: Grading → ==Criteria Used for Grading the Product Design==**", "3", indent="2") }}
diff --git a/admin/tutorials.md b/admin/tutorials.md index c17560f16..ac662c1d6 100644 --- a/admin/tutorials.md +++ b/admin/tutorials.md @@ -79,7 +79,7 @@ * **No direct tech help**: Tutors are prohibited from giving direct technical help, other than to give you some general direction to finding a solution. %%Rationale: We want you to learn the vital survival skill of troubleshooting technical problems.%% -{{ embed_topic("appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "2", indent="1") }} +{{ embed_topic(baseUrl+"/admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: How to get Help in " + course_pair, "2", indent="1") }}
diff --git a/admin/weeklySchedule.md b/admin/weeklySchedule.md index e7e8bbf49..8c0f87a43 100644 --- a/admin/weeklySchedule.md +++ b/admin/weeklySchedule.md @@ -45,7 +45,7 @@ * get an introduction to the current week's topics * submit the in-lecture quiz/activities (if any) -{{ embed_topic("lectures.md#main", "Admin " + icon_embedding + " Lectures", "3", indent=2) }} +{{ embed_topic(baseUrl+"/admin/lectures.md#main", "Admin " + icon_embedding + " Lectures", "3", indent=2) }}

@@ -76,7 +76,7 @@ * demonstrate evidence of your learning weekly topics to the tutor * learn from peer demos of showing evidence of their own learning -{{ embed_topic("tutorials.md#main", "Admin " + icon_embedding + " Tutorials", "2", indent=2) }} +{{ embed_topic(baseUrl+"/admin/tutorials.md#main", "Admin " + icon_embedding + " Tutorials", "2", indent=2) }}

{{ icon_calendar }} **[End of tutorial - Start of lecture]**
diff --git a/book b/book index e61ceacdd..f8d64438b 160000 --- a/book +++ b/book @@ -1 +1 @@ -Subproject commit e61ceacdd51dd0f4fadd74938bb6272f7a283768 +Subproject commit f8d64438be2fba5f12c7bb4200de6523696a2ede diff --git a/common/macros.njk b/common/macros.njk index b7a25e0fa..5a089223c 100644 --- a/common/macros.njk +++ b/common/macros.njk @@ -46,7 +46,7 @@ {% set popup_url = "" %} {% set status = 'minimized' %} {% if '#main' in source or '#' not in source %} - {% set popup_url %}popup-url="{{ source | replace(".md", ".html") }}"{% endset %} + {% set popup_url %}popup-url="{{ baseUrl }}/{{ source | replace(".md", ".html") | replace("#main", "") }}"{% endset %} {% set status = 'collapsed' %} {% endif %} @@ -107,7 +107,7 @@ {% if indent != "0" %}

{% endif %} {% set popup_url = "" %} {% if '#main' in source or '#' not in source %} -{% set popup_url %}popup-url="{{ source | replace(".md", ".html") }}"{% endset %} +{% set popup_url %}popup-url="{{ source | replace(".md", ".html") | replace("#main", "") }}"{% endset %} {% if not status %}{% set status = 'collapsed'%}{% endif %} {% endif %} {% if not status %}{% set status = 'minimized'%}{% endif %} diff --git a/git-trail/index.md b/git-trail/index.md index 416da4442..4614a1678 100644 --- a/git-trail/index.md +++ b/git-trail/index.md @@ -28,7 +28,7 @@ pageNav: 4 # :fas-route: ++Git Learning Trail++{.text-success} -

This learning trail for those who are new to Git and would like to learn it in advance to prepare for the course.
+

This learning trail is for those who are new to Git and would like to learn it in advance to prepare for the course.
These topics are covered during the [regular course schedule](../schedule/timeline.html) and in the [course textbook](../se-book-adapted/index.html) as well. So, doing this in advance is optional, but doing so can reduce your workload during the regular semester.

diff --git a/schedule/week4/notices-cs2103-fragment.md b/schedule/week4/notices-cs2103-fragment.md index 9a9e2fcd4..b95cb0838 100644 --- a/schedule/week4/notices-cs2103-fragment.md +++ b/schedule/week4/notices-cs2103-fragment.md @@ -10,5 +10,5 @@ Do the following during the meeting: On a separate note, our guidelines on dealing with technical problems: -{{ embed_topic("../../admin/appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "4", indent="0") }} +{{ embed_topic(baseUrl+"/admin//appendixD-help.md#main", "Admin " + icon_embedding + " Appendix D: Getting Help", "4", indent="0") }}