Code Monkey home page Code Monkey logo

gatsby-starter-i18n-bulma's Introduction

A Gatsby template: gatsby-starter-i18n-bulma

Netlify Status

You can view the starter at this link: https://gatsby-starter-i18n-bulma.netlify.com

Introduction

A gatsby multilanguage template with bulma and i18n. This project is under heavy development, consider that frequent changes can break compatibility.

If you want to try it, you can run this command:

gatsby new https://github.com/kalwalt/gatsby-starter-i18n-bulma

Then you need to run the yarn installer to install all the packages and dependencies:

yarn install

As yarn has finished to install all the packages then you can run:

gatsby develop

Features

A simple website with multilanguage support, blogging, bulma css, i18n, netlify-cms and much more...

Gatsby.js

It support Gatsby.js v.5 !!

Language switcher

With this starter you can switch between different languages pages with different names for example:

en/artworks/

to

/it/opere/

Plugins

This starter use these Gatsby.js Plugins:

  • gatsby-plugin-google-analytics
  • gatsby-plugin-i18n
  • gatsby-plugin-i18n-tags
  • gatsby-plugin-manifest
  • gatsby-plugin-netlify
  • gatsby-plugin-netlify-cms
  • gatsby-plugin-offline
  • gatsby-plugin-purgecss
  • gatsby-plugin-react-helmet
  • gatsby-plugin-remove-trailing-slashes
  • gatsby-plugin-robots-txt
  • gatsby-plugin-sass
  • gatsby-plugin-sharp
  • gatsby-plugin-sitemap
  • gatsby-remark-copy-linked-files
  • gatsby-remark-images
  • gatsby-remark-relative-images
  • gatsby-source-filesystem
  • gatsby-transformer-javascript-frontmatter
  • gatsby-transformer-json
  • gatsby-transformer-remark
  • gatsby-transformer-sharp

Inspired by

This project in part is based on the Netify template: gatsby-starter-netlify-cms and the gatsby-starter-contentful-i18n But a special mention i reserved to gatsby-plugin-i18n

Documentation

For more information, see the wiki page

Copyright

@kalwalt

gatsby-starter-i18n-bulma's People

Contributors

anna-sunberg avatar dependabot-preview[bot] avatar dependabot[bot] avatar kalwalt avatar martinrosenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gatsby-starter-i18n-bulma's Issues

Netlify CMS not saving id and the name of article blog in articleTree.js

This is a problem that happens when you create a blog with the Netlify CMS, For the truth there are more than one issue:

  • blog article can not be saved with extension .it.md or .en.md
  • id name and name of the article blog can not be saved in articleTree.js
  • last id is not displayed in the CMS
    Each of these needs a solution.

Warning: Failed prop type: The prop `to` is marked as required

Log from the console:

index.js:2177 Warning: Failed prop type: The prop `to` is marked as required in `GatsbyLink`, but its value is `null`.
    in GatsbyLink (created by ForwardRef)
    in ForwardRef (at tags.js:24)
    in li (at tags.js:23)
    in ul (at tags.js:19)
    in div (at tags.js:17)
    in div (at Layout.js:97)
    in div (created by TemplateWrapper)
    in IntlProvider (at Layout.js:84)
    in TemplateWrapper (at tags.js:16)
    in Tags (created by HotExportedTags)
    in AppContainer (created by HotExportedTags)
    in HotExportedTags (created by PageRenderer)
    in PageRenderer (created by JSONStore)
    in JSONStore (created by EnsureResources)
    in ScrollContext (created by EnsureResources)
    in RouteUpdates (created by EnsureResources)
    in EnsureResources (created by RouteHandler)
    in RouteHandler (created by Root)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root
    in _default
__stack_frame_overlay_proxy_console__ @ index.js:2177

Failed prop type: The prop `data.allMarkdownRemark.edges[0].node.frontmatter.path` is marked as required in `Tags`, but its value is `null`.

Log from the console:

