Git Product home page Git Product logo

Comments (6)

raisedadead avatar raisedadead commented on August 15, 2024

The infra for this I believe is ready now, the idea is we are going to build a container for each publication. The configs for each language will be available in docker-config

Mind adding some and we can test it out in the next deployment?

To be clear, there will probably be a bit of duplication because we need a different serve.json file for each language, but we can revisit the strategy at some point if we need DRY configs.

from news.

raisedadead avatar raisedadead commented on August 15, 2024

I think some redirects like RSS etc, are working. But not everything is.

from news.

raisedadead avatar raisedadead commented on August 15, 2024

Not sure, why these do not work:

{
"source": "/@(.*)$",
"destination": "/author/$1"
},

--

About these:

{
"source": "/our-sponsors",
"destination": "/sponsors"
},
{
"source": "/about-freecodecamp",
"destination": "/about"
}

Is the idea to show users a localized version of the about, etc.?

from news.

scissorsneedfoodtoo avatar scissorsneedfoodtoo commented on August 15, 2024

I'm not sure why those first ones don't work either. It may be better to use routing segments that are mentioned in the docs. Maybe something like:

 { 
   "source": "/@:username", 
   "destination": "/author/:username" 
 }, 

For the other redirects, I just wanted to confirm that those were all working. We could point to localized versions if those exist, or to the English versions of the articles for ones that we don't localize.

From the test redirects in that PR, I believe sponsors is the only one that should point to the English version of the article: https://www.freecodecamp.org/news/sponsors/

from news.

raisedadead avatar raisedadead commented on August 15, 2024

I have landed the linked PR & deployed it to staging. @scissorsneedfoodtoo can you confirm this works as intended and can be closed?

from news.

scissorsneedfoodtoo avatar scissorsneedfoodtoo commented on August 15, 2024

Awesome, thanks @raisedadead.

I did some testing previously and we should be able to handle all the current Ghost redirects with Serve. The only hangup might be if we need to do something fancy with regex, though I don't see that happening very often -- most of the current redirects are for the migrated articles, or to point to another article for some reason or another.

Just double checked and the Dothraki redirects work as expected. Once we do test Chinese and English builds I can do a more in-depth check.

from news.

Related Issues (20)

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.