Follow

template systems.
Jeykell is written in , from 2008.
Hugo is written in , from year ? apparently recent.
The obvious choice is hugo.

i write 5 thousand html pages raw manually, in xah-fly-keys and xah-html-mode. The number of keystrokes to create a html page, is less than markdown, org-mode, keykell, hugo, or whatnot template systems.

the price you pay, is that you have to know html, css, emacs lisp, well. What you get is far more power, efficiency, flexibility and control.

@xahlee

The speed of content creation for web pages cannot be merely measured by the number of key strokes. (Also, it's not clear how to came to that key stroke comparison result.)

May be it is subjective, but I can create any web page *much faster* and while being *consistent* at that using Org mode.

See this page of mine as an example: scripter.co/notes/nim/. The source is in Org mode, and none of the code block outputs are hand typed!

@kaushalmodi well, if you write html raw, there's 0 time spent in exporting. lol :D

though, thanks for input... was it you last time about 0.5 year ago we discussed i think about hugo? related to generating links. i didn't have time to look further :( sorry about that.

@kaushalmodi for me, am getting old. sticking to my own html+emacs system is probably gonna stay will i reach graves.

but, i might look into hugo. (because recently another guy questioned me about that).
I think, the associate tech, how they do things, the css templates, what they are, those part interest me, say for writing observation blogs, at least.

@kaushalmodi i was reading a bit about jenkell and hugo today. but don't have time to install them n try.

@xahlee

If it's just installation, #Hugo doesn't need an elaborate installation procedure. You simply download its statically linked binary and put it in your PATH.

Yes, you will need to invest some initial time to learn the templating and structure of any new static site generator you touch; that applies to both Hugo and Jekyll.

As I am not a web developer, I cannot recommend Hugo enough - 1/2

@xahlee

On the other hand I was never able to even get all the Ruby dependencies installed in Cygwin for Octopress/Jekyll, and I was in a complex for many years that I won't be ever able to design and build my own website. - 2/2

@xahlee

> was it you last time about 0.5 year ago we discussed i think about hugo?

Yes, I believe so :)

@kaushalmodi yes. a while back i visited the tab still left open, but then it's already been a while and i forgot the points and context.

sorry about that. I try to follow thru conversation. sometimes now i just rant a lot more.

... so you are not using hugo or any, but just org? then why r u interested in hugo or discussion about them? in particular, about the links we were talking about? which i think was not beginner's concern.

@xahlee

> ... so you are not using hugo or any, but just org?

No, I use both when building a site but for different purposes -- Org mode is great with this syntax and content creation, so I write the content source in that, and then export that to Markdown. Hugo is great with its templating and speed, so I use that for the final HTML generation - 1/3

@xahlee

Technically the same can be done with 100% Org mode + Elisp too, but it's a lot slower, needs a lot of work, and I rather leave the HTML generation stuff to a tool that knows that much better than me :)

> then why r u interested in hugo or discussion about them?

Because I have been using #Hugo for a while now and cannot appreciate the project enough.

> in particular, about the links we were talking about? which i think was not beginner's concern - 2/3

@xahlee
I didn't follow that. I jumped in the conversation where you mentioned that HTML takes lesser keystrokes than writing in Org mode/Markdown. - 3/3

@kaushalmodi
regarding to what you said.
true, consistent is important. especially in a team.

though, for personal pages, i wanted to say still, writing html raw, is faster, consistent, more powerful, more flexible, than ANY of template system, including org. And only draw back is one has to be expert of html, css, emacs lisp.

in another perspective, basically you are just creating ur own system of huge or jeykell in elisp.

@kaushalmodi
the other aspect, about html being hard to read, vs org or markdown. That argument has some merit, but also, in markdown, org, the expression is very limited. also, u can't include images. (one can, but not as good as html rendered in browser, of course).
but if working in html, consider reading the doc is always done in browser.

@kaushalmodi nice site though.
i look at the html source code, omg.
all cms tends to do that.
:D

@xahlee

> i look at the html source code, omg.

I'm not an HTML expert. What was the "omg"? :)

Was it that the HTML was not very readable? It was probably not as I minify the HTML.

Let me know the issue and I can look into fixing it in my theme if possible.

I don't use a CMS. I simply convert Org mode -> Markdown -> HTML.

@kaushalmodi
once upon a time, the generated html is widely despised by “we” hackers. First was Microsoft Word, then FrontPage, then Adobe/Macromedia Dreamweaver, Flash. see
en.wikipedia.org/wiki/Web_temp
The generated output is unreadable, lots of bag tags, redundant classes, id, redundant tags, etc.

