Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .eslintignore
Empty file.
36 changes: 0 additions & 36 deletions .eslintrc.js

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ dist
.eslintcache
.stylelintcache
package-lock.json

# Production
/build

# Generated files
.docusaurus
.cache-loader
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.cache
.docusaurus/
.cache-loader
/__tmp__/
/dist/
src/.temp
Expand Down
1 change: 0 additions & 1 deletion .stylelintignore

This file was deleted.

33 changes: 0 additions & 33 deletions .textlintrc.js

This file was deleted.

9 changes: 0 additions & 9 deletions .vscode/settings.json

This file was deleted.

3 changes: 1 addition & 2 deletions LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MIT License

Copyright (c) 2020 Qualified, Inc
Copyright (c) 2020 Marco Reimann ([docc](https://github.com/mrcrmn/docc) starter)
Copyright (c) 2020 Qualified, Inc

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 0 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
# Codewars Docs

> New documentation for Codewars. Still work in progress.

## Taxonomy

Documents are classified with the following:

- `Kind` (`kind`): By kind of documentation (`recipe`, `reference`, `tutorial`, etc.) See [kinds.yml].
- `Tag` (`tags`): By tags associated with the documentation. See [tags.yml].
- `Language` (`languages`): A special kind of `Tag` that is used to collect documents to show on the language page

## Routes

- `/tutorials/`: All docs with kind `tutorial`
- `/recipes/`: All docs with kind `recipe`
- `/references/`: All docs with kind `reference`
- `/tags/`: List of all tags
- `/tags/:id`: List of docs with tag `id`
- `/languages/`: List of supported languages
- `/languages/:id`: Show language information
- Sidebar lists all pages referencing the language, grouped by `kind`

Markdown files matching `content/**/*.md` generates matching routes. For example, `content/foo/bar.md` generates `/foo/bar/`.

---

Built with [Gridsome](https://gridsome.org/) using [docc](https://github.com/mrcrmn/docc) starter.

[kinds.yml]: ./data/kinds.yml
[tags.yml]: ./data/tags.yml
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
6 changes: 2 additions & 4 deletions content/authoring/index.md → content/authoring.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
sidebar: authoring
next: /authoring/kata/
title: Authoring Content
slug: /authoring
---

# Authoring of Codewars Content

All content available on Codewars is created by members of the Codewars community. It's ideas of Codewars users that get turned into kata, and the fact that users are familiar with plenty of programming languages allows for a large number of available translations.

This section of the documentation is meant mostly for authors and translators who would like to introduce new challenges and make them available for other Codewars users. Creating a kata or translating it, even an easy one, is a difficult task. It requires a much wider set of skills compared to that of just solving a kata. Unlike problem solvers, authors need to master skills related to software development in general, as well as problem design, writing good test suites, documenting the task and its requirements, and communicating with reviewers.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
title: Content Authoring Guidelines
kind: reference
sidebar: authoring
prev: /authoring/translation/
next: /authoring/guidelines/description/
---

# Content Authoring Guidelines

## Overview

This set of pages contains guidelines for kata authors and translators to help them create kata, translations, and kumite which adhere to the community's quality standards.
Expand Down
5 changes: 1 addition & 4 deletions content/authoring/guidelines/coding.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
title: General Kata Coding Guidelines
kind: reference
sidebar: authoring
prev: /authoring/guidelines/description/
next: /authoring/guidelines/sample-tests/
---

# General Kata Coding Guidelines

Coding guidelines can be a controversial topic for programmers. Programmers like them, and programmers hate them. Programmers fight for them, and they fight against them. Coding guidelines can be very helpful, but can be also very difficult to define, establish, follow, and enforce.

Expand Down
6 changes: 1 addition & 5 deletions content/authoring/guidelines/description.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
title: Writing a Kata Description
kind: reference
sidebar: authoring
prev: /authoring/guidelines/
next: /authoring/guidelines/coding/
---

# Writing a Kata Description

The kata description, created by the kata author, is a crucial part of every kata, presenting the task and all requirements to a user attempting it. Descriptions should be written with special attention. Unclear descriptions are a common cause of a poor user experience with a kata. To ensure the quality of the kata, its description should conform to the guidelines presented below.


Expand Down
5 changes: 1 addition & 4 deletions content/authoring/guidelines/kata.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
title: Kata Authoring Guidelines
kind: reference
sidebar: authoring
prev: /authoring/guidelines/translation/
---

# Kata Authoring Guidelines

This article contains a set of guidelines, which can be used by authors to create good, enjoyable, high-quality kata. They were collected to help ensure that kata are of sufficient quality and users' experience will be as good as possible.


Expand Down
6 changes: 1 addition & 5 deletions content/authoring/guidelines/preloaded.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
title: Writing Preloaded Code
kind: reference
sidebar: authoring
prev: /authoring/guidelines/submission-tests/
next: /authoring/guidelines/reference-solution/
---

# Writing Preloaded Code

The preloaded code snippet, created by the kata author or translator, can be used to reduce boilerplate code, but can cause problems when used incorrectly. To ensure the quality of the kata, it should conform to a set of guidelines presented below.

This article contains a set of guidelines for kata authors and translators to create good code snippets for their kata. They were collected to help ensure that kata and translations are of sufficient quality and kata maintenance will be as easy as possible.
Expand Down
4 changes: 1 addition & 3 deletions content/authoring/guidelines/reference-solution.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
title: Writing a Reference Solution
kind: reference
sidebar: authoring
prev: /authoring/guidelines/preloaded/
next: /authoring/guidelines/translation/
---

# Writing a Reference Solution

:::note
On this page, the term "Reference Solution" refers to a separate code snippet provided by a kata author or translator, which is used by Codewars to verify the correctness of the kata while it's being published.
Expand Down
6 changes: 1 addition & 5 deletions content/authoring/guidelines/sample-tests.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
title: Writing Sample Tests
kind: reference
sidebar: authoring
prev: /authoring/guidelines/coding/
next: /authoring/guidelines/submission-tests/
---

# Writing Sample Tests

Sample tests are a part of every kata which is often underappreciated by both kata authors and solvers. Bad sample tests can cause a lot of frustration, while a good suite of them often increases the overall satisfaction of users from solving the kata. To make sample tests as good as possible, follow the guidelines collected below.

- **Conform to [General Coding Guidelines][authoring-guidelines-general-coding]**: tests should adhere to code quality standards as much as any other provided code.
Expand Down
11 changes: 5 additions & 6 deletions content/authoring/guidelines/submission-tests.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---
title: Writing Submission Tests
kind: reference
sidebar: authoring
prev: /authoring/guidelines/sample-tests/
next: /authoring/guidelines/preloaded/
---

# Writing Submission Tests

This article contains a set of guidelines for kata authors or translators to create good test suites for their kata. They were collected to help ensure that kata, translations and their test suites are of sufficient quality so that users' experience with tests will be as good as possible.

NOTE: There are many kinds of kata, and some guidelines might simply not apply to some of them (puzzles, hack-mes, kata which mess with internals of the language runtime, and some types of challenges that require special ways of testing). But still, the present guidelines apply at least to some extent for the vast majority of kata, and if they are followed, kata authors can be sure that their tests will be clear, efficient, reliable, and easy to debug and maintain.
:::note
There are many kinds of kata, and some guidelines might simply not apply to some of them (puzzles, hack-mes, kata which mess with internals of the language runtime, and some types of challenges that require special ways of testing). But still, the present guidelines apply at least to some extent for the vast majority of kata, and if they are followed, kata authors can be sure that their tests will be clear, efficient, reliable, and easy to debug and maintain.
:::


## General Guidelines
Expand Down Expand Up @@ -94,7 +93,7 @@ Some kata may impose additional restrictions on submitted solutions unrelated to

- If the user solution should be inspected as source code, it can be found in `/workspace/solution.txt`.
- **Every additional restriction should be tested.** It's **not enough** just to say _"Do not use BigInteger"_, or _"You have to use recursion."_ , it has to be actually verified (but see below).
- Restrictions of the form "do not use X" or "you must use Y" are seldom a good idea since they are extremely difficult (or downright infeasible) to reliably enforce. See [this article (TODO: write the article)]() for details.
- Restrictions of the form "do not use X" or "you must use Y" are seldom a good idea since they are extremely difficult (or downright infeasible) to reliably enforce. See `[this article (TODO: write the article)]` for details.


[authoring-guidelines-general-coding]: /authoring/guidelines/coding/
Expand Down
5 changes: 1 addition & 4 deletions content/authoring/guidelines/translation.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
---
title: Translation Authoring Guidelines
kind: reference
sidebar: authoring
prev: /authoring/guidelines/reference-solution/
next: /authoring/guidelines/kata/
---

# Translation Authoring Guidelines

This article contains a set of guidelines, which can be used by translators to create good translations to existing kata. They were collected to help ensure that translations are of sufficient quality and users' experience will be as good as possible.

Expand Down
8 changes: 2 additions & 6 deletions content/authoring/kata/index.md → content/authoring/kata.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
sidebar: authoring
next: /authoring/
prev: /authoring/translation/
title: Authoring Kata
---

# Kata

_TBD: improve this stub_

## Requirements
Expand All @@ -26,5 +22,5 @@ Every kata author should follow [kata authoring guidelines](/authoring/guideline
After being published, every kata goes through the [beta process](/concepts/kata/beta-process/) and is subject to a series of [reviews](/curating/kata/).


[reference-privileges]: /references/gamification/privileges/
[reference-privileges]: /gamification/privileges/
[docs-curating]: /curating/
3 changes: 1 addition & 2 deletions content/authoring/kata/adding-images.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
title: Adding Images to Kata Descriptions
kind: recipe
---

# Adding Images to Kata Descriptions

Currently, it's not possible to attach any files or additional assets to a kata, but many authors would like to illustrate their descriptions with images. There are plans to introduce the possibility of uploading and attaching files to descriptions. However, until attaching images is implemented, authors have to resort to other techniques, each with advantages and disadvantages.

:::note
Expand Down
Loading