index.js:2177 Warning: Failed prop type: The prop `data.allMarkdownRemark.edges[0].node.frontmatter.path` is marked as required in `Tags`, but its value is `null`.
    in Tags (created by HotExportedTags)
    in HotExportedTags (created by PageRenderer)
    in PageRenderer (created by JSONStore)
    in JSONStore (created by EnsureResources)
    in ScrollContext (created by EnsureResources)
    in RouteUpdates (created by EnsureResources)
    in EnsureResources (created by RouteHandler)
    in RouteHandler (created by Root)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root
    in _default
__stack_frame_overlay_proxy_console__ @ index.js:2177

--> insecure img urls from builds

i receive this errors in the Netlify server:

8:35:38 PM: Starting post processing
8:35:39 PM: Mixed content detected in: /en/artworks/index.html
8:35:39 PM: --> insecure img urls:
8:35:39 PM:   - http://lorempixel.com/1000/600/nature/1/
8:35:39 PM:   - http://lorempixel.com/1000/600/nature/2/
8:35:39 PM:   - http://lorempixel.com/1000/600/nature/3/
8:35:39 PM:   - http://lorempixel.com/250/150/nature/1/
8:35:39 PM:   - http://lorempixel.com/250/150/nature/2/
8:35:39 PM:   - http://lorempixel.com/250/150/nature/3/
8:35:41 PM: Mixed content detected in: /it/opere/index.html
8:35:41 PM: --> insecure img urls:
8:35:41 PM:   - http://lorempixel.com/1000/600/nature/1/
8:35:41 PM:   - http://lorempixel.com/1000/600/nature/2/
8:35:41 PM:   - http://lorempixel.com/1000/600/nature/3/
8:35:41 PM:   - http://lorempixel.com/250/150/nature/1/
8:35:41 PM:   - http://lorempixel.com/250/150/nature/2/
8:35:41 PM:   - http://lorempixel.com/250/150/nature/3/
8:35:43 PM: Post processing done
8:35:43 PM: Site is live
8:36:01 PM: Finished processing build request in 2m15.429602767s
8:36:01 PM: Shutting down logging, 0 messages pending

named exports will cause Fast Refresh to not preserve local component state and do a full refresh

When doing a gatsby develop I get this warning:

warn 
/tmp/gatsby-starter-i18n-bulma/src/templates/blog-post.js
  10:1  warning  In page templates only a default export of a valid React component and the named export of a page
query is allowed.
        All other named exports will cause Fast Refresh to not preserve local component state and do a full refresh.

        Please move your other named exports to another file. Also make sure that you only export page queries that
use the "graphql" tag from "gatsby".
  limited-exports-page-templates

I think this might be quite a performance hit:

https://www.gatsbyjs.com/docs/reference/local-development/fast-refresh/

I think this might be as simple as importing BlogPostTemplate from another file and Export Blog Post elsewhere, but wanted to get thoughts on this from everyone else.

Improve general styling

I need to look into the general styling of the template, adjusting margins, padding and othe css classes.

Contact form do not send message to Netlify service

Trying to send a message with the contact form, but is not delyvered to the recipient. I needs to understand why not. I think to have done all correct but probably i mssed something. An issue to fix sooner.

npm install fails installing alias

I did this:

gatsby new some-i18-bulma https://github.com/kalwalt/gatsby-starter-i18n-bulma

and I got the following error:

npm ERR! Invalid dependency type requested: alias

npm ERR! A complete log of this run can be found in:
error Command failed: npm install

Change default language - defaultLangKey

Changing default language in languages.js, doesn't work !
Setting defaultLangKey: 'it' keep redirecting to /en

Also replacing Italian lang with something else is extremely difficult. There should be a way to simplify this process!

Thanks !

About page fails with image error

The reason is the new home template page:

