Giter VIP home page Giter VIP logo

docs.tryhackme.com's Introduction



TryHackMe Documentation

Officially maintained documentation for all TryHackMe products, services & resources.

Travis (.com) branch Coveralls github branch All Contributors Open GitHub issues License: MIT

๐Ÿ“š Read the documentation | Contributing to the documentation

Twitter: TryHackMe TryHackMe: Blog

Quick Links

๐Ÿ“š Documentation

The documentation can be accessed at https://docs.tryhackme.com.

๐Ÿ‘ Contributing

If you like the TryHackMe documentation and want to help make it better then check out our guidelines below! If you are simply interested in adding a new article, amending an existing article, or fixing any grammatical/formatting errors, then you can follow the instructions below.

Note: in order to contribute to the project you must have Node.js & NPM/Yarn installed. The Node.js binaries come with NPM bundled together, which can be downloaded at https://nodejs.org/download.

1. Clone repository and install dependencies

You can execute the commands below into your local terminal window.

$ git clone https://github.com/tryhackmeltd/docs.tryhackme.com.git  
$ cd ./docs.tryhackme.com-master  
$ yarn 

2. Start development server to run locally

Run the following in your local terminal window to start the local Node.js development server.
Ensure you are at the project's root directory (where package.json is located).

$ yarn start  

3. Editing <rootDir>/docs

All documentation markdown files (*.md), which together make up the content visible on the TryHackMe documentation site can be found within <rootDir>/docs.

Directories are treated as categories, and the markdown files are treated as articles, each belonging to a category. As an example, take docs/general/welcome; the general directory contains multiple markdown files (articles), which are treated as all belonging to the category general, which is their parent directory.

If you're adding a new article and feel it can be placed in an existing category, simply create a new markdown file My Article.md and drop it in the relevant directory. You need to make sure that you add the following header to any markdown file you add:

---  
id: article-id  
title: My Article Title  
sidebar_label: My Sidebar Label
---

As an example, let's say you want to add the article My Awesome Room to the existing category Rooms. First, you'd navigate to <rootDir>/docs/rooms. You are now in the Rooms category. Now, you'd create a markdown file in this directory called My Awesome Room.md and add the following header to the very top of the file:

---  
id: my-awesome-room  
title: My Awesome Room 
sidebar_label: My Awesome Room 
---
key description
id The article ID, ideally just a kebab-case version of the article's title, i.e. my-awesome-room
title The article's title, i.e. My Awesome Room
sidebar_label The title displayed in the sidebar, either the same as title or a shorter alternative

Now, save your changes, and if running the local development server you should be able to directly navigate to the document passing the URI docs/rooms/my-awesome-room. Note how the ID property is treated as the resource URI.

On the left of the document, there is the documentation sidebar, which looks something like this:

Example Sidebar

In order to add your new article to this sidebar, open <rootDir>/sidebars.js and locate the Rooms category. Then add the article to the items list, like so:

{
  type: 'category',
  label: 'Rooms',
  items: [
    'rooms/introduction-to-rooms',
    'rooms/room-difficulty-levels',
    'rooms/my-awesome-room' // ADD YOUR NEW ARTICLE REFERENCE HERE!
  ]
}

Once you are happy with your changes, save the file and re-visit the article in your browser. You will notice it should now appear on the sidebar! You can now open a pull-request to add your article to the live documentation site!

If you wish to create a new category, the process above is the same, except you add your articles to your newly created category directory! The only difference is you will need to create the category object within the <rootDir>/sidebars.js, rather than just appending the article to an existing one.

For example, let's say you wanted My Awesome Room to live inside a new Misc category, you'd create a directory called misc under <rootDir>/docs/, which would give you <rootDir>/docs/misc. Then, you'd add your my-awesome-room.md file inside this directory, ensuring you include the header as discussed before. Now, when editing <rootDir>/sidebars.js, you'd add a new object for the misc category, and then add your article as the first item in the items list, like so:

{
  type: 'category',
  label: 'Rooms',
  items: [
    'rooms/introduction-to-rooms',
    'rooms/room-difficulty-levels',
    'rooms/my-awesome-room'
  ]
},

