2018-09-13 15:16:53 +02:00
#+TITLE : Some Technicalities about Building My Work Page
2021-10-17 18:44:22 +02:00
* Update checklist
1. [ ] Publications
2022-03-30 18:42:54 +02:00
2. [ ] Research keywords
3. [ ] Roles
4. [ ] Seminars
5. [ ] Programming
6. [ ] Teaching
7. [ ] News
8. [ ] Dead links
2021-10-17 18:44:22 +02:00
2018-11-19 12:34:20 +01:00
* Workflow
2021-10-17 18:52:11 +02:00
1. Load [[file:work.el ][work.el ]].
2019-11-18 17:37:17 +01:00
#+BEGIN_SRC elisp :results none
2021-10-17 18:52:11 +02:00
(load-file "~/Candies/Sites/work/work.el")
2018-11-19 12:34:20 +01:00
#+END_SRC
2021-11-20 15:42:45 +01:00
2. Open [[file:index.org ][index.org ]] and publish the current project with a prefix
(=C-u= ) to get the updated timestamp, or run the following
snippet:
2021-10-17 18:52:11 +02:00
#+BEGIN_SRC elisp :results silent
2021-11-20 15:42:45 +01:00
(org-publish-project "work-site" t)
2021-10-17 18:52:11 +02:00
#+END_SRC
2019-01-21 17:13:06 +01:00
2021-11-20 15:42:45 +01:00
3. Go to https://entrepot.ibisc.univ-evry.fr/ and upload the files
2021-05-10 16:04:49 +02:00
and directories from [[file:www/ ][www/ ]] to the folder =ivanov-page-perso= .
2019-01-21 17:13:06 +01:00
2021-05-10 16:04:49 +02:00
The username to login to the entrepôt is
=prénom.nom@ibisc.univ-evry.fr= , and the password is the same one
as for the Intranet IBISC. Detailed information [[https://intranet.ibisc.univ-evry.fr/projects/intranet/wiki/Entrep%C3%B4t_de_fichiers_Installation ][here ]].
2018-11-19 12:34:20 +01:00
2021-10-17 18:52:11 +02:00
The following source code block is a shortcut for reloading the
configuration, removing the timestamps, and publishing the
whole site.
#+BEGIN_SRC elisp :results silent
(load-file "~/Candies/Sites/work/work.el")
2021-11-20 15:42:45 +01:00
(org-publish-project "work-site" t)
2021-10-17 18:52:11 +02:00
#+END_SRC
2021-12-20 13:42:08 +01:00
Evaluating this code block opens the exported site in the last
viewed Firefox window.
#+BEGIN_SRC elisp :results silent
2024-09-25 16:41:25 +02:00
(shell-command "firefox public_html/index.html")
2021-12-20 13:42:08 +01:00
#+END_SRC
2024-09-25 16:40:00 +02:00
* Pushing to remote
Run the following command:
2024-09-25 16:47:24 +02:00
#+BEGIN_SRC elisp :results silent
2024-09-25 16:40:00 +02:00
(async-shell-command "sftp -b push.sftp sivanov@pageperso.ibisc.univ-evry.fr")
#+END_SRC
2024-09-25 16:47:24 +02:00
2024-09-25 16:40:00 +02:00
The output will appear in a buffer called =*Async Shell Command*= .
* New way of updating the page <2024-09-25>
:PROPERTIES:
:VISIBILITY: folded
:END:
I asked Ludovic /again/ if he could give me some direct access to
a directory so that I don't have to toy with Seafile, which also
regularly broke and didn't actually update my page.
Ludovic gave me SFTP access to a remote directory which I can check
out as follows:
#+BEGIN_SRC shell
sftp sivanov@pageperso.ibisc.univ-evry.fr
#+END_SRC
Pubkey authentication with my normal public key works as of today.
I wrote a [[file:push.sftp ][short SFTP script ]] to push the files to remote.
I used to put the exported HTML files into =www/= , but I could not
figure out how to make =sftp= transfer =www/= and /overwrite/
=public_html/= remotely, rather than putting it in as a subdirectory.
I figured it was easier to just rename the local directory, as I don't
care anyway.
2021-11-20 15:42:45 +01:00
* Forcing Org-mode to ignore the timestamps <2021-11-20> :old:
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2021-11-20 15:42:45 +01:00
Before today, I used to need to call
#+BEGIN_SRC elisp :results silent
(org-publish-remove-all-timestamps)
#+END_SRC
in order to force Org-mode to export every file. Now, this can be
done by setting the =FORCE= argument of =org-publish-project= to
=t= , as seen in the above code blocks.
2021-05-10 16:04:49 +02:00
* Seafile problem <2020-02-17 Mon> :old:
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2020-02-17 15:20:29 +01:00
** Problem
After another update, Seafile started telling me this when I tried
to start it:
#+BEGIN_QUOTE
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Aborted (core dumped)
#+END_QUOTE
I did a couple hours of searching, and found some threads, which did
not help:
- https://github.com/NixOS/nixpkgs/issues/42893
Idea: imperatively install Seafile and then tell it where to
search for plugin:
#+BEGIN_SRC shell
nix-env -iA nixpkgs.qt5.qtbase
export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS
#+END_SRC
Tried this literally, got
#+BEGIN_QUOTE
error: attribute 'nixpkgs' in selection path 'nixpkgs.qt5.qtbase' not found
#+END_QUOTE
- https://github.com/NixOS/nixpkgs/issues/65399
There is a new way to describe Qt packages which correctly handles
looking for plugins, this issue is there to help track all the
problems that this may lead to. There is [[https://hydra.nixos.org/build/96804884/download/1/nixpkgs/manual.html#sec-language-qt ][some documentation ]] as to
how to do it properly. I didn't feel like hacking Nixpkgs right
away.
- https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/7
Tell Seafile where to look for plugins. This is not necessarily
even applicable with Nix.
- https://github.com/haiwen/seafile/issues/6
Apparently, Seafile has a CLI interface, but I don't find it in
my installation. More concretely, the file =seafile-cli= appears
in shell completions, but it doesn't launch nor could I find
where it was.
** My hack <2020-02-17 Mon>
My current hack consists in the following modifications:
1. Add =qt5.qtbase= and =seafile-client= to =home.packages= in
[[/home/scolobb/.config/nixpkgs/home.nix ][=home.nix= ]].
2. Install =seafile-shared= instead of =seafile-client= in
[[file:shell-seafile.nix ][=shell-seafile.nix= ]].
Very weirdly, this makes =seafile-applet= work. I tried not doing
(1) and putting all the packages in [[file:shell-seafile.nix ][=shell-seafile.nix= ]], but it
won't work. Also, again weirdly, outside of Nix shell the
=seafile-applet= coming from the home-manager installation never
gets past the message
#+BEGIN_QUOTE
lang = English, translation = (null), locale.name() = en_US
#+END_QUOTE
without showing the interface or doing whatsoever.
** Proper solution?
A proper solution would probably consist in updating the Seafile
package to comply with the new [[https://hydra.nixos.org/build/96804884/download/1/nixpkgs/manual.html#sec-language-qt ][way to describe Qt packages ]].
2018-09-13 15:16:53 +02:00
* Removing the publish cache
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2018-09-13 15:16:53 +02:00
Org-publish will not detect files being deleted from the output. To
force it to clear its caches, do the following:
#+BEGIN_SRC elisp
(org-publish-remove-all-timestamps)
#+END_SRC
* Possible colors for the banner
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2018-09-13 15:16:53 +02:00
#+BEGIN_SRC css
background-color: azure;
background-color: lightcyan;
background-color: paleturquoise;
#+END_SRC
* References
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2018-09-13 15:16:53 +02:00
** Org-mode
- https://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
- https://orgmode.org/manual/Configuration.html#Configuration
- https://orgmode.org/manual/CSS-support.html#CSS-support
** Examples
- https://justin.abrah.ms/emacs/orgmode_static_site_generator.html
- https://bastibe.de/2013-11-13-blogging-with-emacs.html
- https://ogbe.net/blog/blogging_with_org.html
2021-10-17 18:56:23 +02:00
* Local Variables :noexport:
2023-04-17 22:43:56 +02:00
:PROPERTIES:
:VISIBILITY: folded
:END:
2021-10-17 18:56:23 +02:00
# Local Variables:
# eval: (auto-fill-mode)
# ispell-local-dictionary: "en"
# org-link-file-path-type: relative
# End: