Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pkg/
site/_site/
test/dest
tmp/*
node_modules
Empty file added .hugo_build.lock
Empty file.
200 changes: 198 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,201 @@
# Hugo Static Site Generator
# 思算| Thinking as Algorithm

A modern Hugo static site with Tailwind CSS for clean, responsive design.

## 🚀 Quick Start

### Prerequisites

- [Hugo](https://gohugo.io/installation/) (v0.100+)
- [Node.js](https://nodejs.org/) (v16+)
- [npm](https://www.npmjs.com/) (comes with Node.js)

### Installation

1. **Clone the repository**

```bash
git clone <repository-url>
cd ftvision.github.io
```

2. **Install dependencies**

```bash
npm install
```

3. **Build Tailwind CSS**
```bash
npm run css:build
```

## 🛠️ Development

### Start the development server

```bash
# Option 1: Use npm script (recommended for development)
npm run dev
# This starts both Tailwind CSS watching and Hugo server

# Option 2: Manual approach
# Terminal 1: Watch CSS changes
npm run css:watch

# Terminal 2: Start Hugo server
hugo serve --buildDrafts
```

### Available Commands

| Command | Description |
| -------------------------------------- | ------------------------------------------ |
| `npm run dev` | Start development server with CSS watching |
| `npm run build` | Build for production |
| `npm run css:build` | Build Tailwind CSS (one-time) |
| `npm run css:watch` | Watch Tailwind CSS changes |
| `npm run serve` | Start Hugo server only |
| `hugo serve --buildDrafts` | Start Hugo with draft posts |
| `hugo serve --buildDrafts --port 1314` | Start on custom port |

## 📁 Project Structure

```
├── content/ # Markdown content files
│ ├── blog/ # Blog posts
│ ├── digest/ # Digest entries
│ ├── collection/ # Collections
│ └── about/ # About pages
├── themes/ft_personal/ # Custom Hugo theme
│ ├── layouts/ # HTML templates
│ ├── static/ # Static assets
│ └── assets/css/ # Tailwind CSS source
├── tailwind.config.js # Tailwind configuration
├── package.json # Node.js dependencies
└── config.yml # Hugo configuration
```

## 🎨 Styling with Tailwind CSS

### Customizing Styles

1. Edit `themes/ft_personal/assets/css/input.css` for custom styles
2. Modify `tailwind.config.js` for theme configuration
3. Run `npm run css:build` to compile changes

### Adding Custom Components

Add new component classes in the `@layer components` section of `input.css`:

```css
@layer components {
.my-custom-component {
@apply bg-blue-500 text-white p-4 rounded-lg;
}
}
```
hugo server

## 🌍 Multi-language Support

The site supports both Chinese (zh) and English (en):

- Default language: Chinese
- English pages: Add `.en.md` suffix
- Access via language switcher in navigation

## 📝 Content Management

### Creating New Posts

1. **Blog post**

```bash
hugo new blog/my-new-post.md
```

2. **Digest entry**
```bash
hugo new digest/digest-XXX.md
```

### Draft Posts

- Add `draft: true` to front matter for draft posts
- View drafts with `--buildDrafts` flag
- Remove `draft: true` to publish

## 🚢 Deployment

### Build for Production

```bash
npm run build
```

This will:

1. Build and minify Tailwind CSS
2. Generate optimized Hugo site in `docs/` directory

### GitHub Pages

The site is configured to publish from the `docs/` directory. After building, commit and push to deploy.

## 🔧 Configuration

### Hugo Configuration (`config.yml`)

- Site title, description, and metadata
- Navigation menus
- Multi-language settings
- Theme configuration

### Tailwind Configuration (`tailwind.config.js`)

- Custom colors and fonts
- Typography plugin settings
- Content paths for purging unused CSS

## 🐛 Troubleshooting

### Common Issues

1. **Port already in use**

```bash
hugo serve --buildDrafts --port 1314
```

2. **CSS not updating**

```bash
npm run css:build
```

3. **Missing dependencies**

```bash
npm install
```

4. **Hugo version compatibility**
- Ensure Hugo v0.100+ is installed
- Check with `hugo version`

### Development Tips

- Use `npm run dev` for the best development experience
- CSS changes are automatically rebuilt and live-reloaded
- Hugo templates support hot reloading
- Check browser console for any JavaScript errors

## 📚 Additional Resources

- [Hugo Documentation](https://gohugo.io/documentation/)
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
- [Theme Customization Guide](https://gohugo.io/themes/customizing/)

---

Built with ❤️ using [Hugo](https://gohugo.io/) and [Tailwind CSS](https://tailwindcss.com/)"
9 changes: 0 additions & 9 deletions archetypes/collections.md

This file was deleted.

6 changes: 0 additions & 6 deletions archetypes/default.md

This file was deleted.

13 changes: 0 additions & 13 deletions archetypes/digest.md

This file was deleted.

19 changes: 10 additions & 9 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
baseURL: "http://ftvision.github.io/"
title: "思算|Thinking as Algorithm"
paginate: 5
theme: "PaperMod"
pagination:
pagerSize: 5
theme: "ft_personal"

DefaultContentLanguage: zh
hasCJKLanguage: true
Expand All @@ -12,6 +13,9 @@ buildDrafts: false
buildFuture: false
buildExpired: false

# Suppress HTML warnings
ignoreLogs: ['warning-goldmark-raw-html']

minify:
disableXML: true
minifyOutput: true
Expand Down Expand Up @@ -115,15 +119,12 @@ params:
keys: ["title", "permalink", "summary", "content"]

# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma
pygmentsUseClasses: true
markup:
goldmark:
renderer:
unsafe: true
highlight:
noClasses: false
anchorLineNos: true
codeFences: true
guessSyntax: true
lineNos: true
style: emacs
codeFences: false

# language setting
languages:
Expand Down
16 changes: 10 additions & 6 deletions content/about/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ title: About
date: 2021-11-02
---

I am a Software Engineer @ Citadel, New York, NY. Prior to that, I was a Software Engineer @ Google, Cambrdige, MA. I received my Ph.D. training from the Johns Hopkins University.
## Who I Am

I am a Software Engineer at Citadel in New York, NY. Prior to that, I was a Software Engineer at Google in Cambridge, MA. I received my Ph.D. training in Cognitive Psychology from Johns Hopkins University.

This blog is a record of my thinking, covering technology, algorithms, cognitive science, and the intersections between them. I believe that thinking itself is an algorithm, and we can better understand the world and ourselves by understanding these algorithms.

## Core Philosophy

A few lines have accompanied me for years, the source of which I can't recall, but I'd like to share them here:

> Removing the delusion of a separate self and the desires it produces, and concentrating upon the subject until there is a direct communion with it.

> Successes are only rare spikes among background noises of failures in daily life. Achieving more successes comes from failing faster, failing more often, then learning more and keeping on.

## Find Me Online

## Find me online

My [Linkedin](https://www.linkedin.com/in/feitong-yang-88088a55/) page contains similar information. [Google Scholar](http://scholar.google.com/citations?user=94Xx9u0AAAAJ) and [NeuroTree](http://neurotree.org/neurotree/tree.php?pid=65050) summarizes my academic efforts and lineage.

Below is a list of pages where I described myself in more details.
My [LinkedIn](https://www.linkedin.com/in/feitong-yang-88088a55/) page contains similar professional information. [Google Scholar](http://scholar.google.com/citations?user=94Xx9u0AAAAJ) and [NeuroTree](http://neurotree.org/neurotree/tree.php?pid=65050) summarize my academic efforts and lineage.

Below is a list of pages where I describe myself in more detail. Honestly, my regular resume isn't particularly interesting, but the "failure resume" might be worth a look.
14 changes: 12 additions & 2 deletions content/about/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ title: 关于作者
date: 2021-11-01
---

我现在是Citadel的一名软件工程师。在此之前,我在Google工作过三年。在那之前,我在Johns Hopkins获得了认知心理学的博士学位。
我现在是 Citadel 的一名软件工程师。在此之前,我在 Google 工作了三年。再之前,我在 Johns Hopkins University 获得了认知心理学的博士学位。

这个博客是我思考的记录,涵盖技术、算法、认知科学以及它们之间的交集。我相信思维本身就是一种算法,我们可以通过理解这些算法来更好地理解世界和自己。

## 核心理念

> 去除分离自我的幻觉和它产生的欲望,专注于主题直到与之直接交流。

> 成功只是日常生活中失败背景噪音中罕见的尖峰。获得更多成功来自于更快地失败,更频繁地失败,然后学到更多并继续前进。

## 我的网络足迹

我的[Linkedin](https://www.linkedin.com/in/feitong-yang-88088a55/) 页面介绍了跟这里差不多的工作经历。[Google Scholar](http://scholar.google.com/citations?user=94Xx9u0AAAAJ)和[NeuroTree](http://neurotree.org/neurotree/tree.php?pid=65050)页面介绍了一些我的学术训练的背景。以下的几个页面有更细节的简历。老实说,我的简历没什么好看的,倒是“失败简历”可能有点意思。
我的 [LinkedIn](https://www.linkedin.com/in/feitong-yang-88088a55/) 页面介绍了与这里差不多的工作经历。[Google Scholar](http://scholar.google.com/citations?user=94Xx9u0AAAAJ) 和 [NeuroTree](http://neurotree.org/neurotree/tree.php?pid=65050) 页面介绍了一些我的学术训练背景。

以下的几个页面有更详细的信息。老实说,我的简历没什么好看的,倒是"失败简历"可能有点意思。
46 changes: 46 additions & 0 deletions content/blog/building_agent.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Building LLM Agent (1)
date: 2025-08-03
categories:
- AI
tags:
- Agent
- Product
---

In the past 18 months, I have worked on building various kinds of "LLM Agents", ranging from complicated internal structures that mimics research from cognitive psychology and neurosciences, to simpler ones.

There are two angles to think about the LLM Agent:

- One is to start with the Agent, then bring the LLM into it,
- Another is to start with the LLM, then bring the agent into it.

**Agent, empowered by LLM**

The concept of `agent` has a long existed before the LLM came to being. Most famously, the reinforcement learning has a thinking framework about what is an agent and how agents interact with the environment, like the figure below

{{< mermaid >}}
graph LR
A[Agent] -->|Action| E[Environment]
E -->|Observation + Reward| A
{{< /mermaid >}}

Simply put, there is a agent-environment loop, where agent would exert action to affect the environment, and the environment, after affected by the agent, would produce a set of observations and rewards, feeding back to the agent. The agent then would take the new observations and reward to decide or to learn future actions towards the environment.

In the LLM era, a natural way that people thinks about it is to make the agent more "intelligent" by equiping the agent with LLM. Some natural starting points include

- use LLM to select the action among action space, so that it can be the best to affect the environment
- use LLM to process the observation so that the agent can "understand" the environment better
- use LLM to do the planning to bridge the gap between understanding the environment and selecting the right action to affect the environment.

This is largely how we were thinking about building the agent when we work on our [Minecraft co-player]() and the [Project Sid](). Of course, there are more, such as how to include the personality to make each agent behave differently, how to add memory system so that each agent would be able to remember the past experiences, and so on and so forth.

**LLM, empowered by becoming an agent**

Starting late 2024 and early 2025, more and more people are building LLM agent starting from idea of making LLM more powerful, actionable.

## Context Engineering

## Building the Environment for LLM

## Human, Agent, Computer interfaces.
Empty file added content/blog/building_agent.md
Empty file.
5 changes: 5 additions & 0 deletions content/content.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: 'Thinking as Algorithm - English Version'
layout: 'content-en'
url: '/en/content/'
---
5 changes: 5 additions & 0 deletions content/content.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: '思算 - 中文版'
layout: 'content-zh'
url: '/content/'
---
Loading