Publish Guide
This guide describes the procedure for publishing content on this blog.
Clone the repository
Section titled “Clone the repository”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:
git clone REPOSITORY_URLConfigure sFTP Access
Section titled “Configure sFTP Access”To upload files to the server, you will need to set up an sFTP client.
- Install the SFTP extension in VSCode.
- Create an
sftp.jsonfile at.vscode/sftp.jsonin 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}
Build the project
Section titled “Build the project”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:
pnpm buildUpload files to the server
Section titled “Upload files to the server”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.
Further reading
Section titled “Further reading”-
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.