Skip to content

Publish Guide

This guide describes the procedure for publishing content on this blog.

To publish a new article, you must first clone the blog repository to your local machine. You can do this using Git with the following command:

Terminal window
git clone REPOSITORY_URL

To upload files to the server, you will need to set up an sFTP client.

  1. Install the SFTP extension in VSCode.
  2. Create an sftp.json file at .vscode/sftp.json in your project directory with the following configuration:
    {
    "name": "lab.oforte.net",
    "host": "lab.oforte.net",
    "protocol": "sftp",
    "port": 22,
    "username": "username",
    "remotePath": "/var/www/html/agonzalezrh",
    "context": "./dist",
    "privateKeyPath": "/path/to/private/key",
    "passphrase": true,
    "uploadOnSave": false,
    "useTempFile": false,
    "openSsh": false
    }

Before publishing, you need to build the project to generate the static files. You can do this by running the following command in the project directory:

Terminal window
pnpm build

Once the build is complete, you can upload the generated files to the server using your sFTP client. If you are using the SFTP extension in VSCode, you can right-click on the dist folder and select “Upload Folder” to transfer the files to the server.

  • Read about how-to guides in the Diátaxis framework

  • Learn more about Starlight and how to customize your blog.

  • Check out the Astro documentation for more information on building static sites with Astro.

  • Read SFTP documentation for more details on configuring and using the extension.