@kaushalmodi

of the generated html of your page, i can't say it's bad. It's just how today's things are.
The situation was, we used to encourage people to look at html source in browser to learn html or how certain things are done. That has been impossible since 2009 or so. (to do that today is more like trying to reverse engineer)

@xahlee

> but also, in markdown, org, the expression is very limited.
Can you give a brief example? If there's something you cannot do in Org mode (or Markdown), you can always use HTML snippets in-between to fill that gap.

> also, u can't include images. (one can, but not as good as html rendered in browser, of course).

Can you elaborate? Images added through Org mode/Markdown can end up as img or figure tags or even embedded SVG if you like - 1/2

@xahlee

After reading the later part of your comment, I believe that you are referring to viewing the images in the Org mode source itself. That works great too; I have `#+startup: inlineimages` in my Org documents.

> but if working in html, consider reading the doc is always done in browser. - 2/2

@kaushalmodi yes, good point, i forgot about one can include raw html in org.

@kaushalmodi
was trying to address the point that html is less readable than in org or markdown, in context of writing raw html vs org.
So, was saying, consider reading always done in browser only if write raw html. This way, raw html system is better, cuz browser is a magnitude robust/richer/powerful than what emacs can display.

@xahlee

Right, I wasn't denying that. My main argument was that it's many magnitudes faster to update a web page using Org mode (or Markdown if one wishes :)) than to code in raw HTML.

@kaushalmodi but am not seeing the point?
when writing in raw html, there's 0 time spend in generating files, since there's no generating step. ?

so if u follow my argument, we are back to the number of keystrokes required in writing the markup. Take org for example, either one type those *** ~~ etc or use C-c etc keys. Now consider a html mode, also has shortcut keys for markup, but simpler/easier one.

@xahlee

> there's 0 time spend in generating files

That time is not significant. #Hugo takes a second or few, or may be 10 seconds (if have hundreds of thousands of pages).

It would take me lot more time to manually refactor all my HTML pages, than to edit one template file, <blink>, and the site will be regenerated - 1/2

@xahlee

Actually, I don't even regenerate the final 100% HTML locally; I just update the content files and templates, and commit them to my git repo; the site gets generated/deployed on a CI/CD (#netlify). - 2/2

@xahlee

> Take org for example, either one type those *** ~~ etc or use C-c etc keys. Now consider a html mode, also has shortcut keys for markup, but simpler/easier one.
I think you are narrowing focused on typing a word with some formatting.

I am thinking of the overall cost of updating the whole site and its future maintainance - 1/2

@xahlee

A very simple example: I commit only one new content file (a Markdown file), and that updates the post list, RSS, sitemap, tags list, json feeds, what not in under a second. You need to account the time for all that too when updating a site. - 2/2

@xahlee

Or if not looking at the whole site, consider just adding a code block (and I probably have few hundred of those on my site, ref: that Nim notes page I linked earlier).

How many key strokes would HTML need to add just a syntax highlighted code block, vs that in Org mode?

@kaushalmodi lol. for this one, that's 2 key strokes exactly. I even did a video showing that i think.

@kaushalmodi am heading to bed.

we should do video hangout. then, you can show me your system.

@xahlee

There actually not much to the setup. I'll post a short gif screencast of my flow when I get a chance later today.

@kaushalmodi well, the point is to chat with you the person, have fun.

i mean, seriously, i really have remote chances of ever actually using hugo. as far as leaning it, i could and prefer official tutorial. i think it's simple enough. of curse, unless am using it and have a problem to solve. :)
but really, practically, i have 0 chance using hugo.

and i've been wanting to ask you. What about you consider, using raw html ditching org/hugo?

@xahlee

> well, the point is to chat with you the person, have fun.

Honestly, I don't video chat much. I more prefer text chats and emails.

> practically, i have 0 chance using hugo.

It's understood that you have no problems with your current flow, there's no reason to switch.

1/2

@xahlee

> What about you consider, using raw html ditching org/hugo?

- I am not an HTML expert, and also I like my content source portable.
- I like that the same #orgMode source can be exported to HTML or PDF or Markdown, anything I like.
- I like to separate content from structure.
- The "signal to noise" ratio in HTML is too low, and it's too tedious to add that needed "noise", which I leave to static site generators (#Hugo).

So I don't see myself using raw HTML.

2/2

@kaushalmodi get on google hangout, lets do chat!

