Skip to content

This is a repo of TCS course at the Innopolis University. Feel free to contribute!

Notifications You must be signed in to change notification settings

kemalkochekov/TCS_labs

 
 

Repository files navigation

Theoretical Computer Science course at Innopolis University:

This is a repo of TCS course at the Innopolis University website. Feel free to contribute!

Table of contents

How to contribute

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:
    $ git clone --recursive https://github.com/TCS-IU/TCS_labs.git
    
    (Note) If you have already clone this repo without submodules, run this from the source directory
    $ 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.

Pull requests

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):
    $ git checkout -b <branch>
    
    Ex: git checkout -b lab11
  • If you have any changes left uncommited, commit them as ususal
  • Push your new branch to the server
    $ git push origin <branch>
    
    It should push the branch normally. If not, send the error to the group.
  • 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

Shortcodes

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.

LaTeX

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>}}

Latex cheatsheet

Mermaid (graphs)

How to create graphs:

  1. Take a look at Mermaid syntax
  2. Pick a graph you want to use
  3. 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.

Other shortcodes

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.

Familiarize yourself with our techstack

About

This is a repo of TCS course at the Innopolis University. Feel free to contribute!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 61.5%
  • SCSS 29.6%
  • JavaScript 8.9%