«I am here» — is a project devoted to stories that Ukrainian teenagers are ready to share during the war. We have assembled an editorial team that consists of guys who found themselves in Georgia in 2022. Along with curators, they have developed this website and continue to fill it with stories and the results of creative projects.
getStaticPath
andgetStaticProps
util functions andfs
module to get path and read filesgray-matter
module for reading content insiderehype-raw
to write html inside markdown if neededclassnames
forcn()
syntaxmdx
for articles- uses CSS modules for styling
/data
for mdx/models
for content interfaces
Directory /data/posts is intended for articles. There are 3 directories inside: en
, uk
, ru
When you want to create new article, you must make in every directory from above new file with .mdx
ending. This files must have the same names. For example, we want to create new article with title My new article
. For this you supposed to add for each directory, file my-new-article
The name must be without spaces.
In Frontmatter stored information about article: author
, title
, theme
, svg
and meta information
. Also Frontmatter must be written in very top of the article file. It must look so:
---
author: 'Someone`s name'
title: 'Some title'
theme: 'theme-somecolor'
svg: 'some-svg'
metaTitle: 'some title'
metaDescription: 'some description'
metaOgTitle: 'some og title'
metaOgImage: 'some link on some image'
---
Don't forget to use quotes
author
- Author nametitle
- Title of articletheme
- Main color which will be used on article's page. Before writing name, ask if it existssvg
- Picture which will be used in button on home page. Before writing name, ask if it existsmetaTitle
- Title which will be the name for tab in browser. Mostly you need to write in this way:'imhr.top - title'
metaDescription
- Meta description. Mostly you need to write in this way:'I am here. Сайт, где подростки осмысляют войну и мир.'
. Inner text depends on language for which you currently creating an article.metaOgTitle
- Mostly you need to write in this way:'imhr.top - title'
metaOgImage
- Image which will be shown as an icon for tab in browser.
Article builds from simple tags which are going after Frontmatter. Every tag must be wrapped in some of three "boxes":
Fullpage
Large
Medium
Only HorizontalPhoto
, Heading
, AuthorCard
and PhotoFullPage
don't need to be wrapped in one of the following box.
Wrapping looks like simple html construction:
<Large>
> ### Some text for blockquote
</Large>
There is a list with all tags which you can use in your article:
-
h1 h2 h3
-#
forh1
,##
forh2
,###
fromh3
-
blockquote
-> ### Some text
-
strong
-**Some text**
-
Heading
-<Heading img="image-url photoLeft />
If you don't want to use photoLeft just delete this prop from component -
HorizontalPhoto
-<HorizontalPhoto src="image-url" photoDescription="photo description"> Some text </HorizontalPhoto>
-
PhotoFullPage
-<PhotoFullPage className="some-class (not necessary)" src="image-url" text="Some photo description" />
-
Slider
-*
are necessary!<Slider> <PhotoAndText src='image-url'> *Some text* </PhotoAndText> <PhotoAndText src='image-url'> *Some text* </PhotoAndText> </Slider>
-
PhotoAndText
-*
are necessary<PhotoAndText src='image-url'> *Some text* </PhotoAndText>
-
AuthorCard
-<AuthorCard src='image-url'> Some text </AuthorCard>
-
VeticalPhoto
-<VerticalPhoto src="image-url" photoDescription="photo description"> Some text </VerticalPhoto>
-
LinkList & LinkListItem
- Mostly used only inAuthorCard
<LinkList> <LinkListItem> [some text](some-url) </LinkListItem> <LinkListItem> [some text](some-url) </LinkListItem> </LinkList>
-
Icon
-<Icon icon='icon-name' />
. Before writing name, ask if it exists -
BigHeading
-<BigHeading> # Some text </BigHeading>
-
BorderedSection
-<BorderedSection text='Some text'> Some text </BorderedSection>
If you've found any mistake or ready for contribution to upgrade our code, feel free to open issue or pull request