TypeError: Cannot read property 'childImageSharp' of null
HomePageTemplate
src/templates/home.js:35
  32 |   <div
  33 | className="full-width-image margin-top-0"
  34 | style={{
> 35 |   backgroundImage: `url(${
  36 |     !!image.childImageSharp ? image.childImageSharp.fluid.src : image
  37 |   })`,
  38 |   backgroundPosition: `top left`,

The about page has not image in the frontmatter and so it fails. I need to fix this, sorry if you are using it i will fix in a short of time.
I will create a template dedicated to the About page. I have also an issue in production, maybe it is related?

National flags

@kalwalt How do you get those national flags js file? They are cool! :-)
I need some other flags, please help.

ERESOLVE unable to resolve dependency tree

When trying
gatsby new mytest https://github.com/kalwalt/gatsby-starter-i18n-bulma

I got this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR! peer react@"^16.9.0 || ^17.0.0" from [email protected]
npm ERR! node_modules/gatsby-plugin-netlify-cms
npm ERR! gatsby-plugin-netlify-cms@"^5.0.0" from the root project
npm ERR! 2 more (gatsby, react-dom)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.4" from [email protected]
npm ERR! node_modules/netlify-cms-app
npm ERR! netlify-cms-app@"^2.14.26" from the root project
npm ERR! peer netlify-cms-app@"^2.9.0" from [email protected]
npm ERR! node_modules/gatsby-plugin-netlify-cms
npm ERR! gatsby-plugin-netlify-cms@"^5.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Redesigning the blog index page

To avoid complexity i should transform the pre-existent blog index into a markdown format through the creation of a template.

Fontawesome icons

Remove the direct fontawesome css lib and use only react-icons for the icons.
I used directly fontawesome lib because i want the icons stacked one each other. I didnt found other solutions, i had to use the 'standard' approach:

<span className="fa-stack fa-lg">
<i className="fa fa-circle fa-stack-2x"></i>
<i className="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>

but in this way you must include all the fontawesome lib and this is not efficient.

Link warnings in the console

In the console i receive this message:

External link it was detected in a Link component. Use the Link component only for internal links. See: https://gatsby.dev/internal-links

I need to understand if i need to change <Link> into <a> tag or make other changes.

Encountered two children with the same key, `null`

From the log console:

index.js:2177 Warning: Encountered two children with the same key, `null`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted โ€” the behavior is unsupported and could change in a future version.
    in ul (at tags.js:19)
    in div (at tags.js:17)
    in div (at Layout.js:97)
    in div (created by TemplateWrapper)
    in IntlProvider (at Layout.js:84)
    in TemplateWrapper (at tags.js:16)
    in Tags (created by HotExportedTags)
    in AppContainer (created by HotExportedTags)
    in HotExportedTags (created by PageRenderer)
    in PageRenderer (created by JSONStore)
    in JSONStore (created by EnsureResources)
    in ScrollContext (created by EnsureResources)
    in RouteUpdates (created by EnsureResources)
    in EnsureResources (created by RouteHandler)
    in RouteHandler (created by Root)
    in div (created by FocusHandlerImpl)
    in FocusHandlerImpl (created by Context.Consumer)
    in FocusHandler (created by RouterImpl)
    in RouterImpl (created by LocationProvider)
    in LocationProvider (created by Context.Consumer)
    in Location (created by Context.Consumer)
    in Router (created by Root)
    in Root
    in _default
__stack_frame_overlay_proxy_console__ @ index.js:2177

Improving the home page.

My goal is to structure an visually effective page,with the following characteristics:

  • a full image or video as presentation with a text as slogan.
  • a menu with 4 fontawesome icons for the 4 artworks options.
  • a testimonial box.
  • a sentence text window with an image background.
  • an animated "banner".

404 page - not working

404 page not working in development mode nor in production; In development mode it will not be created and in production it will fails the build process.
Probably i have to create a 404 template page and as a consequence create the two languages version...

Contact form improvements

The contact form needs also some improvements:

  • a Subject input

  • a thanks response when the user send a message

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.