Build HTML and Send

Dalam tutorial kali ini, kita membuat langkah-langkah men-generate HTML file dari rST (reStructuredText).

Pre-Requested:

  • Python version 3

  • Aplikasi Sphinx

  • Dokumen rST

Struktur folder Sphinx

docs
├── build
├── make.bat
├── Makefile
└── source
   ├── conf.py
   ├── index.rst
   ├── _static
   └── _templates

Langkah-langkah:

  1. Aktifkan VENV
    $ source .venv/bin/activate
    
  2. Pindah ke direktori project Dokumen Sphinx
    $ cd sphinx/docs/
    
  3. Generate HTML files dan ZIP
    $ make clean html
    $ cd build
    $ zip -r html.zip html
    
  4. Send ke server dan extract
    $ scp html.zip es.id:/home/enroen
    generic: scp [source] [destination]
    --> scp html.zip [user]@[host]:[directory]
    Enter passphrase for key '/Users/enroen/.ssh/id_rsa': ...[your-key]
    
    $ ssh es.id "unzip html.zip"
    generic: ssh [user]@[host] "[command]"
    Enter passphrase for key '/Users/enroen/.ssh/id_rsa': ...[your-key]
    replace html/lamp/index.html? [y]es, [n]o, [A]ll, [N]one, [r]ename: ...[A]