Skip to content

Commit

Permalink
fix: broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
zeim839 committed Jun 29, 2024
1 parent d76579c commit fb25105
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
8 changes: 4 additions & 4 deletions docs/website/legacy/Developers/API/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ This page is part of the documentation for release V1.0. This documentation is o
:::

The OSC website API exists to serve, create, modify, and delete dynamic resources, for instance:
1. Blog metadata and rendered HTML articles (documented in [Developers/API/blog](/docs/website/Developers/API/blog)).
2. Passing contact messages to the SMTP mail server (documented in [Developers/API/contact](/docs/website/Developers/API/contact)).
3. Serving the various editable forms (documented in [Developers/API/edit](/docs/website/Developers/API/edit)).
4. User authentication (documented in [Developers/API/users](/docs/website/Developers/API/users)).
1. Blog metadata and rendered HTML articles (documented in [Developers/API/blog](/docs/website/legacy/Developers/API/blog)).
2. Passing contact messages to the SMTP mail server (documented in [Developers/API/contact](/docs/website/legacy/Developers/API/contact)).
3. Serving the various editable forms (documented in [Developers/API/edit](/docs/website/legacy/Developers/API/edit)).
4. User authentication (documented in [Developers/API/users](/docs/website/legacy/Developers/API/users)).

