hugo page ACEVS
Long time no update
Previously, I manually modified each document to Hugo format, then operated through git.
Due to laziness, I accumulated over 100 documents.
I tried two Obsidian plugins but failed,
with no error messages.
I might not be familiar with Obsidian yet.
There was also a JavaScript that didn't run successfully.
I installed vscode again
and found it very similar to the cursor interface, even the plugin library is quite similar.
I had used cursor a few times before for prompts.
I wrote a Tetris game in Python
and then installed the dependencies as prompted.
Then I could play Tetris directly.
This time, the prompt was to use Python to convert Obsidian md to Hugo md.
I found that the format after conversion was Hugo's default,
which was different from my original.
Again prompted +++ title and so on +++
Cursor said it was Hugo toml format.
After conversion, it was successful,
but I still had to input the folder address twice via keyboard.
I suggested changing it to mouse selection for the folder,
then packaging it into zip format, extracting it, and running it directly.
Testing was successful.
I found that Hugo's time still needed to be opened for modification,
and the current time was used for batch processing.
I suggested using the creation time to replace that time.
I found it didn't work; later, upon closer inspection, I found it was the modification time replacing that time.
In the end, I basically achieved the current requirements.
Upload to cloud storage.
I don't know if it works on all computers.
File shared via cloud storage: Obsidian2Hugo.zip
Link: https://pan.baidu.com/s/1ONC2FcERyy3RKogHmquUIw?pwd=vpxx Extraction code: vpxx Copy this content and open the Baidu Cloud mobile app for easier operation.
Other references
Small script for converting Obsidian to Hugo - Hotine's small nest
Obsidian to Hugo converter user guide - CSDN Blog
Writing Hugo blog posts elegantly with Obsidian | Ziyantang - Yuk's Blog