This is a repo of TCS course at the Innopolis University website. Feel free to contribute!
Table of contents
If you do not have the repo on your machine:
- Make sure you have git, hugo, and any code editor installed (VSCode is recommended, but you may use the one you prefer)
- Clone the repository with submodules:
(Note) If you have already clone this repo without submodules, run this from the source directory
$ git clone --recursive https://github.com/TCS-IU/TCS_labs.git
$ git submodule init && git submodule update
Now you can start contributing:
-
To start the website localy, run
$ hugo server --minify --theme=hugo-book
-
The last line in the terminal output should look like
Web Server is available at //localhost:some-port-number/ (bind address 127.0.0.1)
Visit
localhost:some-port-number
in your browser to access your local instance of the website. Now all of you changes in the website's source code should be propageted automatically. -
You are ready to rock!!! Make changes and contribute!
-
After you feel you have made enough changes, run
git add .
,
then
git commit -m "Your very informative message that describes the changes you've made"
.Note that this saves and documents changes on your machine only.
Important note!
Make sure to run git pull
before you make any new changes after you've pushed, so that you avoid creating merge conflicts.
Now that you have made your changes, you will need to properly submit them so that no merge conficts happen.
To do so:
- Switch to a new branch (if you haven't done that already):
Ex:
$ git checkout -b <branch>
git checkout -b lab11
- If you have any changes left uncommited, commit them as ususal
- Push your new branch to the server
It should push the branch normally. If not, send the error to the group.
$ git push origin <branch>
- Now go to the github repo
- Press "Pull requests"
- Press "New pull requests"
- Select the master branch on the left, and on the right. Make sure base & head repos are the same (that is TCS-IU/TCS_labs)
- Press "Create pull request"
- Describe what have you modified, maybe provide some suggestions for future imporvements
- Once done, press "Create pull request"
- Done! Admins will review your work and merge your changes into the main repo soon
This projects uses a handful of shortcodes. Shortcode (in a nutshell) is "mark" inside your markdown code that enables certain features within its code block. For example, you can define a codeblock of LaTeX code that renders LaTeX formulas. You can also define a codeblock that describes a structure of a graph. Below are example of these two.
How to write in LaTeX:
{{<katex>}}
your latex formula
{{</katex>}}
This produces an inline formula. If you want to center your formula, use display
property like so:
{{<katex display>}}
your centered latex formula
{{</katex>}}
How to create graphs:
- Take a look at Mermaid syntax
- Pick a graph you want to use
- Write neccesary code
Ex:
{{<mermaid>}}
gitGraph
commit
commit
branch develop
commit
commit
commit
checkout main
commit
commit
{{</mermaid>}}
This will produce a git graph. There are 12 other graph types you can use. Refer to Mermaid documentation for examples.
This project's shortcodes and their descriptions can be found in layouts/shortcodes
. They all use the same syntax:
{{<shortcode>}}
...stuff/..
{{</shortcode>}}
Try them out and see what you can build.
- The world’s fastest framework for building websites | Hugo (gohugo.io) - static website generator
- Introduction | Hugo Book (hugo-book-demo.netlify.app) - Hugo book theme
- KaTeX – The fastest math typesetting library for the web - LaTeX compiler
- PyScript | Run Python in your HTML - Client-side python runner embedded in the browser
- Pynecone: The easiest way to build web apps. - Helps us create interactive features with python (WIP)
- Develop and deploy websites and apps in record time | Netlify - Server host