353 karma · joined July 12, 2016
Blog: https://scripter.co
* Few projects:
- Org-mode + Hugo: https://ox-hugo.scripter.co
- Eless (A Better less): https://eless.scripter.co
[1]: http://plantuml.com/ [2]: https://scripter.co/org-contribution-flowchart/#flow-chart
MathJax requires me to add 'unsafe-inline' and 'unsafe-eval' to script-src, and 'unsafe-inline' style-src. So my overall CSP becomes quite weak :(
Anyone would have an idea how to implement CSP without those, and uses MathJax?
Thanks.
[1]: https://github.com/gohugoio/hugo/issues/4628#issuecomment-38...
Because.. uploading a Markdown file to a Github issue is one thing, but then what about refactoring, occasional post edits, etc.? Probably keep on overwriting the same Github issue with updated Markdown files?
You don't have to reply to these questions here.. just some thought if you do invest time in implementing this feature request.
And another custom output format to dump search index in JSON for the whole site (to be used by sorts of fuse.js, lunr.js, etc.)
Along the same lines, I found the Go templating language very natural to pick up, probably because I am a Lisp afficionado.
And lastly, you have a typo in the list of markup languages supported for content; Mark -> MMark. And you missed out Org mode in that list.
For those who might be wondering, using OP's GitHub repo as example, the first post in the issue thread[1] gets converted to a blog post[2].
That's pretty cool! Though, it will be tough to pry myself away from my blogging flow that uses Org mode as content source and uses all of the Org+Emacs functionality :)
[1]: https://github.com/dbriemann/blog/issues/2 [2]: https://dbriemann.github.io/blog/2-introducing-glyph-static-...
[1]: https://discourse.gohugo.io/t/site-search-implemented-using-... [2]: https://scripter.co/search/
Ox-hugo that the OP mentioned is just an Emacs package that exports Org to Markdown + front-matter (without having to manually specify many of be front matter data in the Org source.. most of it is auto derived.).
For folks, if interested in seeing an example of the Org source, and ox-hugo + Hugo generated site, here's the source[1] of my blog[2].
More: https://ox-hugo.scripter.co/#demo
[1]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas... [2]: https://scripter.co
Few examples:
1. ox-hugo documentation site from one file[1], source[2]
2. My blog[3]
3. ox-hugo test site (300+ test pages and counting)[4]
[1]: https://ox-hugo.scripter.co/ [2]: https://github.com/kaushalmodi/ox-hugo/raw/master/doc/ox-hug... [3]: https://scripter.co/ [4]: https://ox-hugo.scripter.co/test/
[1]: https://www.reddit.com/r/emacs/comments/809xwx/how_to_get_pl...
As I said, I can see the syntax to be easy to grasp for anyone knowing any coding language. But Lisp fans would be in for a treat.
In very simple terms, a list function always had the function symbol or identifier as the first element of a list (everything is a list in Lisp), and any number of arguments have to follow after that.
Example of an add function in Lisp:
(add 1 2)
The same thing in Go templates: {{ add 1 2 }}
> Org mode support seems to be interesting. I've always wanted to pick that up as well. Could you share some good resources you might be aware of?If you use Emacs, the best Org reference is the Org Info manual. Do `C-h i` to open info within Emacs and jump to the Org manual. (You probably aren't using Emacs as you mentioned that you are not familiar with Lisp. So may be this tidbit helps someone else).
If not using Emacs,
- Check out the section on Markup[1] in the official Org manual in HTML. - My blog source in Org[2] - Source of ox-hugo.scripter.co website (100% of the content) from this one Org file [3]
If you don't want to get into too much detail:
* Heading level 1
** Heading level 2, and so on
*bold* /italics/ _underline_ +strikethrough+
- list item 1
- list item 2
1. ordered list item 1
2. ordered list item 2
But if you are really getting into Org syntax, here's the mega test file[4] for ox-hugo package that exports to 100's (literally) of Hugo content posts here[5] and gets rendered to HTML by Hugo on https://ox-hugo.scripter.co/test/.The good news is that you don't have to use Emacs for Org mode, if you plan to use Org mode just like Markdown (and may be a little bit more). If you do use or end up using Emacs, then Org mode is like 1000x Markdown (or may be more :) ).
> Thank you for bringing this up! I appreciate it :)
You are welcome.
Hopefully this response wasn't too much of an information overload.
[1]: https://orgmode.org/manual/Markup.html
[2]: https://gitlab.com/kaushalmodi/kaushalmodi.gitlab.io/raw/mas...
[3]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master...
[4]: https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master...
[5]: https://github.com/kaushalmodi/ox-hugo/tree/master/test/site...
- Single static binary for any platform for a static site generator; couldn't get better. - The fastest too! - The Go templating is great! It should be fairly easy to pick up by anyone knowing any programming language. I love it especially because it reminds me of Lisp. Example: {{ or (and $a $b) $c }}. (For the folks that are not a fan of Lisp, you can right the same as {{ and $a $b | or $c }}.)
Hugo has inbuilt support for Org mode. But I use more Org syntax than the inbuilt version can support. So I came up with an Emacs package that's an Org exporter backend that exports to Hugo/Blackfriday Markdown + front-matter -- ox-hugo. Folks appreciative of Emacs Org mode might want to check out the homepage https://ox-hugo.scripter.co/ "dog-fooded" by the package itself :)
Details:
I have kept the default config close to "emacs -Q" to keep the bash-infused elisp minimal, and because I don't use Vim bindings myself :)
Though, I was sure that that decision wouldn't be the best for everyone. So there's a way to config eless via "~/.emacs.d/elesscfg"[1]. If that file is present, it is loaded after the default config.
So you can add/remove/override any binding, add custom functions and bind those, tweak few faces, or change the theme, anything that elisp allows.. even install packages (Magit comes to mind).
If someone has suggestion for a minimal Vim-equivalent eless config to replace the existing one, please put that in form of an elesscfg file (gist, their repo?), and link that in comments or as an Issue on the eless repo. I'll update the documentation referencing those example configs.
I can edit multi-thousand line (5k+) Org documents just fine. So it's probably the major mode or some minor mode(s), or a combination.
The package is ox-hugo: https://ox-hugo.scripter.co/
In fact, that site is dog-fooding ox-hugo.. I simply commit the Org files, and Org --ox-hugo--> Markdown --hugo--> HTML conversion happens on Netlify, and that site gets updated.
Github repo: https://github.com/kaushalmodi/ox-hugo/