Welcome to HuangFuSL's blog¶
Table of contents¶
Blog timeline¶
The following pages are notes from Building a simple text editor with iced, a cross-platform GUI library for Rust using iced lib.
Keywords: iced::widget::column, iced::widget::row, iced::widget::horizontal_space, iced::Theme, iced::Length
Keywords: iced::Application, iced::Command, iced::executor, std::io, std::path::Path, std::sync::Arc, tokio::fs::read_to_string
Recent updates¶
- 2024-02-09:3. Complex Objects,Rust GUI library,1. Hello, World!,10. Misc,2. Multi-line input,3. Theme and cursor indicator,4. Async file loading,5. File picker,6. File path indicator,7. New and Save,8. Button Prettify,9. Syntax Highlighting
- 2024-02-07:语法
- 2024-02-06:0. Introduction,1. Variables,6. Supplements
- 2024-01-27:2. Control Flows,5. Error Handling
- 2024-01-21:4. Lifetimes
Currently working on¶
Customization¶
Click on the buttons to change the primary color.
Click on the buttons to change the accent color.
However, if you try to switch from dark mode to light mode or reversed, changes to the primary color and accent color will lose.
Building documentation¶
Run git clone https://github.com/HuangFuSL/HuangFuSL.github.io.git
to get the
source code.
Bootstrap icon installation¶
The site uses bootstrap icons, which are added as submodules in
third_party/icons
. You have to manually initialize the submodule.
git submodule update --recursive --remote
LaTeX support¶
The site uses xelatex
and dvisvgm
to render tex document to SVG images
embedded in the markdown files. However, as the SVG images are ignored by
.gitignore
, you have to manually perform the conversion.
For GitHub repository clones:
- Run
git submodule update --recursive --remote
to receive the template. - Make sure you have installed and correctly configured
xelatex
anddvisvgm
. - Add
./template
directory to$TEXINPUTS
environmental variable. - Execute
ci/convert.py
in the root directory of the repository. - Run
mkdocs serve
to view the images.
The template is located at HuangFuSL/latex-template
GitHub workflow¶
You need to install the dependencies stored in requirements.txt
before you can
start building the site:
pip install -r requirements.txt
There are cross-links in the site which require metadata defined in the page,
so the project should be built before mkdocs serve
is executed. The exported
metadata is saved in meta.json
after a build is successfully executed. To
build the site, execute the following command:
mkdocs build -d build
Execute mkdocs serve
, the built site will appear at http://127.0.0.1:8000
Acknowledgements¶
The blog relies on the following open-source projects:
The blog uses the following mkdocs plugins to function correctly.
- Neoteroi/mkdocs-plugins
- lukasgeiter/mkdocs-awesome-pages-plugin
- timvink/mkdocs-git-revision-date-localized-plugin
- zhaoterryy/mkdocs-git-revision-date-plugin
- squidfunk/mkdocs-material
- facelessuser/mkdocs-material-extensions
- fralau/mkdocs_macros_plugin
- danielfrg/mkdocs-jupyter
- prcr/mkdocs-meta-descriptions-plugin
Unless noted, content in this blog are shared under CC-BY-NC-SA 4.0 license.
Version information¶
commit 9d67de48b564bf2b8b2453baaf0a25ac4a2677b4
Merge: b87bcbc9 62bba4cd
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat Feb 10 00:07:52 2024 +0800
Merge pull request #321 from HuangFuSL/Rust-gui-starter
Rust gui starter project