1
0

Add routing for Haskell pages.

This commit is contained in:
Kevin Matsubara 2025-06-14 17:37:37 +02:00
parent 629411274a
commit c3f807526a
2 changed files with 15 additions and 4 deletions

View File

@ -18,4 +18,5 @@ factorial 3
3 * (2 * factorial 1) 3 * (2 * factorial 1)
3 * (2 * (1 * factorial 0)) 3 * (2 * (1 * factorial 0))
3 * (2 * (1 * 1)) 3 * (2 * (1 * 1))
``` ```

View File

@ -3,13 +3,13 @@ import { Route } from 'react-router-dom';
import { languages } from './Language/Language'; import { languages } from './Language/Language';
import JapanesePage from './Pages/Japan/JapanesePage'; import JapanesePage from './Pages/Japan/JapanesePage';
import BlogPage from './Pages/Plamo/BlogPage'; import BlogPage from './Pages/Plamo/BlogPage';
import CSharpPage from './Pages/Software/csharp/CSharpPage'; import CSharpPage from './Pages/Software/dotnet/csharp/CSharpPage';
import ElmPage from './Pages/Software/elm/ElmPage'; import ElmPage from './Pages/Software/elm/ElmPage';
import HaskellPage from './Pages/Software/haskell/HaskellPage'; import HaskellPage from './Pages/Software/haskell/HaskellPage';
// Japan // Japan
export const japaneseRoutes = languages.map(lang => { export const japaneseRoutes = languages.map(lang => {
const pages = ['but', 'cheat-sheet', 'contrast-particle', 'dake-vs-shika', 'expressions', 'if-when', 'japanese-scale-modelling-tools', 'mae-ni-ato-de', 'particles', 'rashii-kamoshirenai-darou', 'tameni-youni-noni', 'te-form', 'te-oku', 'toka-tari-shi', 'verbs']; const pages = ['but', 'cheat-sheet', 'contrast-particle', 'dake-vs-shika', 'expressions', 'if-when', 'japanese-scale-modelling-tools', 'mae-ni-ato-de', 'onomatopoeia', 'particles', 'rashii-kamoshirenai-darou', 'tameni-youni-noni', 'te-form', 'te-oku', 'toka-tari-shi', 'verbs'];
return pages.map(page => { return pages.map(page => {
const path = `/${lang}/japan/japanese/${page}`; const path = `/${lang}/japan/japanese/${page}`;
const mdPath = `Japan/Japanese/${lang}/${page}.md`; const mdPath = `Japan/Japanese/${lang}/${page}.md`;
@ -67,7 +67,17 @@ export const programmingLanguageRoutes = languages.map(lang => {
}); });
// Pages within Haskell. // Pages within Haskell.
md = ['curried-functions']; md = [
'caesar-cipher',
'conditional-expressions-and-guarded-equations',
'curried-functions',
'graham-hutton-answers',
'lambda-expressions',
'lists',
'recursive-functions',
'strings',
'pattern-matching',
];
const entriesHaskell = md.map(entry => { const entriesHaskell = md.map(entry => {
const path = `/${lang}/software/haskell/${entry}`; const path = `/${lang}/software/haskell/${entry}`;
const mdPath = `Software/haskell/${lang}/${entry}.md`; const mdPath = `Software/haskell/${lang}/${entry}.md`;