fiw typos
This commit is contained in:
parent
b228d538f9
commit
6a7d645b53
|
@ -24,7 +24,7 @@
|
|||
|
||||
<h1>Creating and maintaining a site with git</h1>
|
||||
|
||||
<p>In this post, I will show you how to manage a simple static site with a git repository. I will mention <a href="https://yunohost.org/#/" target="_blank"></a> but needless to say that you can apply this approach on any other server.</p>
|
||||
<p>In this post, I will show you how to manage a simple static website with a git repository. I will mention <a href="https://yunohost.org/#/" target="_blank"></a> but you can apply this approach on any other server.</p>
|
||||
|
||||
<h2>The root</h2>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
<p>With Yunohost, if you don't want to get your hands too dirty with nginx configuration, we'll have to install a "sandbox", an empty app that will become the root of our site.</p>
|
||||
|
||||
<p>When I first installed Yunohost, this app was available from the interface but it seems that it is no longer the case. You will have to copy and paste this link in the "Install custom app" form at the bottom of the installation page.</p>
|
||||
<p>When I first installed Yunohost, this app was available from the interface but now have to copy and paste this link in the "Install custom app" form at the bottom of the installation page.</p>
|
||||
|
||||
<a href="https://github.com/YunoHost-Apps/multi_webapp_ynh" target="_blank">https://github.com/YunoHost-Apps/multi_webapp_ynh</a>
|
||||
|
||||
|
@ -49,12 +49,11 @@ DISABLE_GIT_HOOKS = false
|
|||
|
||||
<p><a href="https://docs.gitea.io/en-us/config-cheat-sheet/">(complete list of options)</a></p>
|
||||
|
||||
<p>Remember to restart gitea</p>
|
||||
<p>Remember to restart gitea:</p>
|
||||
|
||||
<pre><code>$ yunohost service restart gitea</code></pre>
|
||||
|
||||
<p>Vous pourrez maintenant créer un post-receive hook sur votre dépot.</p>
|
||||
<p>You'll then be able to create a post-receive hook on your repository.</p>
|
||||
<p>You'll then be able to create a post-receive hook on your repository. (on the repo got to Settings -> Git Hooks)</p>
|
||||
|
||||
<pre><code>#!/bin/sh
|
||||
|
||||
|
@ -86,7 +85,7 @@ git --work-tree=$TARGET checkout --force</code></pre>
|
|||
|
||||
<pre><code>error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413</code></pre>
|
||||
|
||||
<p>You can increase the limit by editing /etc/nginx/conf.d/git.domain.tld.d/gitea.conf (on the server this time)</p>
|
||||
<p>You can increase the limit by adding the following line in /etc/nginx/conf.d/git.domain.tld.d/gitea.conf (on the server this time)</p>
|
||||
|
||||
<pre><code>client_max_body_size 50M;</code></pre>
|
||||
|
||||
|
@ -98,8 +97,6 @@ git --work-tree=$TARGET checkout --force</code></pre>
|
|||
|
||||
<h2>Autoindex / basic file server</h2>
|
||||
|
||||
<p>Si vous voulez pouvoir vous consulter l'arborescence de votre serveur depuis n'importe quel navigateur, vous pouvez activer l'autoindex en modifiant le fichier /etc/nginx/conf.d/domain.tld.d/webapp_domain.tld_.conf</p>
|
||||
|
||||
<p>If you want to be able to browse the whole file system of your domain from any web browser, you can edit /etc/nginx/conf.d/domain.tld.d/webapp_domain.tld_.conf</p>
|
||||
|
||||
<pre><code>location / {
|
||||
|
@ -107,15 +104,18 @@ git --work-tree=$TARGET checkout --force</code></pre>
|
|||
alias /path/to/root/ ;
|
||||
}</code></pre>
|
||||
|
||||
<p>Attention cependant, tout le monde pourra voir ce que vous avez sur votre serveur. En ce qui concerne les fichiers statiques (CSS, JS, police d'écriture...) utilisés sur les pages publiées, tout le monde peut déjà les voir, d'une manière contournée.</p>
|
||||
<p>Be careful though as everybody will be able to access it.</p>
|
||||
|
||||
<p>Be carfull though as everybody will be able to access it.</p>
|
||||
|
||||
<p>The only issue that comes to mind, regarding this visibility, would be if you were to store "hard-coded" passwords in text file, but it's a liabily that you should avoid in any case.</p>
|
||||
<p>The only issue that comes to mind, regarding this visibility, would be if you were to store "hard-coded" passwords in text file, but it's a very bad practice that you should avoid anyway.</p>
|
||||
|
||||
<p>I use the autoindex to easily find font files or some javascript libraries.</p>
|
||||
|
||||
</article>
|
||||
|
||||
<section class="comments">
|
||||
<iframe src="https://mamot.fr/@LaQuadrature/105278010867811014/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mamot.fr/embed.js" async="async"></script>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<h1>Créer et maintenir à jour un site avec git</h1>
|
||||
|
||||
<p>Dans ce billet, je vais présenter une manière de gérer un site web statique via un dépôt git. Je ferais certaines références à <a href="https://yunohost.org/#/" target="_blank"></a> mais il va sans dire que cette approche peut se décliner sur n'importe quel serveur.</p>
|
||||
<p>Dans ce billet, je vais présenter une manière de gérer un site web statique via un dépôt git. Je ferais certaines références à <a href="https://yunohost.org/#/" target="_blank"></a> mais cette approche peut se décliner sur n'importe quel serveur.</p>
|
||||
|
||||
<h2>La racine</h2>
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
<p>Sur Yunohost, si on ne veut pas mettre les mains dans les configs nginx, il va falloir installer un "bac à sable", une application vide qui sera la racine de notre site.</p>
|
||||
|
||||
<p>Lors de ma première installation de Yunohost, cette appli était disponible depuis l'interface mais il semblerait que ce ne soit plus le cas. Il faudra donc copier-coller ce lien dans le formulaire "Install custom app" en bas de la page d'installation.</p>
|
||||
<p>Lors de ma première installation de Yunohost, cette appli était disponible depuis l'interface mais il faut maintenant copier-coller ce lien dans le formulaire "Install custom app" en bas de la page d'installation.</p>
|
||||
|
||||
<a href="https://github.com/YunoHost-Apps/multi_webapp_ynh" target="_blank">https://github.com/YunoHost-Apps/multi_webapp_ynh</a>
|
||||
|
||||
|
@ -54,7 +54,7 @@ DISABLE_GIT_HOOKS = false
|
|||
|
||||
<pre><code>$ yunohost service restart gitea</code></pre>
|
||||
|
||||
<p>Vous pourrez maintenant créer un post-receive hook sur votre dépot.</p>
|
||||
<p>Vous pourrez maintenant créer un post-receive hook sur votre dépot. (sur le dépot: Settings -> Git Hooks)</p>
|
||||
|
||||
<pre><code>#!/bin/sh
|
||||
|
||||
|
@ -90,7 +90,7 @@ git --work-tree=$TARGET checkout --force</code></pre>
|
|||
|
||||
<pre><code>client_max_body_size 50M;</code></pre>
|
||||
|
||||
<p>Puis redémarrer nginx avec la commande:</p>
|
||||
<p>Puis redémarrer nginx:</p>
|
||||
|
||||
<pre><code>$ yunohost service restart nginx</code></pre>
|
||||
|
||||
|
@ -112,6 +112,11 @@ git --work-tree=$TARGET checkout --force</code></pre>
|
|||
<p>Sur un domaine j'utilise l'autoindex pour facilement retrouver des fichiers de police (.woff, .ttf) ou quelques librairies javascript.</p>
|
||||
|
||||
</article>
|
||||
|
||||
<section class="comments">
|
||||
<iframe src="https://mamot.fr/@LaQuadrature/105278010867811014/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://mamot.fr/embed.js" async="async"></script>
|
||||
</section>
|
||||
|
||||
</main>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue