Giter Site home page Giter Site logo

diogorodrigues.dev's Introduction

Hello, I'm Diona Rodrigues!

I work as a web designer front-end developer with UI/UX design skills (front-end designer). IΒ΄m based in Dublin, Ireland.

Since 2009 I've been living and breathing web development and creating modern and user friendly interfaces. I've had the chance to immerse myself in many different works and projects, helping to make this world a little better through design & code. ✨😍

What I'm focusing on πŸ‘¨β€πŸ’»

Currently improving my React skills, specially NextJS.
BTW, if youΒ΄re looking for a Next.js starter, take a look at this Next.js boilerplate that I created.

My most recent posts on dev.to πŸ˜ƒπŸ§Ύ

Find me elsewhere 🌎

Linkedin Badge Twitter Badge

dionarodrigues.dev

diogorodrigues.dev's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

diogorodrigues.dev's Issues

Localized links for second language is not working

Hi! When I switch from English to Portuguese or access https://www.diogorodrigues.dev/pt/ , all links have additional "/pt" part: like https://www.diogorodrigues.dev/pt/pt/blog/web-designers-e-desenvolvedores-front-end-para-seguir-no-twitter
instead of https://www.diogorodrigues.dev/pt/blog/web-designers-e-desenvolvedores-front-end-para-seguir-no-twitter

That leads me to 404 page.

image

image

I found that for <Link /> gatsby component you need add / to the current path. Without that it'll take the relative path.

Solution:

in file src/components/localizedLink.js add slash to the beginning of the path:

// import React from 'react';
// import { LocaleContext } from '../layouts/BaseLayout';
import locales from '../../config/i18n';

// Use the globally available context to choose the right path
function localizedLink(to, locale = 'en') {
  const isIndex = to === `/`;

  // If it's the default language, don't do anything
  // If it's another language, add the "path"
  // However, if the homepage/index page is linked don't add the "to"
  // Because otherwise this would add a trailing slash
  if (locales) {
    const path = locales[locale].default
      ? to
     : `/${locales[locale].path}${isIndex ? `` : `${to}`}`; // Add slash to the beginning of the path

    return path;
  }

  return '';
}

export default localizedLink;

I'm learning to code and find your portfolio great as inspiration and learning resourse! thanks 😊

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.