Skip to content

Commit

Permalink
Restructurated project
Browse files Browse the repository at this point in the history
  • Loading branch information
LyonSyonII committed Nov 15, 2023
1 parent db64168 commit c9ed2b0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
6 changes: 4 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import svelte from "@astrojs/svelte";

// https://astro.build/config
export default defineConfig({
site: "https://lyonsyonii.github.io",
base: "/rust-quest",
integrations: [
starlight({
title: "Rust Quest",
Expand All @@ -18,9 +20,9 @@ export default defineConfig({
},
sidebar: [
{
label: "Rust Quest",
label: "First Steps",
autogenerate: {
directory: "rustquest",
directory: "first-steps",
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Introduction
description: An introduction to RustQuest
---

import CodeBlock from "../../../components/CodeBlock.svelte";
import CodeBlock from "@components/CodeBlock.svelte";
import QuestionCard from "@components/QuestionCard.astro";

First of all, thank you for reading Rust Quest!

Expand All @@ -21,7 +22,9 @@ Each 'Quest' will have a code snippet, and you'll need to modify it in some way

Try running the following snippet (click the "Run" button at the right or "Shift + Enter" on your keyboard):

<CodeBlock client:only code={'println!("Hello World!")'} />
<QuestionCard>
<CodeBlock client:only code={'println!("Hello World!")'} />
</QuestionCard>

:::tip[Exercise]
Well... Your name isn't _World_, right?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: An introduction to RustQuest
---

import { Card } from "@astrojs/starlight/components";
import QuestionCard from "../../../components/QuestionCard.astro";
import CodeBlock from "../../../components/CodeBlock.svelte";
import QuestionCard from "@components/QuestionCard.astro";
import CodeBlock from "@components/CodeBlock.svelte";

export const errorMsg =
'Woops, something went wrong and the code does not compile!\n\nIf you\'ve mistakenly messed up the code, click the "Reset" button to return it back to its original state.\n\nRemember to replace ? with your answer.';
Expand Down Expand Up @@ -59,16 +59,18 @@ export function FreeQuestion({ question, code, correct }) {
);
}

Morning adventurer!
Morning adventurer!
I see you're new on this town, welcome to Newlia, where new heroes are born!

Oh, you want to register as a new adventurer? And you want to choose the "Programmer" class?
Oh, you want to register as a new adventurer? And you want to choose the "Programmer" class?
Good choice! Programmers are a very versatile class, give them enough time and they can do anything!

This class requires a small test, to ensure that you have the minimum problem solving skills. Don't worry, it'll be a moment.
This class requires a small test, to ensure that you have the minimum problem solving skills.
Don't worry, it'll be just a moment.

Please, fill up the gaps in the following statements, replace "?" with the correct answer.

:::warning
:::caution[Don't worry]
If you mess up the code, click the "Reset" button to return it back to its original state.
:::

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hero:
file: ../../assets/ferris.svg
actions:
- text: Start Journey!
link: /rustquest/1_introduction
link: /rust-quest/first-steps/1_introduction
icon: right-arrow
variant: primary
- text: See on Github
Expand Down
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
"jsxImportSource": "preact",
"baseUrl": ".",
"paths": {
"@components/*": ["src/components/*"],
"@assets/*": ["src/assets/*"],
}
},
"exclude": ["./node_modules", "./dist"]
"exclude": ["./node_modules", "./dist"],
}

0 comments on commit c9ed2b0

Please sign in to comment.