comparison doc/libervia-cli/blog.rst @ 3536:0985c47ffd96

doc: config file is now `libervia.conf` (even if `sat.conf` still works, for now)
author Goffi <goffi@goffi.org>
date Thu, 03 Jun 2021 15:15:11 +0200
parents c80a0f864b5d
children 267e4987b58b
comparison
equal deleted inserted replaced
3535:67aebefb44fc 3536:0985c47ffd96
69 the metadata which contain things like title, comments infos, or tags. 69 the metadata which contain things like title, comments infos, or tags.
70 70
71 For some common editors (like **vim** or **Emacs**), the editor will be automatially 71 For some common editors (like **vim** or **Emacs**), the editor will be automatially
72 opened using a split screen with *body* in one side, and metadata on the other. If the 72 opened using a split screen with *body* in one side, and metadata on the other. If the
73 editor is not supported or doesn't support split screen, you'll edit first the *body*, then 73 editor is not supported or doesn't support split screen, you'll edit first the *body*, then
74 the *metadata*. You can also specify editor and arguments in ``sat.conf``, see 74 the *metadata*. You can also specify editor and arguments in ``libervia.conf``, see
75 `configuration <edit_conf_>`_ below 75 `configuration <edit_conf_>`_ below
76 76
77 If you don't change anything or publish an empty blog post, the edition will be cancelled. 77 If you don't change anything or publish an empty blog post, the edition will be cancelled.
78 78
79 In the metadata (see `below <edit_metadata_>`_ for details), you can use ``"publish": 79 In the metadata (see `below <edit_metadata_>`_ for details), you can use ``"publish":
177 177
178 editor 178 editor
179 ^^^^^^ 179 ^^^^^^
180 180
181 Local editor used is by default the one set in ``$EDITOR`` environment variable, but you 181 Local editor used is by default the one set in ``$EDITOR`` environment variable, but you
182 can specify one in ``sat.conf``. To do so, you have to set the name of an editor 182 can specify one in ``libervia.conf``. To do so, you have to set the name of an editor
183 executable in the ``editor`` option in ``[li]`` section. 183 executable in the ``editor`` option in ``[li]`` section.
184 184
185 You can specify the args to use by using ``blog_editor_args`` option. Use 185 You can specify the args to use by using ``blog_editor_args`` option. Use
186 ``{content_file}`` to get the path of the main content file (the body of the blog post), 186 ``{content_file}`` to get the path of the main content file (the body of the blog post),
187 and ``{metadata_file}`` to get the path of the json metadata. 187 and ``{metadata_file}`` to get the path of the json metadata.
203 modification is saved. In both cases you may use ``{url}`` to set the location of local HTML file. 203 modification is saved. In both cases you may use ``{url}`` to set the location of local HTML file.
204 204
205 This can be used to activate automatic refreshing of the page. 205 This can be used to activate automatic refreshing of the page.
206 206
207 For **Konqueror**, you can use its D-Bus API to do refreshing. Ensure that ``qdbus`` is 207 For **Konqueror**, you can use its D-Bus API to do refreshing. Ensure that ``qdbus`` is
208 installed on your system, and enter the following lines in your ``sat.conf``: 208 installed on your system, and enter the following lines in your ``libervia.conf``:
209 209
210 .. sourcecode:: cfg 210 .. sourcecode:: cfg
211 211
212 [li] 212 [li]
213 blog_preview_open_cmd = konqueror {url} 213 blog_preview_open_cmd = konqueror {url}
214 blog_preview_update_cmd = /bin/sh -c "qdbus $(qdbus org.kde.konqueror\*) /konqueror/MainWindow_1 reload" 214 blog_preview_update_cmd = /bin/sh -c "qdbus $(qdbus org.kde.konqueror\*) /konqueror/MainWindow_1 reload"
215 215
216 For **Firefox**, you may use ``xdotool`` on X11. Once you have installed this tool, enter the 216 For **Firefox**, you may use ``xdotool`` on X11. Once you have installed this tool, enter the
217 following lines in your ``sat.conf``: 217 following lines in your ``libervia.conf``:
218 218
219 .. sourcecode:: cfg 219 .. sourcecode:: cfg
220 220
221 [li] 221 [li]
222 blog_preview_open_cmd = firefox -new-tab {url} 222 blog_preview_open_cmd = firefox -new-tab {url}
230 A dictionary with a mapping from syntax name to file extension can be used. This can be 230 A dictionary with a mapping from syntax name to file extension can be used. This can be
231 useful to activate the right syntax highlighting in your editor. There is a default 231 useful to activate the right syntax highlighting in your editor. There is a default
232 mapping which can be overriden. 232 mapping which can be overriden.
233 233
234 The mapping is set in the ``syntax_ext_dict`` option of the ``[li]`` section of your 234 The mapping is set in the ``syntax_ext_dict`` option of the ``[li]`` section of your
235 ``sat.conf`` file. For instance, if your prefer do your ``.markdown`` for temp files 235 ``libervia.conf`` file. For instance, if your prefer do your ``.markdown`` for temp files
236 instead of the default ``.md``, you can use this: 236 instead of the default ``.md``, you can use this:
237 237
238 .. sourcecode:: cfg 238 .. sourcecode:: cfg
239 239
240 [li] 240 [li]