obsidian-webpage-export
obsidian-webpage-export copied to clipboard
Create Docker container to Publish publish notes automatically
Goals
- [x] Create a docker container that automatically builds the files headlessly
- [x] Allow container to export with last settings
- [x] Allow container to export with custom settings
- [x] Setup a github action to use the container
- [x] Compatibility with future versions without publishing of container
What I did so far
- Updated all dependencies
- Created a Docker container that builds the plugin and exports the vault with latest files (supports mounting a custom config file)
- Tweaked the plugin to allow this
- Tweak publish github actions to build the Docker container and publish it to DockerHub (Need to setup
DOCKER_USERNAME
andDOCKER_TOKEN
inside repository secrets) - Created a github action to allow automation of publishing
Related to
#49 #140
Almost ready, the docker container is exporting to HTML successfully, just need to finish the github action and test it a bit, then it'll be ready to be merged.
Amazing! Thank you so much for your work on this!
Just finished this, just remember to setup the DOCKER_USERNAME
and DOCKER_TOKEN
secrets inside the repository settings. Once a new tag is published the github action will start working correctly.
Here's an example on how the github action works:
- name: Obsidian Webpage Export Action
id: obsidian-webpage-export
uses: KosmosisDire/obsidian-webpage-export
with:
vault: ./ #defaults to .
version: latest #optional
config: config.json #optional
- run: |
echo "The export is available at ${{ steps.obsidian-webpage-export.outputs.output }}"
I would advise creating a new tag both for the stable and beta release.
Awesome, this is amazing. I am pretty busy atm but I'll try and take a look at getting this set up today
Hey, I am trying to test this outside of GitHub actions and it seems to all work but I can't get it to actually export specific files. I think the config.json is not being respected somehow, I assume the config.json is meant to be the settings (data.json) from the plugin. When I export I simply get an export as if no files were selected for export. I just get the lib folder and no .html files. Is the config.json being copied into the plugin directory correctly?
Hey, sorry for the late response. I was pretty busy last week. I just pushed a fix to that.
I also remembered, I haven't tested this for the 1.8.1 version, just for the master branch. Since I made some changes to the plugin code itself, for it to work they must also be applied to the other branches.
Thanks I'll test it out again, as far as the other branches I can either copy over the changes or they will be applied when the branch is merged into master.
Just popping in to say that I haven't forgotten about this PR, but I have been pretty busy. I will likely try to integrate it with the next beta release :)
No worries! I'm pretty busy myself so I understand lol
Hey there, I'm just writing to say that this PR isn't working with 1.9.0-1b. It would probably work if the exportObsidian
method was implemented, since right now for versions that do not implement it I'm using a hacky fallback method to make it work.
In the next few weeks I'll start working on a fix, and if you need to I can make a new PR for the beta version. That way it could be implemented more easily.
I can probably just copy that function over, it was a really simple function if I remember correctly
Yeah, it's really easy. I just had to edit some bits of the export methods to allow overriding the export path.
Hi there, I just implemented the exportDocker in the latest 1.9.0 branch and it works completely fine. I'm making a PR right now with those changes for that branch. (#500 )
Thank you!
I will go head and pull this in now :)