In the source code, each route occupies a separate file in the [routes folder](https://github.com/ufosc/Club_Website_2/tree/main/routes), and all routes are subsequently organized in [routes/api.js](https://github.com/ufosc/Club_Website_2/blob/main/routes/api.js).

Expand Down
4 changes: 2 additions & 2 deletions docs/website/legacy/Developers/API/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 2
This page is part of the documentation for release V1.0. This documentation is outdated and V1.0 is no longer maintained. See [index](/docs/website/) for the latest information.
:::

The blog route interfaces with the blog [database model](/docs/website/Developers/Databases/models) and dynamically renders blog articles.
The blog route interfaces with the blog [database model](/docs/website/legacy/Developers/Databases/models) and dynamically renders blog articles.

:::tip routes/blog.js

Expand Down Expand Up @@ -66,7 +66,7 @@ curl -XGET 'https://ufosc.org/api/blog'

This route fetches articles by the specified URL ID parameter and returns them as rendered HTML. An error article is rendered if the ID is invalid or non-existent.

Articles whose status is not 'published' (e.g 'draft') are only visible to authenticated users. They do not render on the /blog page, but may be accessed by authenticated users if their ID is known. Generally, authenticated users may access these posts by clicking on the 'preview' button alongside their table entries in the [admin dashboard](/docs/website/admin).
Articles whose status is not 'published' (e.g 'draft') are only visible to authenticated users. They do not render on the /blog page, but may be accessed by authenticated users if their ID is known. Generally, authenticated users may access these posts by clicking on the 'preview' button alongside their table entries in the [admin dashboard](/docs/website/legacy/admin).

### Request Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/website/legacy/Developers/API/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The contact route is defined in [/routes/contact.js](https://github.com/ufosc/Cl

This route expects the contact form's field data (as JSON). If the data is successfully validated, it sends an email to the admin account notifying it of the new message, whilst also sending a receipt of the submitted form to the specified email address of the submitter.

Email protocol interfacing is achieved via an SMTP server, which receives and processes outgoing server mail. For configuration instructions, see [configuration](/docs/website/Developers/configuration).
Email protocol interfacing is achieved via an SMTP server, which receives and processes outgoing server mail. For configuration instructions, see [configuration](/docs/website/legacy/Developers/configuration).

### Request Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/website/legacy/Developers/API/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 6
This page is part of the documentation for release V1.0. This documentation is outdated and V1.0 is no longer maintained. See [index](/docs/website/) for the latest information.
:::

The users route interfaces with the users [database model](/docs/website/Developers/Databases/models) and serves users using their database ID.
The users route interfaces with the users [database model](/docs/website/legacy/Developers/Databases/models) and serves users using their database ID.

:::tip routes/users.js

Expand Down
4 changes: 2 additions & 2 deletions docs/website/legacy/Developers/Databases/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ The database's structure is defined by the following collections:

:::note

To learn more about using models with MongooseJS, see [Using MongoDB](/docs/website/Developers/Databases/mongodb).
To learn more about using models with MongooseJS, see [Using MongoDB](/docs/website/legacy/Developers/Databases/mongodb).

:::

Model instances are created and saved to the database in each model's corresponding API route.
* Blog posts are managed in [routes/blog.js](https://github.com/ufosc/Club_Website_2/blob/main/routes/blog.js).
* Users are managed in [routes/users.js](https://github.com/ufosc/Club_Website_2/blob/main/routes/users.js).

To learn more about routes, see [API & Routes](/docs/website/Developers/API/).
To learn more about routes, see [API & Routes](/docs/website/legacy/Developers/API/).
2 changes: 1 addition & 1 deletion docs/website/legacy/Developers/Databases/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This page is part of the documentation for release V1.0. This documentation is o

The website uses [MongoDB](https://www.mongodb.com/), a document-oriented database program, to fetch and serve information for the backend. When running in a development environment, the backend is automatically configured to connect to a public OSC testing database. This section documents the basic prolegomena of operating and managing the OSC Website database.

For the OSC testing URI, see [here](https://github.com/ufosc/Club_Website_2/blob/main/utils/config.js#L3) (note that the database is public and volatile, and not meant for production environments). For instructions on changing environments or configuring your own Mongo connection URI, see [here](/docs/website/Developers/configuration).
For the OSC testing URI, see [here](https://github.com/ufosc/Club_Website_2/blob/main/utils/config.js#L3) (note that the database is public and volatile, and not meant for production environments). For instructions on changing environments or configuring your own Mongo connection URI, see [here](/docs/website/legacy/Developers/configuration).

## Mongoose Basics

Expand Down
2 changes: 1 addition & 1 deletion docs/website/legacy/Developers/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sidebar_position: 6
This page is part of the documentation for release V1.0. This documentation is outdated and V1.0 is no longer maintained. See [index](/docs/website/) for the latest information.
:::

Caching allows the website's server to improve performance and preserve CPU by storing time-insensitive data in memory. Its most common use case is in serving the home and blog pages: instead of dynamically re-rendering the same page for each user request, it is rendered only once and then served from memory. Naturally, the cache updates its data after some predetermined time period, configurable by the [CACHE_INTERVAL](/docs/website/Developers/configuration#caching) environment variable.
Caching allows the website's server to improve performance and preserve CPU by storing time-insensitive data in memory. Its most common use case is in serving the home and blog pages: instead of dynamically re-rendering the same page for each user request, it is rendered only once and then served from memory. Naturally, the cache updates its data after some predetermined time period, configurable by the [CACHE_INTERVAL](/docs/website/legacy/Developers/configuration#caching) environment variable.

## Cache Module

Expand Down
6 changes: 3 additions & 3 deletions docs/website/legacy/Developers/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Kubernetes, often abbreviated as K8s, is an open-source container orchestration
Kubernetes is based on Docker, an open-source platform and a set of tools for creating, deploying, and managing containerized applications. To deploy the website on Kubernetes, you'll first need to build the website's container image.

## Prerequisites
1. Complete the [Getting Started](/docs/website/Developers/introduction) guide.
1. Complete the [Getting Started](/docs/website/legacy/Developers/introduction) guide.
2. [Docker](https://www.docker.com/): build the website container image.
3. Kubernetes Cluster & Kubectl: Use a cloud hosting platform or [launch a Kubernetes node on Docker](https://docs.docker.com/desktop/kubernetes/).

Expand Down Expand Up @@ -257,7 +257,7 @@ See Google's documentation [here](https://cloud.google.com/load-balancing/docs/u
## Creating an Admin
The Kubernetes config sets up the website with an empty database, which makes logging in to the site is impossible. This is solved by connecting to the Mongo container and calling mongosh to add the first user. This process should only be done once, additional admins can be added through the [admin dashboard](/docs/website/admin).
The Kubernetes config sets up the website with an empty database, which makes logging in to the site is impossible. This is solved by connecting to the Mongo container and calling mongosh to add the first user. This process should only be done once, additional admins can be added through the [admin dashboard](/docs/website/legacy/admin).
First, get a list of all pods
```bash
Expand Down Expand Up @@ -286,6 +286,6 @@ use test
db.users.insertOne({"username": "admin","password": {"hash": "�a2O���w��\u0004��Ȳ��7\u000fM�2\u0011�<\u0015z\u0016\u0019E*��cЮ\u0010\u001e\u0015���ւ)�Ne��G�VH/��9�����q\u0003�\t��פ}���i��Y�\u00125��d3�V�\t6������W;�~���?A��\u001c��X8��/\u0012��\u0007)t��9\u0001<","salt": "4vRF0ZTMELWmPGMpAgy6hsiJm/pOUlgPYFk+faK+yaFv/x0+lITG+4kX/y5bXudjMdGWLN2PV8UhH5s5dRLPaGgh2qwrbocDqEdyvbqSqVPAQxKIwFSytoRySYfKZJdCgK970UmrPDyGmoAIRZ/DN8YZ4fTirkSAeRlTWLSbyfg="},"fullName": "admin","role": "admin","isAdmin": true,"date": {"$date": "2023-09-17T15:53:18.529Z"},"__v": 0})
```

The command above adds a user with the username `admin` and password `123456`. You should now reset the admin's password using the [admin dashboard](/docs/website/admin) as soon as possible to prevent attackers from logging in with the default credentials. Resetting the password through the admin dashboard should reset the password salt as well.
The command above adds a user with the username `admin` and password `123456`. You should now reset the admin's password using the [admin dashboard](/docs/website/legacy/admin) as soon as possible to prevent attackers from logging in with the default credentials. Resetting the password through the admin dashboard should reset the password salt as well.

Finally, type `exit` and press enter to exit the mongosh console. Type `exit` and press enter once again to close the connection to the pod.
10 changes: 5 additions & 5 deletions docs/website/legacy/Developers/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ Any contribution to the OSC Website source code must pass testing and linting wo

Source code and documentation indices for currently available unit tests.

* Blog API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/blog.spec.js) or [Docs](/docs/website/Developers/API/blog).
* Cache Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/cache.spec.js) or [Docs](/docs/website/Developers/caching).
* Edit API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/edit.spec.js) or [Docs](/docs/website/Developers/API/edit).
* Users API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/users.spec.js) or [Docs](/docs/website/Developers/API/users).
* Blog API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/blog.spec.js) or [Docs](/docs/website/legacy/Developers/API/blog).
* Cache Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/cache.spec.js) or [Docs](/docs/website/legacy/Developers/caching).
* Edit API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/edit.spec.js) or [Docs](/docs/website/legacy/Developers/API/edit).
* Users API Route Tests: [GitHub](https://github.com/ufosc/Club_Website_2/blob/main/test/users.spec.js) or [Docs](/docs/website/legacy/Developers/API/users).

## Running Tests
:::danger

Tests are only meant to be ran on development environments. Do not use production databases in testing, their contents <b>risk being deleted</b>. To learn more about managing environments, see [Usage & Configuration](/docs/website/Developers/configuration).
Tests are only meant to be ran on development environments. Do not use production databases in testing, their contents <b>risk being deleted</b>. To learn more about managing environments, see [Usage & Configuration](/docs/website/legacy/Developers/configuration).

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/website/legacy/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This page is part of the documentation for release V1.0. This documentation is o

# Admin Dashboard

The OSC website implements a minimal content management system for managing site users, blog posts, and images. This section of the documentation is intended as a users guide. For developer documentation see the [developer guide](/docs/website/Developers/introduction).
The OSC website implements a minimal content management system for managing site users, blog posts, and images. This section of the documentation is intended as a users guide. For developer documentation see the [developer guide](/docs/website/legacy/Developers/introduction).

## Getting Started
:::info
Expand Down
4 changes: 2 additions & 2 deletions docs/website/legacy/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Routes are currently limited to 100-500 (may vary) requests per minute.
:::
:::note

The OSC Website API is intended for internal use only. Only non-authenticated public routes have been documented here. If you're seeking documentation for a self-hosted instance, refer to the [developers guide](/docs/website/Developers/API/) instead.
The OSC Website API is intended for internal use only. Only non-authenticated public routes have been documented here. If you're seeking documentation for a self-hosted instance, refer to the [developers guide](/docs/website/legacy/Developers/API/) instead.

:::

Expand Down Expand Up @@ -67,7 +67,7 @@ curl -XGET 'https://ufosc.org/api/blog'

This route fetches articles by the specified URL ID parameter and returns them as rendered HTML. An error article is rendered if the ID is invalid or non-existent.

Articles whose status is not 'published' (e.g 'draft') are only visible to authenticated users. They do not render on the /blog page, but may be accessed by authenticated users if their ID is known. Generally, authenticated users may access these posts by clicking on the 'preview' button alongside their table entries in the [admin dashboard](/docs/website/admin).
Articles whose status is not 'published' (e.g 'draft') are only visible to authenticated users. They do not render on the /blog page, but may be accessed by authenticated users if their ID is known. Generally, authenticated users may access these posts by clicking on the 'preview' button alongside their table entries in the [admin dashboard](/docs/website/legacy/admin).

### Request Parameters

Expand Down
6 changes: 3 additions & 3 deletions docs/website/legacy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ This page is part of the documentation for release V1.0. This documentation is o

This page hosts user and developer documentation for the official [OSC Website](https://ufosc.org).

* [Admin Dashboard](/docs/website/admin): User guide to using the website's built-in content management system.
* [Developers](/docs/website/Developers/introduction): Developer documentation for contributing/modifying the OSC website.
* [API Reference](/docs/website/api-reference): Reference of the site's public API.
* [Admin Dashboard](/docs/website/legacy/admin): User guide to using the website's built-in content management system.
* [Developers](/docs/website/legacy/Developers/introduction): Developer documentation for contributing/modifying the OSC website.
* [API Reference](/docs/website/legacy/api-reference): Reference of the site's public API.


You may find the project's source on [Github](https://github.com/ufosc/Club_Website_2) (subject to the [AGLP-3.0-or-later license](https://github.com/ufosc/Club_Website_2/blob/main/LICENSE.md)).

0 comments on commit fb25105

Please sign in to comment.