diff --git a/content/about/code-of-conduct/ORDER.json b/content/about/code-of-conduct/ORDER.json new file mode 100644 index 00000000..54b9c834 --- /dev/null +++ b/content/about/code-of-conduct/ORDER.json @@ -0,0 +1,14 @@ +[ + "purpose", + "expected-behaviour", + "unacceptable-behaviour", + "experiencing-unacceptable-behaviour", + "consequences-of-inappropriate-behaviour", + "addressing-grievances", + "confidentiality", + "scope-and-spaces", + "contact-information", + "additional-information", + "license-information-and-attribution", + "revision" +] \ No newline at end of file diff --git a/content/about/code-of-conduct/additional-information.md b/content/about/code-of-conduct/additional-information.md index 9c8d86bc..8a4a0db9 100644 --- a/content/about/code-of-conduct/additional-information.md +++ b/content/about/code-of-conduct/additional-information.md @@ -1,6 +1,5 @@ --- title: Additional Information -index: 10 --- Additionally, the Executive Council are available to help Club members engage with local law enforcement or to otherwise help those experiencing unacceptable behaviour feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress. diff --git a/content/about/code-of-conduct/addressing-grievances.md b/content/about/code-of-conduct/addressing-grievances.md index 6afa11af..720abb4e 100644 --- a/content/about/code-of-conduct/addressing-grievances.md +++ b/content/about/code-of-conduct/addressing-grievances.md @@ -1,6 +1,5 @@ --- title: Addressing Grievances -index: 6 --- If either the complainant or the subject disagree with the decision made by the Handling Officer, they can appeal to the Officers, who can overturn the decision with a majority vote of all the Officers. diff --git a/content/about/code-of-conduct/confidentiality.md b/content/about/code-of-conduct/confidentiality.md index 4eb04083..f10dac62 100644 --- a/content/about/code-of-conduct/confidentiality.md +++ b/content/about/code-of-conduct/confidentiality.md @@ -1,6 +1,5 @@ --- title: Confidentiality -index: 7 --- The Club recognizes that all members have a right to privacy, and will handle complaints confidentially. diff --git a/content/about/code-of-conduct/consequences-of-inappropriate-behaviour.md b/content/about/code-of-conduct/consequences-of-inappropriate-behaviour.md index 37076377..948b7852 100644 --- a/content/about/code-of-conduct/consequences-of-inappropriate-behaviour.md +++ b/content/about/code-of-conduct/consequences-of-inappropriate-behaviour.md @@ -1,6 +1,5 @@ --- title: Consequences of Inappropriate Behaviour -index: 5 --- After having done so, the Handling Officer shall use their best judgment to determine if the complaint is valid and, if so, determine with the relevant Officers the appropriate action to ensure that the complainant feels welcome in the Computer Science Club and to avoid a subsequent incident: diff --git a/content/about/code-of-conduct/contact-information.md b/content/about/code-of-conduct/contact-information.md index 99e845b9..2d244d21 100644 --- a/content/about/code-of-conduct/contact-information.md +++ b/content/about/code-of-conduct/contact-information.md @@ -1,6 +1,5 @@ --- title: Contact Information -index: 9 --- - The Computer Science Club [Officers can be contacted as a whole](/about). diff --git a/content/about/code-of-conduct/expected-behaviour.md b/content/about/code-of-conduct/expected-behaviour.md index 91265485..887e4ba6 100644 --- a/content/about/code-of-conduct/expected-behaviour.md +++ b/content/about/code-of-conduct/expected-behaviour.md @@ -1,6 +1,5 @@ --- title: Expected Behaviour -index: 2 --- - Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this Club. diff --git a/content/about/code-of-conduct/experiencing-unacceptable-behaviour.md b/content/about/code-of-conduct/experiencing-unacceptable-behaviour.md index f5e0ad77..edb082bc 100644 --- a/content/about/code-of-conduct/experiencing-unacceptable-behaviour.md +++ b/content/about/code-of-conduct/experiencing-unacceptable-behaviour.md @@ -1,6 +1,5 @@ --- title: Experiencing Unacceptable Behaviour -index: 4 --- _The Executive Council and Faculty Advisor are herein referred to as the Officers, or singularly as Officer._ diff --git a/content/about/code-of-conduct/license-information-and-attribution.md b/content/about/code-of-conduct/license-information-and-attribution.md index c913c6f3..ed1af008 100644 --- a/content/about/code-of-conduct/license-information-and-attribution.md +++ b/content/about/code-of-conduct/license-information-and-attribution.md @@ -1,6 +1,5 @@ --- title: License Information and Attribution -index: 11 --- - The Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike License](http://creativecommons.org/licenses/by-sa/3.0/), derived from the [Women in Computer Science Code of Conduct](http://wics.uwaterloo.ca/deprecated/code-of-conduct/), the [UW Amateur Radio Club Code of Conduct](http://uwarc.uwaterloo.ca/policies-procedures/code-of-conduct/), and the [FASS Code of Conduct](http://fass.uwaterloo.ca/fassconstitution). diff --git a/content/about/code-of-conduct/purpose.md b/content/about/code-of-conduct/purpose.md index 8782acb7..3dd2adeb 100644 --- a/content/about/code-of-conduct/purpose.md +++ b/content/about/code-of-conduct/purpose.md @@ -1,6 +1,5 @@ --- title: Purpose -index: 1 --- One of the primary goals of the Computer Science Club of the University of Waterloo is the inclusion and support of all members of the University of Waterloo community who are interested in Computer Science. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sex, sexual orientation, ability, ethnicity, socioeconomic status, age, and religion or lack thereof. diff --git a/content/about/code-of-conduct/revision.md b/content/about/code-of-conduct/revision.md index 2d53ba2f..ed353e6b 100644 --- a/content/about/code-of-conduct/revision.md +++ b/content/about/code-of-conduct/revision.md @@ -1,6 +1,5 @@ --- title: Revision -index: 12 --- Revision 1.3, adopted by the Computer Science Club of the University of Waterloo on 25 January 2018. diff --git a/content/about/code-of-conduct/scope-and-spaces.md b/content/about/code-of-conduct/scope-and-spaces.md index 086017dc..d7484c69 100644 --- a/content/about/code-of-conduct/scope-and-spaces.md +++ b/content/about/code-of-conduct/scope-and-spaces.md @@ -1,6 +1,5 @@ --- title: Scope and Spaces -index: 8 --- In cases where the Code of Conduct contradicts University policies, or applicable laws and bylaws, the Code of Conduct does not apply to the extent to which it conflicts. diff --git a/content/about/code-of-conduct/unacceptable-behaviour.md b/content/about/code-of-conduct/unacceptable-behaviour.md index 03e771d3..92b9590b 100644 --- a/content/about/code-of-conduct/unacceptable-behaviour.md +++ b/content/about/code-of-conduct/unacceptable-behaviour.md @@ -1,6 +1,5 @@ --- title: Unacceptable Behaviour -index: 3 --- **Unacceptable behaviours include:** diff --git a/content/about/constitution/ORDER.json b/content/about/constitution/ORDER.json new file mode 100644 index 00000000..f31391a2 --- /dev/null +++ b/content/about/constitution/ORDER.json @@ -0,0 +1,16 @@ +[ + "name", + "purpose", + "membership", + "officers", + "duties-of-officers", + "executive-council", + "committees", + "meetings", + "finances", + "amendments-and-procedures", + "dissolution", + "code-of-conduct", + "use-of-club-resources", + "revision" +] \ No newline at end of file diff --git a/content/about/constitution/amendments-and-procedures.md b/content/about/constitution/amendments-and-procedures.md index fbaa0a9a..95415c4f 100644 --- a/content/about/constitution/amendments-and-procedures.md +++ b/content/about/constitution/amendments-and-procedures.md @@ -1,6 +1,5 @@ --- title: Amendments and Procedures -index: 10 --- 1. A proposed constitutional amendment can be initiated by the Executive Council or any ten (10) members. diff --git a/content/about/constitution/code-of-conduct.md b/content/about/constitution/code-of-conduct.md index ccba21ac..f330930b 100644 --- a/content/about/constitution/code-of-conduct.md +++ b/content/about/constitution/code-of-conduct.md @@ -1,6 +1,5 @@ --- title: Code of Conduct -index: 12 --- 1. The Club has a [Code of Conduct](/about/code-of-conduct). diff --git a/content/about/constitution/committees.md b/content/about/constitution/committees.md index 48fa7b17..83ed73d3 100644 --- a/content/about/constitution/committees.md +++ b/content/about/constitution/committees.md @@ -1,6 +1,5 @@ --- title: Committees -index: 7 --- ## Programme Committee diff --git a/content/about/constitution/dissolution.md b/content/about/constitution/dissolution.md index 0ca1a34e..0c1d9bc9 100644 --- a/content/about/constitution/dissolution.md +++ b/content/about/constitution/dissolution.md @@ -1,6 +1,5 @@ --- title: Dissolution -index: 11 --- 1. In the event of dissolution of the Club, all assets of the Club shall be transferred to the Mathematics Society of the University of Waterloo. diff --git a/content/about/constitution/duties-of-officers.md b/content/about/constitution/duties-of-officers.md index 454f459b..73e79b28 100644 --- a/content/about/constitution/duties-of-officers.md +++ b/content/about/constitution/duties-of-officers.md @@ -1,6 +1,5 @@ --- title: Duties of Officers -index: 5 --- 1. The duties of the President shall be: diff --git a/content/about/constitution/executive-council.md b/content/about/constitution/executive-council.md index 93e53013..7ac48537 100644 --- a/content/about/constitution/executive-council.md +++ b/content/about/constitution/executive-council.md @@ -1,6 +1,5 @@ --- title: Executive Council -index: 6 --- 1. The Executive Council shall consist of the present officers of the Club and the Faculty Advisor (as a non-voting member) and has the power to run the affairs of this club within the limits of this constitution. This includes the power to overrule or issue directions to any officer. diff --git a/content/about/constitution/finances.md b/content/about/constitution/finances.md index 0e77bcc8..42942c93 100644 --- a/content/about/constitution/finances.md +++ b/content/about/constitution/finances.md @@ -1,6 +1,5 @@ --- title: Finances -index: 9 --- 1. The Treasurer shall, each term, present to the Executive a financial statement for the previous term. They shall, before the end of the current term, ensure that the records are in a good condition to make this task as easy as possible for the next Treasurer. diff --git a/content/about/constitution/meetings.md b/content/about/constitution/meetings.md index 61139fab..669debf2 100644 --- a/content/about/constitution/meetings.md +++ b/content/about/constitution/meetings.md @@ -1,6 +1,5 @@ --- title: Meetings -index: 8 --- 1. A regular meeting of the Club shall be held each term. This meeting shall be called by the CRO and shall be the election meeting for that term. diff --git a/content/about/constitution/membership.md b/content/about/constitution/membership.md index 8a17368d..e3e777d6 100644 --- a/content/about/constitution/membership.md +++ b/content/about/constitution/membership.md @@ -1,6 +1,5 @@ --- title: Membership -index: 3 --- 1. In compliance with MathSoc regulations and in recognition of the club being primarily targeted at undergraduate students, full membership is open to all Social Members of the Mathematics Society and restricted to the same. diff --git a/content/about/constitution/name.md b/content/about/constitution/name.md index fe463bc3..965e10dd 100644 --- a/content/about/constitution/name.md +++ b/content/about/constitution/name.md @@ -1,6 +1,5 @@ --- title: Name -index: 1 --- The name of this organization shall be the "Computer Science Club of the University of Waterloo". diff --git a/content/about/constitution/officers.md b/content/about/constitution/officers.md index c08fbace..95965ca5 100644 --- a/content/about/constitution/officers.md +++ b/content/about/constitution/officers.md @@ -1,6 +1,5 @@ --- title: Officers -index: 4 --- 1. The officers of the Club shall be: diff --git a/content/about/constitution/purpose.md b/content/about/constitution/purpose.md index f8a4fc26..cc27104b 100644 --- a/content/about/constitution/purpose.md +++ b/content/about/constitution/purpose.md @@ -1,6 +1,5 @@ --- title: Purpose -index: 2 --- 1. The Club is organized and will be operated exclusively for educational and scientific purposes in furtherance of: diff --git a/content/about/constitution/revision.md b/content/about/constitution/revision.md index aeb40c51..fc4f475f 100644 --- a/content/about/constitution/revision.md +++ b/content/about/constitution/revision.md @@ -1,6 +1,5 @@ --- title: Revision -index: 14 --- The constitution was last revised on 25 January 2018. diff --git a/content/about/constitution/use-of-club-resources.md b/content/about/constitution/use-of-club-resources.md index 7be76a69..8fc15d78 100644 --- a/content/about/constitution/use-of-club-resources.md +++ b/content/about/constitution/use-of-club-resources.md @@ -1,6 +1,5 @@ --- title: Use of Club Resources -index: 13 --- 1. All resources under control of the Club are to be used in accordance with the aims of the Club. diff --git a/content/resources/machine-usage-agreement/ORDER.json b/content/resources/machine-usage-agreement/ORDER.json new file mode 100644 index 00000000..29116a43 --- /dev/null +++ b/content/resources/machine-usage-agreement/ORDER.json @@ -0,0 +1,11 @@ +[ + "summary", + "usage-policy", + "acceptable-and-unacceptable-use", + "user-responsibilities", + "security", + "rights-of-syscom-and-exec", + "club-accounts", + "definitions", + "user-agreement" +] \ No newline at end of file diff --git a/content/resources/machine-usage-agreement/acceptable-and-unacceptable-use.md b/content/resources/machine-usage-agreement/acceptable-and-unacceptable-use.md index 7db0bee3..29a25ea1 100644 --- a/content/resources/machine-usage-agreement/acceptable-and-unacceptable-use.md +++ b/content/resources/machine-usage-agreement/acceptable-and-unacceptable-use.md @@ -1,6 +1,5 @@ --- title: Acceptable and Unacceptable Use -index: 3 --- The CSC machines are intended for research, personal projects, and general use in accordance with the aims of the CSC (see the [CSC Constitution](/about/constitution) for further details). Projects that are of interest to the CSC may be given special priority by the CSC Systems Committee. diff --git a/content/resources/machine-usage-agreement/club-accounts.md b/content/resources/machine-usage-agreement/club-accounts.md index cd5ea4e2..68ff3022 100644 --- a/content/resources/machine-usage-agreement/club-accounts.md +++ b/content/resources/machine-usage-agreement/club-accounts.md @@ -1,6 +1,5 @@ --- title: Club Accounts -index: 7 --- The club accounts policy is divided into the following 2 sections: diff --git a/content/resources/machine-usage-agreement/definitions.md b/content/resources/machine-usage-agreement/definitions.md index 59be7a77..5816459e 100644 --- a/content/resources/machine-usage-agreement/definitions.md +++ b/content/resources/machine-usage-agreement/definitions.md @@ -1,6 +1,5 @@ --- title: Definitions -index: 8 --- CSC diff --git a/content/resources/machine-usage-agreement/rights-of-syscom-and-exec.md b/content/resources/machine-usage-agreement/rights-of-syscom-and-exec.md index 1fbb41fb..141e175f 100644 --- a/content/resources/machine-usage-agreement/rights-of-syscom-and-exec.md +++ b/content/resources/machine-usage-agreement/rights-of-syscom-and-exec.md @@ -1,6 +1,5 @@ --- title: Rights of the Systems Committee and the CSC Executive -index: 6 --- The Systems Committee may examine any files or programs believed to be out of control or in violation of the usage policies for the CSC network. Examination of a program includes examination of the running process and its binary. Files believed to be the data or source to the process may also be examined. The process may be killed, stopped or otherwise interrupted at the discretion of the Systems Committee. If the Systems Committee takes any of the above actions, the owner of the process will be notified. diff --git a/content/resources/machine-usage-agreement/security.md b/content/resources/machine-usage-agreement/security.md index 1d914225..2767f49c 100644 --- a/content/resources/machine-usage-agreement/security.md +++ b/content/resources/machine-usage-agreement/security.md @@ -1,6 +1,5 @@ --- title: Security -index: 5 --- Users may not attempt to gain access to accounts other than those which they have been permitted to use. Similarly, users may not attempt to access other users' private files, nor may they attempt to find out the password of any account. diff --git a/content/resources/machine-usage-agreement/summary.md b/content/resources/machine-usage-agreement/summary.md index 91cb9af2..eb23f2bd 100644 --- a/content/resources/machine-usage-agreement/summary.md +++ b/content/resources/machine-usage-agreement/summary.md @@ -1,6 +1,5 @@ --- title: Summary -index: 1 --- This is a brief version of the usage policy. Everyone who receives an account on one of the CS Club machines must sign the full Machine Usage Agreement, and this summary lists the things that the users will agree to. diff --git a/content/resources/machine-usage-agreement/usage-policy.md b/content/resources/machine-usage-agreement/usage-policy.md index 2d0fa9f8..f99e50c3 100644 --- a/content/resources/machine-usage-agreement/usage-policy.md +++ b/content/resources/machine-usage-agreement/usage-policy.md @@ -1,6 +1,5 @@ --- title: Usage Policy -index: 2 --- Everyone who receives an account on one of the CS Club machines must sign the agreement in the final section. This document does not state who will be allowed accounts on CS Club machines, the normal expiry period of accounts, nor any other similar matters. Further, this policy does not, in general, guarantee any rights to users. diff --git a/content/resources/machine-usage-agreement/user-agreement.md b/content/resources/machine-usage-agreement/user-agreement.md index e98b7ed5..2dfea61a 100644 --- a/content/resources/machine-usage-agreement/user-agreement.md +++ b/content/resources/machine-usage-agreement/user-agreement.md @@ -1,6 +1,5 @@ --- title: User Agreement -index: 9 --- I have read and understood the usage policy of 29 August 2007, and I agree to use my account(s) on the CSC network in accordance with this policy. I am responsible for all actions taken by anyone using this account. Furthermore, I accept full legal responsibility for all of the actions that I commit using the CSC network according to any and all applicable laws. diff --git a/content/resources/machine-usage-agreement/user-responsibilities.md b/content/resources/machine-usage-agreement/user-responsibilities.md index 7b3a5320..2ffc586e 100644 --- a/content/resources/machine-usage-agreement/user-responsibilities.md +++ b/content/resources/machine-usage-agreement/user-responsibilities.md @@ -1,6 +1,5 @@ --- title: User Responsibilities -index: 4 --- Users must be responsible for their behaviour. Users, and not the CSC, will be held accountable for any of their illegal, damaging or unethical actions. Such actions are obviously not permitted on CSC machines. diff --git a/content/resources/services/ORDER.json b/content/resources/services/ORDER.json new file mode 100644 index 00000000..f87de587 --- /dev/null +++ b/content/resources/services/ORDER.json @@ -0,0 +1,16 @@ +[ + "machine-accounts", + "cloud-accounts", + "cs-club-email", + "web-hosting", + "club-web-hosting", + "git-hosting", + "software-mirror", + "irc", + "mattermost", + "video-conferencing", + "live-streaming", + "in-office-books", + "mailing-lists", + "ssh-key-fingerprints" +] \ No newline at end of file diff --git a/content/resources/services/cloud-accounts.md b/content/resources/services/cloud-accounts.md index 6322cc69..0aded97c 100644 --- a/content/resources/services/cloud-accounts.md +++ b/content/resources/services/cloud-accounts.md @@ -1,6 +1,5 @@ --- title: Cloud Accounts -index: 2 --- With the CSC cloud, you can create your own virtual machines, host your Docker container images, and deploy your apps on Kubernetes. diff --git a/content/resources/services/club-web-hosting.md b/content/resources/services/club-web-hosting.md index c87290a7..bf0a088f 100644 --- a/content/resources/services/club-web-hosting.md +++ b/content/resources/services/club-web-hosting.md @@ -1,6 +1,5 @@ --- title: Club Web Hosting -index: 5 --- If you're a club and looking for web space, the CS Club is the place go. diff --git a/content/resources/services/cs-club-email.md b/content/resources/services/cs-club-email.md index 89c3bad3..22c25fa8 100644 --- a/content/resources/services/cs-club-email.md +++ b/content/resources/services/cs-club-email.md @@ -1,6 +1,5 @@ --- title: CS Club Email -index: 3 --- Members also receive a **[username@csclub.uwaterloo.ca](#)** email address. diff --git a/content/resources/services/git-hosting.md b/content/resources/services/git-hosting.md index cf929ab3..5de85851 100644 --- a/content/resources/services/git-hosting.md +++ b/content/resources/services/git-hosting.md @@ -1,6 +1,5 @@ --- title: Git Hosting -index: 6 --- We host an instance of [Gitea](https://git.csclub.uwaterloo.ca/) for all of our members. The UI and workflow of Gitea are very similar to GitHub. Gitea is currently home to most CSC software projects, including the [code for this website](https://git.csclub.uwaterloo.ca/www/www-new). diff --git a/content/resources/services/in-office-books.md b/content/resources/services/in-office-books.md index d3e4568a..aaf5bb32 100644 --- a/content/resources/services/in-office-books.md +++ b/content/resources/services/in-office-books.md @@ -1,6 +1,5 @@ --- title: In-Office Books -index: 12 --- The CS Club maintains an extensive collection of Computer Science-related books. Feel free to come by the office to take a look at our library. diff --git a/content/resources/services/irc.md b/content/resources/services/irc.md index cae4cdba..c69dc5a7 100644 --- a/content/resources/services/irc.md +++ b/content/resources/services/irc.md @@ -1,6 +1,5 @@ --- title: IRC -index: 8 --- We host an instance of [The Lounge](https://chat.csclub.uwaterloo.ca/) for all of our members. The Lounge is a web-based IRC client which is simple to setup and use. It also has a Progressive Web App available for mobile devices. diff --git a/content/resources/services/live-streaming.md b/content/resources/services/live-streaming.md index 41425ca9..fa16a7a3 100644 --- a/content/resources/services/live-streaming.md +++ b/content/resources/services/live-streaming.md @@ -1,6 +1,5 @@ --- title: Live Streaming -index: 11 --- We host an instance of [Icecast](https://icy.csclub.uwaterloo.ca/), which can stream live audio and video. We have successfully streamed live events to Icecast using OBS Studio. Latency usually ranges between 5-10 sec. diff --git a/content/resources/services/machine-accounts.md b/content/resources/services/machine-accounts.md index 0859481a..bdab6628 100644 --- a/content/resources/services/machine-accounts.md +++ b/content/resources/services/machine-accounts.md @@ -1,6 +1,5 @@ --- title: Machine Accounts -index: 1 --- The main benefit of becoming a CS Club member is to get access to our various machines. diff --git a/content/resources/services/mailing-lists.md b/content/resources/services/mailing-lists.md index 97605082..94acaec9 100644 --- a/content/resources/services/mailing-lists.md +++ b/content/resources/services/mailing-lists.md @@ -1,6 +1,5 @@ --- title: Mailing Lists -index: 13 --- Our [csc-general mailing list](https://mailman.csclub.uwaterloo.ca/postorius/lists/csc-general.csclub.uwaterloo.ca/) informs members about our current events. diff --git a/content/resources/services/mattermost.md b/content/resources/services/mattermost.md index a2eca17a..6d448228 100644 --- a/content/resources/services/mattermost.md +++ b/content/resources/services/mattermost.md @@ -1,6 +1,5 @@ --- title: Mattermost -index: 9 --- We host an instance of [Mattermost](https://mattermost.csclub.uwaterloo.ca/) for all of our members. Mattermost is an open-source alternative to Slack. We currently bridge the `#csc` channel on libera.chat to Mattermost (if you are looking for a generic web-based IRC client, see [The Lounge](/resources/services/irc)). CSC executives currently use Mattermost for planning and logistics. diff --git a/content/resources/services/software-mirror.md b/content/resources/services/software-mirror.md index ba9a31ad..bc927259 100644 --- a/content/resources/services/software-mirror.md +++ b/content/resources/services/software-mirror.md @@ -1,6 +1,5 @@ --- title: Software Mirror -index: 7 --- The CSC runs a mirror of popular open source software. The [mirror](http://mirror.csclub.uwaterloo.ca/) has a list of available software. More information is available on our [wiki article](http://wiki.csclub.uwaterloo.ca/Mirror). diff --git a/content/resources/services/ssh-key-fingerprints.md b/content/resources/services/ssh-key-fingerprints.md index cb4e994e..b7a599b3 100644 --- a/content/resources/services/ssh-key-fingerprints.md +++ b/content/resources/services/ssh-key-fingerprints.md @@ -1,6 +1,5 @@ --- title: SSH Key Fingerprints -index: 14 --- | Machine Name | Key Type | Fingerprint | diff --git a/content/resources/services/video-conferencing.md b/content/resources/services/video-conferencing.md index 8a9425ca..b99f381f 100644 --- a/content/resources/services/video-conferencing.md +++ b/content/resources/services/video-conferencing.md @@ -1,6 +1,5 @@ --- title: Video Conferencing -index: 10 --- We host an instance of [BigBlueButton](https://bbb.csclub.uwaterloo.ca/), a free and open-source video conferencing platform. BigBlueButton offers many useful features such as a multi-user whiteboard, breakout rooms, shared notes, and more. diff --git a/content/resources/services/web-hosting.md b/content/resources/services/web-hosting.md index b141379e..fade73fa 100644 --- a/content/resources/services/web-hosting.md +++ b/content/resources/services/web-hosting.md @@ -1,6 +1,5 @@ --- title: Web Hosting -index: 4 --- Many of members take advantage of our web hosting service. Our web server runs on Apache, and has PHP, Python, and Perl modules installed. We also have MySQL and PostgreSQL databases available upon request. diff --git a/lib/organized-content.ts b/lib/organized-content.ts index f277f6b7..7bd4938f 100644 --- a/lib/organized-content.ts +++ b/lib/organized-content.ts @@ -5,6 +5,7 @@ import matter from "gray-matter"; import { serialize } from "next-mdx-remote/serialize"; const BASE_PATH = "content"; +const ORDER_FILE = "ORDER.json"; export async function getSectionNamesForPage(page: string) { const sectionDir = path.join(BASE_PATH, page); @@ -15,17 +16,25 @@ export async function getSectionNamesForPage(page: string) { export async function getSectionsForPage(page: string) { const names = await getSectionNamesForPage(page); - const sections = await Promise.all( - names.map(async (name) => ({ + const order = await getSectionOrder(page); + + if (!isEquivalent(new Set(names), new Set(order))) { + throw new Error( + `${ORDER_FILE} must contain all sections defined for page ${page}` + ); + } + + const sections = names + .sort((a, b) => order.indexOf(a) - order.indexOf(b)) + .map(async (name) => ({ name, data: await getSectionForPage(page, name), - })) - ); + })); - return sections.sort((a, b) => a.data.index - b.data.index); + return await Promise.all(sections); } -export async function getSectionForPage(page: string, section: string) { +async function getSectionForPage(page: string, section: string) { const raw = await fs.readFile( path.join(BASE_PATH, page, `${section}.md`), "utf-8" @@ -35,6 +44,21 @@ export async function getSectionForPage(page: string, section: string) { return { content: await serialize(content), title: data.title as string, - index: data.index as number, }; } + +async function getSectionOrder(page: string) { + const raw = await fs.readFile( + path.join(BASE_PATH, page, ORDER_FILE), + "utf-8" + ); + + return JSON.parse(raw) as string[]; +} + +function isEquivalent(setA: Set, setB: Set): boolean { + const aContainsB = [...setB].every((b) => setA.has(b)); + const bContainsA = [...setA].every((a) => setB.has(a)); + + return aContainsB && bContainsA; +}