Content, mostly
This commit is contained in:
parent
fc3bcd064a
commit
3b45d0b4bb
@ -13,12 +13,12 @@ const categories = vocabListJson.map(
|
||||
const vocabList = [
|
||||
{
|
||||
label: "Index",
|
||||
link: `/vocab/index`,
|
||||
link: `/vocabulary`,
|
||||
},
|
||||
].concat(
|
||||
categories.map((/** @type {string} */ category) => ({
|
||||
label: category.charAt(0).toUpperCase() + category.slice(1),
|
||||
link: `/vocab/${category}`,
|
||||
link: `/vocabulary/${category}`,
|
||||
})),
|
||||
);
|
||||
|
||||
@ -39,13 +39,21 @@ export default defineConfig({
|
||||
"./src/styles/custom.css",
|
||||
],
|
||||
sidebar: [
|
||||
{
|
||||
label: "Grammar",
|
||||
autogenerate: { directory: "grammar" },
|
||||
},
|
||||
{
|
||||
label: "Vocabulary",
|
||||
items: vocabList,
|
||||
},
|
||||
{
|
||||
label: "Grammar",
|
||||
autogenerate: { directory: "grammar" },
|
||||
label: "How I Built This",
|
||||
autogenerate: { directory: "how-i-built-this" },
|
||||
},
|
||||
{
|
||||
label: "Edit YAML",
|
||||
link: "/edit",
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
---
|
||||
import {Aside, Badge, Icon} from '@astrojs/starlight/components';
|
||||
import AnchorHeading from '@astrojs/starlight/components/AnchorHeading.astro';
|
||||
import markdownit from 'markdown-it'
|
||||
import markdownItMark from 'markdown-it-mark'
|
||||
const md = markdownit().use(markdownItMark);
|
||||
@ -34,15 +35,15 @@ function highlight(text: string, term: string) {
|
||||
}
|
||||
---
|
||||
<li id={word.hindi} class="word-entry">
|
||||
<h4>
|
||||
<AnchorHeading level="4" id={word.hindi} class="word-heading">
|
||||
{word.hindi} ({word.english})
|
||||
{word.gender && <Badge variant={gender_lookup[word.gender][0]} text={gender_lookup[word.gender][1]} class="gender-badge"/>}
|
||||
</h4>
|
||||
</AnchorHeading>
|
||||
{word.note &&
|
||||
<div set:html={md.renderInline(word.note)}></div>
|
||||
}
|
||||
{
|
||||
word.examples &&
|
||||
word.examples &&(
|
||||
<>
|
||||
<p>For example,</p>
|
||||
<ol>
|
||||
@ -59,12 +60,14 @@ word.examples &&
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</> )}
|
||||
{ word.see_also && (
|
||||
<p>See also:
|
||||
{ word.see_also.map((ref) => (
|
||||
<span set:html={md.renderInline(ref)}></span>
|
||||
<p><b>See also:</b>
|
||||
{ word.see_also.map((ref, i) => (
|
||||
<>
|
||||
<span set:html={md.renderInline(ref)}></span>{ i < word.see_also!.length - 1 ? "; " : '' }
|
||||
</>
|
||||
)) }
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
</li>
|
||||
@ -6,4 +6,4 @@ template: splash
|
||||
|
||||
# 404 | कुछ नहीं है यहाँ
|
||||
|
||||
[← घर वापस जाऐं](/)
|
||||
[← घर वापस जाऐं](<javascript:history.back()>)
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Active and Passive, Transitive and Intransitive
|
||||
---
|
||||
|
||||
This was really cool to learn.
|
||||
@ -1,5 +1,7 @@
|
||||
---
|
||||
title: Grammar Introduction
|
||||
sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
Yo yo.
|
||||
|
||||
11
src/content/docs/how-i-built-this/index.mdx
Normal file
11
src/content/docs/how-i-built-this/index.mdx
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "Hindki Architecture Overview"
|
||||
---
|
||||
|
||||
One could certainly argue that Hindki is as much about procrastinating learning Hindi by setting up an elaborate website as it is, about, well, learning Hindi.
|
||||
|
||||
The major decisions that led to this site, and are elaborated in the next few pages, were:
|
||||
|
||||
- Using Astro, the static site generator, to (mostly) focus on ease of adding content. I'm using Starlight, which is basically a theme for Astro that comes with some components, sane defaults, and probably more that I'm not taking advantage of.
|
||||
- Overriding the fonts to look more like how I would typeset a book using (Xe)LaTeX.
|
||||
- Keeping track of vocabulary in a YAML file, and generating the vocabulary pages quasi-dynamically during the build phase of static site generation. In other words, I didn't want to have to hand-write each page (because I kept changing my mind about how the entries would look, and it quickly became clear that I should use reusable components), but I also didn't want to use a heavy/full-featured CRUD backend, because at the end of the day, this site is _just content_.
|
||||
14
src/content/docs/how-i-built-this/roadmap.mdx
Normal file
14
src/content/docs/how-i-built-this/roadmap.mdx
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
title: "Roadmap"
|
||||
---
|
||||
|
||||
Ultimately, creating a knowledge base of the vocab I've learned and writing down the grammar rules in my own voice is _kind of_ cool, but the reason I was motivated to do "something with Hindi and programming" in the first place was because Anki wasn't quite dynamic enough for the flashcard practicing I wanted to do.
|
||||
|
||||
At first, I tried building the LLM part first, but I'm happy with the fact that this time, I've focused on documenting what I've learned first, and will try to plug in an LLM after.
|
||||
|
||||
The hope is that because I have a YAML file as the source of truth of what words I know, it'll be even easier for a machine to figure my level out than if it had to traverse the generated files (though it can certainly do that too, I guess).
|
||||
|
||||
Here are some things I've thought about adding, which I'll put here for some kind of posterity/future reference.
|
||||
|
||||
- **Chat with a page.** Who knows how useful this would be, but on a grammar page for instance, it could be interesting to have an easily-accessible (like the search box) way to access an LLM to ask for clarifications or something.
|
||||
- **Quiz me.** This is the actual main killer feature I want to build. Think: generating sentences using words I know; asking me to write (or say?) things in Hindi and making sure I use the right gender, the oblique forms where needed, etc; and of course, simple spaced repetition to memorize word lists.
|
||||
@ -8,7 +8,10 @@ head:
|
||||
hero:
|
||||
tagline: Welcome to Hindki!
|
||||
actions:
|
||||
- text: Jump In
|
||||
- text: Grammar Reference
|
||||
link: /grammar
|
||||
icon: open-book
|
||||
- text: Vocabulary
|
||||
link: /vocabulary
|
||||
icon: right-arrow
|
||||
- text: Hindi Textbook (260 MB)
|
||||
@ -20,7 +23,7 @@ hero:
|
||||
rel: noopener
|
||||
---
|
||||
|
||||
## हिंदकी के बारे में
|
||||
## हिंदकी के बारे में / _About Hindki_
|
||||
|
||||
Hindki is a collection of my personal notes on learning Hindi, and an evolving knowledge base that (maybe, hopefully) I can one day use as the backend of an AI-powered language tutor. If it helps you too, बढ़िया!
|
||||
|
||||
@ -28,6 +31,8 @@ It includes a dictionary, grammar notes, and other resources I've found helpful
|
||||
|
||||
As I learn more Hindi, I'll convert this and the rest of the interface to Hindi as well.
|
||||
|
||||
### इसका नाम क्यों "हिंदकी"?
|
||||
### इसका नाम क्यों "हिंदकी"? / _Why the name 'Hindki'?_
|
||||
|
||||
The name "Hindki" is a play on the words "Hindi" and "Anki", because I was initially building this as a personal flashcard system similar to [Anki](https://apps.ankiweb.net/), but for Hindi. It also kind of works as a Hindi adjective meaning "related to Hindi" (in fact, [this word exists in Persian](https://translate.google.com/?sl=fa&tl=en&text=%D9%87%DB%8C%D9%86%D8%AF%D9%82%DB%8C%20&op=translate)), and it is also a sort of "wiki", since it's a knowledge base. All very satisfying.
|
||||
The name "Hindki" is a play on the words "Hindi" and "Anki", because I was initially building this as a personal flashcard system similar to [Anki](https://apps.ankiweb.net/), but for Hindi. It also kind of works as a Hindi adjective meaning "related to Hindi" (in fact, [this word exists in Persian](https://translate.google.com/?sl=fa&tl=en&text=%D9%87%DB%8C%D9%86%D8%AF%D9%82%DB%8C%20&op=translate)), and it is also a sort of "wiki", since it's a knowledge base. Finally, if you needed yet another pun, it's the "key" to my Hindi education. All very satisfying.
|
||||
|
||||
As for whether it's actually a good name, I'll let you be the judge.
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
---
|
||||
title: Dates and Times
|
||||
---
|
||||
|
||||
When specifying a point in time, generally, को is used, e.g. रात को, सोमवार को. However, for some reason, सुबह में is used instead.
|
||||
|
||||
## General words
|
||||
|
||||
Words for the various units of date and time.
|
||||
|
||||
Starting off strong with:
|
||||
|
||||
- तारिख / _Date_
|
||||
- **Time** / समय
|
||||
@ -1,10 +0,0 @@
|
||||
---
|
||||
title: Education
|
||||
---
|
||||
|
||||
Learning about learning.
|
||||
|
||||
## Roles
|
||||
|
||||
- शिक्षक / _teacher_
|
||||
- चात्र / _student_
|
||||
@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Food and Drink
|
||||
---
|
||||
|
||||
जो खाएं और पिये जाते हैं.
|
||||
|
||||
## Nouns
|
||||
|
||||
- <VocabWord hindi="अंडा" english="egg" gender="m" />
|
||||
|
||||
## Verbs
|
||||
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Index
|
||||
title: Vocabulary
|
||||
---
|
||||
|
||||
## Welcome to the Hindki Docs!
|
||||
This is the dictionary I've cultivated with all the words I've learned in Hindi.
|
||||
|
||||
Test test test.
|
||||
If it's useful to you, great! I'm not even sure it'll be useful to me.
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
---
|
||||
title: Media
|
||||
---
|
||||
|
||||
import VocabWord from "@/components/VocabWord.astro";
|
||||
|
||||
जो पढ़ीं और देखीं जाते हैं.
|
||||
|
||||
## Reading words
|
||||
|
||||
- <VocabWord english="newspaper" hindi="अखबार" gender="m" />
|
||||
|
||||
## Viewing words
|
||||
@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Elements and Substances
|
||||
---
|
||||
|
||||
Stuff in the world.
|
||||
|
||||
## Elements
|
||||
|
||||
- आग / _fire_
|
||||
9
src/pages/edit/index.astro
Normal file
9
src/pages/edit/index.astro
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
|
||||
|
||||
|
||||
---
|
||||
|
||||
<StarlightPage frontmatter={{ title: "Edit Hindki" }}>
|
||||
<h2>Edit Hindki</h2>
|
||||
</StarlightPage>
|
||||
@ -1,6 +1,7 @@
|
||||
---
|
||||
import { getCollection, getEntry } from 'astro:content';
|
||||
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
||||
import AnchorHeading from '@astrojs/starlight/components/AnchorHeading.astro';
|
||||
import VocabWord from '@/components/VocabWord.astro';
|
||||
|
||||
function titlecase(str: string) {
|
||||
@ -48,7 +49,7 @@ const headings = wordsByType.map(({type, words}) => {
|
||||
{
|
||||
wordsByType.map(({type, words}) => (
|
||||
<div class="word-type-section">
|
||||
<h3>{type}</h3>
|
||||
<AnchorHeading level="3" id={type}>{type}</AnchorHeading>
|
||||
<ul class="part-of-speech-list">
|
||||
{
|
||||
words.map((word) => (
|
||||
@ -178,7 +178,7 @@ blockquote,
|
||||
.prose,
|
||||
.sl-markdown-content {
|
||||
font-family: var(--font-serif);
|
||||
font-size: 1.5rem; /* 18px, up from default 16px */
|
||||
font-size: 1.25rem; /* 18px, up from default 16px */
|
||||
}
|
||||
|
||||
/* UI elements remain sans-serif */
|
||||
@ -233,9 +233,9 @@ h6,
|
||||
top: -0.1em;
|
||||
}
|
||||
|
||||
.word-examples > p {
|
||||
/* .word-examples > p {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
} */
|
||||
|
||||
.word-entry a {
|
||||
text-decoration: none;
|
||||
|
||||
@ -21,6 +21,15 @@
|
||||
english: help
|
||||
hindi: मदद
|
||||
gender: f
|
||||
note: Used with का/के/की to indicate who is receiving help, and with either करना (to actively help someone), or होना (to passively be helped). See the links below for the generalized rules of these.
|
||||
see_also:
|
||||
- "[Reflexive verbs](/grammar/reflexive-verbs)"
|
||||
- "[Active and passive, transitive and intransitive](/grammar/active-passive-transitive-intransitive)"
|
||||
examples:
|
||||
- hindi: "मेरी मदद किजिए."
|
||||
english: "Please help me."
|
||||
- hindi: "क्या आपकी मदद हुई है?"
|
||||
english: "Have you been helped?"
|
||||
- slug: repetition
|
||||
about: Hindi often uses repetition of words for emphasis or to indicate a variety of related meanings.
|
||||
words:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user