2024-01-25 10:50:10 +01:00
|
|
|
Share an org buffer as an accessible web page with your own public domain.
|
2023-06-19 15:33:56 +02:00
|
|
|
|
2023-06-19 16:02:33 +02:00
|
|
|
![Demo](demo.gif)
|
|
|
|
|
2023-06-19 15:33:56 +02:00
|
|
|
## Requirements
|
|
|
|
|
2024-01-25 10:50:10 +01:00
|
|
|
- **Domain**
|
|
|
|
- **Hosting**: It is recommended to use a server with SSH access.
|
2023-06-19 15:33:56 +02:00
|
|
|
|
2023-06-13 10:20:08 +02:00
|
|
|
## Install
|
|
|
|
|
|
|
|
Add in your `init.el`.
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(use-package org-share-to-web
|
|
|
|
:straight (:host github :repo "tanrax/org-share-to-web.el" :files ("org-share-to-web.el"))
|
|
|
|
:ensure t)
|
|
|
|
```
|
|
|
|
|
2023-06-13 10:11:28 +02:00
|
|
|
## Configure
|
|
|
|
|
2023-06-19 16:02:33 +02:00
|
|
|
Configure the domain to be used to access the file share and the directory where it will be hosted using TRAMP.
|
2023-06-13 10:11:28 +02:00
|
|
|
|
|
|
|
```elisp
|
2023-06-19 16:02:33 +02:00
|
|
|
(setq org-share-to-web-domain "") ; Domain
|
|
|
|
(setq org-share-to-web-directory "") ; TRAMP path
|
2023-06-13 10:11:28 +02:00
|
|
|
```
|
|
|
|
Example.
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq org-share-to-web-domain "https://mydomain.com/")
|
|
|
|
(setq org-share-to-web-directory "/ssh:debian@mydomain.com:~/www/")
|
|
|
|
```
|
2023-06-13 10:24:53 +02:00
|
|
|
|
2023-06-19 16:02:33 +02:00
|
|
|
The domain must end with `/`. The directory must end with `/` and start with `/ssh:` or another TRAMP method.
|
|
|
|
|
2023-06-13 10:24:53 +02:00
|
|
|
## Run
|
|
|
|
|
|
|
|
Open an Org file and run `org-share-to-web-buffer`.
|
|
|
|
|
|
|
|
It will copy the URL to your clipboard to open the document share.
|
2023-06-13 12:33:00 +02:00
|
|
|
|
2023-06-14 12:33:35 +02:00
|
|
|
If you need to manage the shared files, such as deleting them, use `org-share-to-web-dired`.
|
|
|
|
|
2023-06-13 12:33:00 +02:00
|
|
|
## Theme
|
|
|
|
|
|
|
|
If you want it to look really nice, include the following lines at the beginning of your Org documents.
|
|
|
|
|
2023-06-26 13:01:30 +02:00
|
|
|
### Light
|
|
|
|
|
2023-06-13 12:33:00 +02:00
|
|
|
```org
|
2023-06-26 13:01:30 +02:00
|
|
|
#+html_head: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lora:wght@500&display=swap">
|
|
|
|
#+html_head: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap">
|
2023-06-26 14:22:58 +02:00
|
|
|
#+html_head: <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tanrax/org-share-to-web.el@main/themes/light.css">
|
2024-01-16 11:21:17 +01:00
|
|
|
#+OPTIONS: toc:nil num:nil html-postamble:nil
|
2024-01-25 10:50:10 +01:00
|
|
|
#+TITLE: My title
|
2023-06-13 12:33:00 +02:00
|
|
|
```
|
2023-06-27 12:46:09 +02:00
|
|
|
|
|
|
|
### Dark
|
|
|
|
|
|
|
|
```org
|
|
|
|
#+html_head: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lora:wght@500&display=swap">
|
|
|
|
#+html_head: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inconsolata&display=swap">
|
|
|
|
#+html_head: <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tanrax/org-share-to-web.el@main/themes/dark.css">
|
2024-01-16 11:21:17 +01:00
|
|
|
#+OPTIONS: toc:nil num:nil html-postamble:nil
|
2024-01-25 10:50:10 +01:00
|
|
|
#+TITLE: My title
|
2023-06-27 12:46:09 +02:00
|
|
|
```
|