-
Notifications
You must be signed in to change notification settings - Fork 12
Working with content
All content is stored in content directory. Each content file belongs to a class. The name of the class is the name of the sub-directory.
For example, the class ca-qc
is the class of content that will be served to people who answered they are located in Quebec.
The structure of this project is based on the following concepts:
The chatbot is composed of steps. Steps are chained. Each step specifies the next step. A step with a question (eg. "Do you have fever?" is followed by a step with a set of options (eg. Yes or No). The user selects an option and the system records a new fact (eg. Fever:Yes).
All facts are used as input to the rules engine. The rules are used to classify the set of facts into classes. For example, if there is a rule that states that if the facts include Fever:Yes, then this set of facts must be classified as "high-risk".
Each class represents a set of content files. Each class has its own subdirectory under src/content directory. A content file is a Markdown file that has a title, body and source. A filename of the content file must be in the form of filename.{language-code}.md
.
- Navigate to the content subdirectory
- Click on a file you want to edit
- Click on the edit button
- Click on "Preview changes" to make sure that the changes are formatted properly.
- Describe your change and make sure to select "Create a new branch"
- Click on "Commit changes" and take note of your
branch name
. In the image, the branch name isfeat/wiki-tutorial
.
If you want to update multiple files, go to the step updating multiple content files. If that is the only change that you wish to make, performs the steps under creating a pull request.
- Navigate to the file that you want to edit
- Important: make sure that you are on the same branch as you created in the previous step.
- Edit the file and save your changes. Make sure to select
commit directly to the branch
. - Repeat Steps 1-3 for all of the files that you wish to edit and when you are ready, perform the steps under creating a pull request.
Once you are happy with all of your changes, you will need to create a pull request (PR) to get your file changes from your branch
merged into master
. Once your PR will be created, the team will review it and if they approve of your changes, they will merge your PR into master
. Then, your changes will become available on the website.
- Make sure that you check that your pull request shows
master
on the left andyour branch
on the top right. - Additionally, to follow the convention, make sure that your PR starts with
feat:
for all content changes. - Click on "submit pull request" and you're all set!
The content served to uses is stored in text files in https://github.com/dialoguemd/covid-19/tree/master/src/content.
The files are placed in sub-sirectories. Each sub-directory corresponds to a "content class". A content class is a collection of content that will be served to all users that belong to a class. Which class a user belongs to is determined by the answers they provide.
- Decide on the class of your new file. Your content file needs to belong to an existing class.
- Navigate to the content subdirectory based on the class you have decided on
- Create a new file. All content files follow the Markdown format.
- Propose it via a Pull Request
Make sure to follow this format:
## Title
Your content goes here
[Source](https://link-to-the-source-of-the-content)
- The content is bi-lingual so you will often make two changes. The naming scheme is
filename.md
is English andfilename.fr.md
is French - The text of the file needs to have a title (the first line) and the source of the information (the last line)
- The last line of the file needs to be left blank