Add translation for French

This commit is contained in:
Huy-Ngo 2021-01-12 12:37:59 +07:00
parent 4999d3afbc
commit 1680076b36
1 changed files with 77 additions and 36 deletions

View File

@ -1,74 +1,115 @@
---
layout: post
title: "Giving up on WordPress! but in French"
title: "Je quitte WordPress"
date: 2021-01-02 14:44:00 +0700
tags: blog wordpress writing selfhost
lang: fr
ref: give-up-wp
categories: blog update
---
For the last week, I was trying to setting up my own WordPress instance, since I have access to a server and use a free domain name. It was such a hassle. <!--more-->
## Why I want to start a blog
Pendant la semaine dernière, j'installe à peine ma propre instance de WordPress,
parce que j'ai accès à un serveur et je peux utiliser un nom de domaine gratuit.
Mais c'était quel horreur. <!--more-->
Writing is a way of polishing my writing skills. For so long, all what I write has been only code. Now that I'm close to my graduation, writing long text suddenly becomes important to me - I need to write reports and after that my thesis.
# Pourquoir écrire un blog
It is also a way of expressing myself. Social media is a shorter version for this, and they may attract more interactions from people you know, but blog on the other hand helps you express your idea and opinion publicly. They're also much more organized in the sense that my list of posts does not contain shares from other users, or that I can use hashtags to categorize my posts.
J'écris pour le faire mieux (et pour me défier de écrire des articles en langues
à part anglais). Il y avait longtemps que je n'ai rien écrit que le code.
Mais écrire des essais c'est important pour moi : pour ma graduation, il faut écrire
des rapports et un thèse.
## Choosing WordPress
Mais ce n'est pas la seule raison. C'est aussi un moyen de m'exprimer. Le média sociel
peut m'aider à le faire, mais je quitte Facebook à cause du manque de confidentialité
premièrement et de la haine partout où je cherche le divertissement, et Mastodon a une
limitation de caractères pour une publication. Les catégories et les tags sont aussi
des aides pour mettre des publications en ordre.
At first I was thinking of using wordpress.com, since it's already hosted, but then I realized they can put ads on my blogs without my consent (well, technically, they would have my consent if I used their service). On top of that, I always prefer self-hosting whenever possible: I have all control (doubt) over what is running and what not. I would not what a third party to track my readers or showing them ads on my blog.
# Choisir WordPress
The server was running on Ubuntu 16.04. That is a rather old one, so it doesn't support latest packages, including Apache, PHP, and WordPress (they do have WordPress in the Ubuntu repo), and I dare not upgrade it.
WordPress c'est une plate-forme populaire pour blogger. Au debut je pensais de choisir
wordpress.com, car il est déjà hébergé. Mais j'ai découvert qu'il mettrais des ads
sur mes blogs sans mon approbation. De plus, si je héberge moi-même, j'ai du contrôle.
Je ne veux pas que mes lecteurs doivent voir les ads qui sont mis par un tier.
On the other hand, I already hosted some other services with Nginx there, so I'd prefer to use Nginx instead of Apache. They do have [that option](https://wordpress.org/support/article/nginx/), but alas, those configs file seem long and I was not sure if I would break something while editing the nginx.conf file.
Le serveur fonctionne sous Ubuntu 16.04, qui est très vieux. Ainsi, il n'a pas les plus
récents paquets, y compris Apache, PHP, et WordPress, et je n'ose pas le mettre à niveau.
I did try to use Nginx as a reverse proxy to my Apache server, though. It did work, but there is another problem, which I will talk about in a next section
J'y avait déjà des autres services avec nginx, alors je préfère utiliser nginx comme
serveur web. Il y a [un guide][wp-nginx] pour exactement ça, mais malheureusement,
ces fichiers de la configuration sont longs et j'ai peur de mettre quelque chose en panne
cependant (et de plus, je suis paresseux ;) ).
## Using Docker
Alors, c'est ça, j'utilise Apache, ce n'est pas une mauvaise chose, et j'utilise nginx
comme proxy inverse. Ça a marché.
I also tried another option - docker. I wondered why I didn't think of it earlier.
# Utiliser Docker
I have recently been using docker quite regularly, e.g. for CouchDB and RethinkDB which aren't packaged for my distro, or SQLServer and MongoDB, which were required for my database course. Docker is a way to easily run some program in a contained environment with simple configuration that can be input from command line or docker-compose file. Most importantly, they're confirmed to work.
J'ai aussi essaié docker. Je me demandais pourquoi je n'avais pas penser à
cette solution plus tôt.
J'ai récemment utilisé docker très fréquemment, e.g. pour CouchDB et RethinkDB, qui
ne sont pas paqueté pour Tumbleweed, our SQLServer et MongoDB, qui étaient nécessaire
pour mon cours de base de données.
And nice, it did run.
Docker exécute des programmes dans un container ( « conteneur » ) que
l'on peut facilement configurer avec docker-compose ou par ligne de commande.
Surtout, on peut être sûr que ça marche.
Now I need to set up a domain name for the blog.
Et ça marche merveilleusement.
## Port forwarding
# Redirection de port
For personal reason, I'd rather not reveal my domain name here, so I'd use `example.com` in its place.
Ce n'était pas un problème que WordPress a créé, c'était ma faute, mais comme la faute
est aussi une leçon, je la raconte quand même.
I signed up a domain name at freenom, and it only took me one day until the domain name is fully available.
Pour ne pas faire la même faute à l'avenir: il faut lier les fichiers configs dans
`/etc/nginx/sites-available/` à `/etc/nginx/sites-enabled/` avec des paths absolus,
sinon le lien serait cassé et ne marcherait pas.
The only problem is that `example.com` always show me a bad gateway response. I made sure my Nginx configuration were right, but somehow it weren't listening on port 80 - the default port for HTTP. I had to go to `example.com:12345` (the port I ran my docker on), and for normal users that doesn't look intuitive at all.
# Changer le nom casse les liens
It turned out, I didn't link my configuration correctly, so there are broken symlinks in `/etc/nginx/sites-enabled/` and the configuration was never included.
WordPress utilise apparamment des liens absolus (`example.com/blog/quelque-chose`)
au lieu des liens relatifs (`/blog/quelque-chose`).
C'est pas un bon pratique : si je change le hébergeur ou le nom de domain
(qui arrivera sûrement, car les noms de domaine gratuits expiront tôt ou tard).
Je l'ai découvert quand je changeais de IP du hébergeur au nom de domaine.
After I fixed that, it worked nicely.
# Des expériences déçues
## Different name == broken website
WordPress n'est pas la chose pour moi. Il contient trop de drag-and-drop pour écrire
un post que je trouve difficile à utiliser. Il contient aussi beaucoup de widgets que
je ne jamais utiliser et qui prend trop de temps à charger.
WordPress uses absolute path (`example.com/blog/something`) rather than relative path (`/blog/something`). This leads to a problem: if I want to migrate to another domain name (guaranteed to happen, since I use a free domain name that will expire eventually). I discovered this when I moved from a port to different port, and from host IP to domain name. It frustrates me, but it isn't a big problem for now.
Étant résultat, je n'ai pas envie d'y écrire.
## Disappointing experience
# Write.as
I did successfully hosted my own WP instance, but it didn't feel right for me.
Et puis quelqu'un sur Mastodon m'a fait savoir de write.as.
Cette service utilise Markdown pour rendre les posts, et comme Markdown est si facile
à écrire, je l'aimais immédiatement.
WordPress is so bloated. They target non-programmer, and they have a lot of drag-and-drop editing. It is hard for me to select the right block and edit it. They have a lot of features for images and widgets that I won't use. Of course I can remove those features, but they would take time and not is worth it.
[WriteFreely][writefreely] est le logiciel grâce auquel write.as fonctionne. J'ai
hébergé une instance moi-même, et il marchait exactement comme j'en ai attendu.
As a result, I'm refrained from posting there.
# Mise à jour
## Write.as
J'ai essayé [jekyll][jekyll], et c'est merveilleux.
Then I was recommended this page on [Mastodon](https://joinmastodon.org/). It feels so right to me: as a programmer I love writing with Markdown - the markup language is so easy to write, and it allows me to write quickly. I can also write it in a preferred text editor such as vim and paste the text here.
Maintenant mon blog est sur [GitHub](https://huy-ngo.github.io)
et [huyngo.cf](http://huyngo.cf). GitHub ne supporte pas des thèmes que j'utilise, alors
là le blog ne apparaît correctement.
I did try to host my own [WriteFreely](https://writefreely.org/) instance (the technology behind write.as), but since I invested too much energy for WordPress I don't feel like it now, even though it seems simple according to the [installation instruction](https://writefreely.org/start). The [docker image](https://hub.docker.com/r/writeas/writefreely) is also not at all documented.
Jekyll est meilleur que WriteFreely pour moi, parce que les posts sont stockés simplement
comme texte plain, par contre WriteFreely les stocke dans SQL, ce que je considère
un overhead. Le seul désavantage c'est que je n'ai jamais appris Ruby avant.
Fortunately, write.as already feels right to me - no ads, and tracking is easily opted out. The only problem here is that my domain name is wasted there.
J'ai envie d'essayer [Hugo][hugo], qui est programmé dans Go, une langue que je connais
mieux que Ruby. En outre, Hugo supporte rendre des pages pour gemini, que je veux aussi
essayer.
Mais ça va attendre, je ne devrais pas dépenser trop de temps pour
la choice de techonologie.
## Update
Well, I just installed (it was actually easy!), and now I've moved to divers.ml
New update: I just tried jekyll, and it's awesome. Now my blog is hosted on [GitHub](https://huy-ngo.github.io). I guess I will leave the domain unused.
[wp-nginx]: https://wordpress.org/support/article/nginx/
[writefreely]: https://github.com/writeas/writefreely
[jekyll]: https://jekyllrb.com/
[hugo]: https://gohugo.io