260407
260407

260407

AutoBuilder

Backlinks (0)

No backlinks found.

Stella
Stella

Stella

OpenClaw, Hermes, Poke를 쓰며 느낀 단점들

내가 만약 워크스페이스 에이전트를 만든다면 어떻게 만들까?

메모리

  • 육하원칙에 맞게 기억해야하는데, 이걸 잘 못 함
    • 맥락을 종종 헷갈려함
  • 메모리 툴을 명시적으로 불러야 함
    • 이는 Hermes에서 많이 완화된 부분

Slack

  • 답장을 매번 하려 함. 쓰레드에 달리는 모든 글에 답을 함.
    • 매번 답할 필요는 없음. 필요할 때만 하면 됨.
  • 언급하지 않은 메시지는 읽지 않음.
    • 모든 워크스페이스의 변화를 계속 보고 있어야 함, 그리고 기억해야 함
Backlinks (2)
  • 260419
  • 260411
Displaying the extracted Ghost version
Displaying the extracted Ghost version

Displaying the extracted Ghost version

200711

So, this blog runs on Ghost. At the footer of this website, I wanted to keep the message "Ghost version self-hosted on DigitalOcean distributed by Cloudflare." But that meant every time I updated Ghost, I had to manually update that string in my theme package and re-upload those. While I automated theme deployment with GitHub Actions (you can find the post here), it was a hassle to ① clone the theme package ② fix the string ③ commit and push it back. Then I thought it would be great to automatically insert the current Ghost version so that I don't have to update it every time manually. At first, I investigated the Ghost engine side to make the Node.js include the value before responding to the client browser, but I figured that there was a much simpler way after a while.

Extracting the Ghost version on client-side

Every Ghost blog includes a tag like the following for SEO and statistical reasons unless you manually disabled it.

html
<meta name="generator" content="Ghost 3.13" />

That content thing was what I wanted to use. Extract that value with JS.

document.getElementsByName("generator")[0].content;

Of course, if you made some other HTML tag with a name generator before this generator, this wouldn't work. But you really shouldn't do that - generator tags should only be used by automatic software and aren't supposed to be edited. So either leave this tag as-is or remove it altogether.

Displaying the extracted Ghost version

The footer's HTML is generated with a handlebars file.

hbs
{  {    {      t "{ghostlink} self-hosted on {cloudlink} distributed by {CDN}"      ghostlink = "<a href = \"https://github.com/TryGhost/Ghost\">Ghost</a>"      cloudlink = "<a href = \"https://www.digitalocean.com/\">DigitalOcean</a>"      CDN="<a href=\"https://www.cloudflare.com/\">Cloudflare</a>"    }  }}.

I added an id property to ghostlink.

hbs
ghostlink="<a id = \"ghost-version\" href=\"https://github.com/TryGhost/Ghost\">Ghost</a>"

Then input the string to the corresponding tag with JS.

js
<script>  document.getElementById("ghost-version").innerText =  document.getElementsByName("generator")[0].content;</script>

Paste this to Admin Panel → Code Injections → Site Footer.

You are good to go. See this in action down at the footer. ↓

One less hard-coded magic number!

Backlinks (1)
  • 221119
Index
cho.sh
I prefer CLIBB9A08260619260619컴퓨트로늄37A88F컴퓨트로늄0CF03F컴퓨트로늄2C60FB260618260618260418260418260528260528AutoBuilder63849A260419260419Setup9AC296StellaD226F7260415260415Debian SetupD2F701260414260414anaclumos/configs/AGENTS.mdED86A3Ramp의 AX (회사를 AI로 물들이는 법)840774260413260413How to get your company AI pilled46544C260411260411260409260409260407260407260406260406Separating Claude Code Personal Sub and Claude Code Company Sub33A53C
Warning
This post is more than a year old. Information may be outdated.
<meta name="generator" content="Ghost 3.13" />
document.getElementsByName("generator")[0].content;
{  {    {      t "{ghostlink} self-hosted on {cloudlink} distributed by {CDN}"      ghostlink = "<a href = \"https://github.com/TryGhost/Ghost\">Ghost</a>"      cloudlink = "<a href = \"https://www.digitalocean.com/\">DigitalOcean</a>"      CDN="<a href=\"https://www.cloudflare.com/\">Cloudflare</a>"    }  }}.
ghostlink="<a id = \"ghost-version\" href=\"https://github.com/TryGhost/Ghost\">Ghost</a>"
<script>  document.getElementById("ghost-version").innerText =  document.getElementsByName("generator")[0].content;</script>