Closed abdelkd closed 1 year ago
Interesting! Though there's too much noise in the commit. Primarily single quotes are changed to double quotes. I'm guessing you're using prettier with default config? I need to add a .prettierrc with some overrides I suppose.
I'll test the commit localy first before merging.
I'm thinking of doing it as a query(i.e., some-slug/?lang=lang-code). That way even if the user changes just the domain name to quora.com, the url won't become invalid(which will not be the case with this route approach).
I'm thinking of doing it as a query(i.e., some-slug/?lang=lang-code). That way even if the user changes just the domain name to quora.com, the url won't become invalid(which will not be the case with this route approach).
I Tried changing url from This to This it give's a 404 error. Or did you mean changing it so the url on quetre would look clearer?
the latter.
instead of adding a param in the router(i.e., /:lang/:slug
), we can look for a query called lang
(i.e., /:slug/?lang=fr
).
If such a query exists, pass it to the axiosInstance
, which takes lang
as a second, optional parameter(defaults to en
).
it looks much cleaner, and if I remember correctly, wikiless does something similar.
If you don't have time to do so, don't worry. I'll do this myself in a couple of days.
But if you do, then
npm start
which is used by heroku. As soon as I move away from heroku, I'll use pnpm there too.)the latter. instead of adding a param in the router(i.e.,
/:lang/:slug
), we can look for a query calledlang
(i.e.,/:slug/?lang=fr
). If such a query exists, pass it to theaxiosInstance
, which takeslang
as a second, optional parameter(defaults toen
).
I've done something like this, though I made a little bit of modifications on axiosInstance, the code seems to work great but I need a little bit of time to check everything works great and that I didn't break something else.
If you don't have time to do so, don't worry. I'll do this myself in a couple of days.
as I said, i've finished it but I need a day or so to clean things up
please change double quotes to single ones(you can do this by changing prettier's behaviour. I'll add .prettierrc in my next commit).
I'll make sure to do that :)
drop some commits that are not present in the main branch(see Add docker-compose.yml & image-publish.yml workflow #13 for explanation).
I'm not that good with git and github so I don't know how to drop it
don't change package.json. I believe pnpm is better(though I have to use npm for npm start which is used by heroku. As soon as I move away from heroku, I'll use pnpm there too.)
I've fixed this already.
I'm not that good with git and github so I don't know how to drop it
It's a good time to learn git rebase
. There are a lot of guides on the internet regarding it.
Alternatively, you can start with a clean state, and then commit your changes.
This PR fixes package.json to work with npm and fixes the issue that is addressed in #14