/**
* ADD NEW MISC CATEGORY
*/
{
  type: 'category',
  label: 'Misc',
  items: [
    'misc/my-awesome-room' // ADDED NEW CATEGORY AND ARTICLE!
  ]
}

Lastly, if you would like to display your category (only for categories not articles) on the homepage of the site, add your config object to <rootDir/homepage-categories.js>. Simply open the file and append your category to the end of the array, ensuring you bump the id up 1 from the previous item. To add the misc category, you'd add the following:

module.exports = [
  {
    id: 1,
    title: 'Introduction',
    description: 'Just getting started with TryHackMe? Start here for a detailed introduction to our platform.',
    uri: '/docs/introduction/welcome'
  },
  {
    id: 2,
    title: 'What is TryHackMe?',
    description: 'Not entirely sure what TryHackMe is all about? This article will explain the core concepts behind what we offer.',
    uri: '/docs/introduction/what-is-tryhackme'
  },
  {
    id: 3,
    title: 'Why should I Join?',
    description: 'We know the reasons why you should join, but if you\'re still a bit sceptical then why not have a read.',
    uri: '/docs/introduction/why-should-i-join'
  },
  {
    id: 4,
    title: 'Getting Started',
    description: 'Want to get started with learning or teaching cyber security? This article is for you.',
    uri: '/docs/getting-started/introduction'
  },
  
  /**
  * ADDED THE MISC CATEGORY TO THE END OF THE LIST, INCREMENTING THE ID BY 1.
  */
  
  {
    id: 5,
    title: 'Misc',
    description: 'This is my new category that houses a lot of miscellaneous things.',
    uri: '/docs/misc/my-awesome-room' // THIS WILL BE THE URI TO THE FIRST ARTICLE IN THE CATEGORY, IN THIS CASE IT'S THE ONLY ARTICLE
  }

]

Once complete, commit your changes and open a pull request for us to review and merge.

Note: although adding and amending documentation markdown files should not affect any of the pre-existing unit tests, please ensure you check this prior to raising a pull request.

If you are making code edits, please ensure you update the relevant tests accordingly; including adding any tests to cover new functionality. Our TravisCI build expects 100% code coverage from Jest (with cirumstantial exceptions).

โ“ FAQ

If you have questions about TryHackMe or this documentation and want answers, then check out our Discord or connect with us on Twitter and Instagram!

Alternatively, you may also ask questions on our forums.

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Matt Kent

๐Ÿš‡ โš ๏ธ ๐Ÿ’ป ๐ŸŽจ ๐Ÿ“– ๐Ÿ› ๐Ÿ‘€

Ben Spring

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ ๐Ÿ‘€

MuirlandOracle

๐Ÿ“–

Ben Eriksson

๐Ÿ“–

Michael Spector

๐Ÿ“–

Swafox

๐Ÿ“–

James

๐Ÿ“– ๐Ÿ›

Chevalier

๐Ÿ“– ๐Ÿ›ก๏ธ

ashu-savani

๐Ÿ“–

Umair

๐Ÿ›

Zultan

๐Ÿ›

M. H.

๐Ÿ“–

Hardeep Singh

๐Ÿ“–

kaanis

๐Ÿ“– ๐Ÿ›

ABHIJITH P K

๐Ÿ›

Bee

๐Ÿ“–

Ari Yonaty

๐Ÿ›

Tony Kolstee

๐Ÿ“–

Shubh4nk

๐Ÿ“–

Swetabh Suman

๐Ÿ“– ๐Ÿ›

cyberseguridadnet

๐Ÿ›

This project follows the all-contributors specification. Contributions of any kind welcome!

License

The TryHackMe documentation source code is boilerplated from the Docusaurus OSS, and is made available under the MIT license. Please check nested dependencies for their relevant licenses; some may be BSD etc.


License: MIT

docs.tryhackme.com's People

Contributors

kent55 avatar allcontributors[bot] avatar ninjajc01 avatar snyk-bot avatar cmnatic avatar muirlandoracle avatar benspring avatar ashu-savani avatar umair9747 avatar tkolstee avatar swetabhofficial avatar 5h0bh4nk avatar michaelcoding25 avatar freezeluiz avatar holmes-py avatar chevalierongithub avatar bee-san avatar ariyonaty avatar ag3n7 avatar

Stargazers

Wen19z avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.