Git Product home page Git Product logo

fresh-nordic-pantry's Introduction

Nordic Pantry Website

See it live

Getting started

Pre-requisites

  • node 16
  • npm 8
npm i

npm run start
// the project will be launched on localhost:8000

Where to write new recipes

For English

Create in /pages/blog a new subfolder with the recipe name.

For Finnish

Create in /pages/fi/blog a new subfolder with the recipe name.

How to write new recipes

Create a new *.mdx file.
Here is a markdown cheatsheet if needed.

Properties

title: title that will be displayed
slug: will be used for the url (use format word-word-word)
date: published date ( format YYYY-MM-DD )
image: path of the image ( can omit it )
tags: array of tags that will be used.
If you add a new tag it will be added automatically to the menu of the main page. ( ["myfirsttag", "mysecondtag"] )
lang: which language ( either en or fi )

Content

The first text should be a general description.
Then ##Ingredients for the list of ingredients.
Then ##Preparation for the list of steps.

How to publish a new version

It will be automatically deployed when committing to main.
The pipelines will run on Gatsby cloud. It takes few minutes for the pipelines to run.

Architecture project

Pages will do the data fetching from GraphQL.

Main blog page is in /src/components/Parts/BlogPage.

Recipe page is in src/components/Parts/Recipes.

Wrapper is the high level component to translate all the children.

PageLayout is the high level component for the blog page.

Translations for shared text

I am using react-intl.
All components needs to have Wrapper somewhere as a parent.

To add a new string edit in /intl folder both languages and add a new key.

The key needs to be the same for all languages.

For example for "go back"

In en.json

  "back": "Go Back"

In fi.json

  "back": "Mene takaisi"

Then in the code base

<FormattedMessage id={"back"} defaultMessage={"Go back"} />

Owner

Loïc Masson & VT

fresh-nordic-pantry's People

Contributors

bled68 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.