face to face communication, the most natural and basic and effective communication!

stop the nonsense of tech geeking text only crap. that gets society bad.

@kaushalmodi that's the thing.
you trying to convince me using org/hugo, i don't see any actual point.
I try to show you the superiority of emacs+elisp+raw html, you don't see the advantage.

thus, video chat, screen demo. that we, something we can get past across.

they say, a pic is worth 1k words. A vid demo, is worth 1M words.

@xahlee

> consistent is important. especially in a team.
I don't mean that kind of consistency. I mean the consistency that I'd like to see throughout my whole site - 1/3

@xahlee

The templates help me achieve how all the "notes" look on my site vs "posts", the links to a page across the whole site is never broken, Org mode helps consistency in the format of all the figure/table/code block captions, Org macros help in making certain repeated texts with minor changes remain the same, say how I link to GitHub issues, how I acknowledge individuals from various social sites, etc - 2/3

@xahlee

And all that update and consistency check finishes in *a second or two* from the time I save the Org mode file, to exporting to Markdown, to Hugo generating HTML pages from those. - 3/3

@kaushalmodi

note, this consistency can be done in raw html too. I practice it, because it's necessary.
Achieved by using abbrev or function to insert templates AS ONE WRITES the html.

note, org uses things like *** [] ~~ to MARK. But with emacs, one can set up so that the key strokes is less than org markup, yet generates the html markup.

@xahlee

> this consistency can be done in raw html too. I practice it, because it's necessary. Achieved by using abbrev or function to insert templates AS ONE WRITES the html.
I'm looking at a persistent consistency, not just at the time of adding content.

With with Org macros, I can change hundreds of instances of it through the whole site by changing just one line. The same applies to the templates - 1/2

@xahlee The key is to separate the site content (in Org mode) from the structure (HTML in Hugo templates). For example, if I want to add a tag list to all my posts, I need to edit just one templates file, run Hugo, and hundreds of pages will get updated, in *about a second*.
note, org uses things like *** [] ~~ to MARK. But with emacs, one can set up so that the key strokes is less than org markup, yet generates the html markup. - 2/2

@xahlee How many keystrokes do you need to change something that all pages have in common?

@zge that's done by a script. xah-find.el
and i also have golang and python versions. i use them about every other day, on few hundred files to 5 thousand. each run on 5k files takes about 5 or 10 secs.

@xahlee If that works well, I think your method is totally valid. Nevertheless, I'll stick to my makefile powered markdown system for time being.

@zge hahaha. :D
the thing i find about markdown is that it's too simple to be flexible.

e.g. suppose i want

<code class="elisp_f">elt</code>
<code>ls</code>

but in markdown, all you got is

`elt`
`ls`

@xahlee That's not an issue, unless your rendering program sanitizes all input. Usually you can type HTML that will be copied 1:1 into the output. Cmark[0] for example does this by default, unless you specify --safe[1].

I make use of this in my Gallery generator[2], that generates partially raw HTML, and is then later converted to full HTML.

[0]: github.com/commonmark/cmark
[1]: mankier.com/1/cmark#--safe
[2]: zge.us.to/git/web-tools/file/b

@zge i see. good point. i totally forgot one just just have html in markdown or org.

@xahlee I know you can type LaTeX directly, but don't you need a special command to insert literal HTML in org? Something like #+BEGIN_HTML/#+END_HTML?

@zge yes, for code blocks. For just words, one can use
~this~
or
=this=
i never found out the difference.

Emacs: Org Mode Markup Cheatsheet
ergoemacs.org/emacs/emacs_org_

:D

@xahlee I just tried it out, and both HTML and LaTeX export the same code for both commands (<code>...</code> and \texttt{...}), but the manual implies that the former is for code, while the latter is for inline verbatim text.

I by default use =...= and if there's a = in the text, I switch to ~...~ ^^

Sign in to participate in the conversation
Mastodon

Fast, secure and up-to-date instance, welcoming everyone around the world. Join us! 🌍
Up since 04/04/2017. ✅

Why should you sign up on mstdn.io?

This instance is not focused on any theme or subject, feel free to talk about whatever you want. Although the main language is english, we accept every single language and country.

We're connected to the whole ActivityPub fediverse and we do not block any foreign instance nor user.

We do have rules, but the goal is to have responsible users.

The instance uses a powerful server to ensure speed and stability, and it has good uptime. We follow state-of-the-art security practices.

Also, we have over 300 custom emojis to unleash your meming potential!


Looking for a Kpop themed instance? Try kpop.social