-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4361723
commit 9c9ced3
Showing
13 changed files
with
214 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 28 additions & 2 deletions
30
packages/backend/src/api/controllers/TutorialController.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +0,0 @@ | ||
<!-- THIS FILE SHOULD BE DELETED AS SOON AS WE ADD REAL TUTORIALS --> | ||
|
||
# h1 Heading | ||
|
||
## h2 Heading | ||
|
||
### h3 Heading | ||
|
||
#### h4 Heading | ||
|
||
##### h5 Heading | ||
|
||
###### h6 Heading | ||
|
||
## Horizontal Rules | ||
|
||
--- | ||
|
||
--- | ||
|
||
--- | ||
|
||
## Emphasis | ||
|
||
**This is bold text** | ||
|
||
**This is bold text** | ||
|
||
_This is italic text_ | ||
|
||
_This is italic text_ | ||
|
||
~~Strikethrough~~ | ||
|
||
## Blockquotes | ||
|
||
> Blockquotes can also be nested... | ||
> | ||
> > ...by using additional greater-than signs right next to each other... | ||
> > | ||
> > > ...or with spaces between arrows. | ||
## Lists | ||
|
||
Unordered | ||
|
||
- Create a list by starting a line with `+`, `-`, or `*` | ||
- Sub-lists are made by indenting 2 spaces: | ||
- Marker character change forces new list start: | ||
- Ac tristique libero volutpat at | ||
* Facilisis in pretium nisl aliquet | ||
- Nulla volutpat aliquam velit | ||
- Very easy! | ||
|
||
Ordered | ||
|
||
1. Lorem ipsum dolor sit amet | ||
2. Consectetur adipiscing elit | ||
3. Integer molestie lorem at massa | ||
|
||
4. You can use sequential numbers... | ||
5. ...or keep all the numbers as `1.` | ||
|
||
Start numbering with offset: | ||
|
||
57. foo | ||
1. bar | ||
|
||
## Code | ||
|
||
Inline `code` | ||
|
||
Indented code | ||
|
||
// Some comments | ||
line 1 of code | ||
line 2 of code | ||
line 3 of code | ||
|
||
Block code "fences" | ||
|
||
``` | ||
Sample text here... | ||
``` | ||
|
||
## Tables | ||
|
||
| Option | Description | | ||
| ------ | ------------------------------------------------------------------------- | | ||
| data | path to data files to supply the data that will be passed into templates. | | ||
| engine | engine to be used for processing templates. Handlebars is the default. | | ||
| ext | extension to be used for dest files. | | ||
|
||
Right aligned columns | ||
|
||
| Option | Description | | ||
| -----: | ------------------------------------------------------------------------: | | ||
| data | path to data files to supply the data that will be passed into templates. | | ||
| engine | engine to be used for processing templates. Handlebars is the default. | | ||
| ext | extension to be used for dest files. | | ||
|
||
## Links | ||
|
||
[link text](http://dev.nodeca.com) | ||
|
||
[link with title](http://nodeca.github.io/pica/demo/ 'title text!') | ||
|
||
Autoconverted link https://github.com/nodeca/pica (enable linkify to see) | ||
|
||
## Images | ||
|
||
![Minion](https://octodex.github.com/images/minion.png) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { HomeTutorialEntry } from '@explorer/frontend' | ||
import fs from 'fs' | ||
|
||
export class TutorialService { | ||
constructor() {} | ||
|
||
getTutorials(): HomeTutorialEntry[] { | ||
const files = fs.readdirSync('src/content/tutorials') | ||
|
||
return files.map((filename) => { | ||
const filenameWithoutExt = filename.replace('.md', '') | ||
return { | ||
title: filenameWithoutExt.replace('-', ' '), | ||
imageUrl: `/images/${filenameWithoutExt}.jpg`, | ||
slug: filenameWithoutExt.toLowerCase(), | ||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.