Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw markdown source? #58

Open
paulcmal opened this issue Jun 1, 2018 · 2 comments
Open

Raw markdown source? #58

paulcmal opened this issue Jun 1, 2018 · 2 comments

Comments

@paulcmal
Copy link
Contributor

paulcmal commented Jun 1, 2018

Hi, and thanks for your amazing lightweight wiki. I've been trying it out in the past day and I feel like it's got most of what I need (especially external auth 馃憤)

I think some feature that could be useful is a way to get the Markdown source of the page without manually going through the edit page. I don't know if you intend to deploy a full-featured API at some point, but even without it it could make sense for exports.

Example implementation:

Example usage: a wiki is editable on a private network with authenticated users. For public display/accessibility reasons, we need to have a different HTML output than that provided out of the box by sausagewiki. So we write a small crawler to download all Markdown pages, and pass them all to a static-site generator (such as hugo) ; a such script can be run on cron without having to interface directly with the SQLite database.

I've never coded in Rust before (except for a few hello worlds and such basic stuff) but i would like to try and implement this if you would accept a such PR.

Keep up with the good work :)

@maghoff
Copy link
Owner

maghoff commented Jun 2, 2018

Hi! Thanks for your nice words :)

This is a feature I would like to have in Sausagewiki.

I'd prefer implementing this feature by using the Accept header rather than using different URLs. I also want to use the Accept header to produce Atom feeds of queries to the _changes endpoint, so the code base needs this handling anyway.

The HTTP handling in Sausagewiki is colored by two things:

  • How to deal with HTTP in Rust is still under experimentation in the ecosystem
  • I have strong opinions of how it should be (and not enough time to realize it in a library for others)

I suspect that this is an area of Sausagewiki where it is particularly difficult to make a PR.

If you know how the Accept header works, or you are willing to learn it, I think the Rust ecosystem could use a good library/engine to calculate the correct response format given an Accept header and a prioritized list of types the server would want to respond with. This would be a valuable contribution that you could do as a separate library (crate) and publish for the whole ecosystem, and it would be a help for me to implement the requested feature in Sausagewiki :)

@paulcmal
Copy link
Contributor Author

paulcmal commented Jun 4, 2018

Hi, and thanks for your honest answer! i think this may be too complicated for a 1st rust PR of mine since i don't have a lot of free time at the moment to get into it :)

Good luck maintaining sausagewiki and let us know if you need help designing a website, or if you just want general feedback on our usage and how we'd like it better!

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

No branches or pull requests

2 participants