Skip to content

Conversation

@prime-run
Copy link

This PR refactors and redesigns the cli implementation.

Also implements the planned feature to export the generated HTML (#44),

Added Features :

  • Adds the ability to export the rendered Markdown as a standalone HTML file.
  • Changes the default command to standalone using $CACHE_DIR/go-grip/ path for html sources
  • Introduces optional output dir -o , --output to exported static files to.
  • Support for grouped md files rendering + a simple index page
  • Update README.md accordingly
  • Other small modifications

NOTE: as you see this PR has a single commit, the reason is I commited the built binary and after removing it's index from history (~root) realized I had the repo fully cloned (mistook my original clone for a --depth=1 as I alsmost always perform a shallow clone). And well you know what it means I guess!

Anyways in case you are intrested in actual commit history of this pr, here they are (after c446496 )

@chrishrb
Copy link
Owner

many thanks for this PR! Will look into it the next few days 👍

@ernstki
Copy link

ernstki commented Sep 21, 2025

Pretty sweet.

You can avoid breaking backwards compatibility with the existing way of running go-grip by implementing go-grip --export in place of go-grip render.

This is in fact the calling convention used by the original Python-based grip to write the rendered Markdown to a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants