<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blogging on Nansen Li's Blog
李楠森的博客</title><link>https://nansenli.com/tags/blogging/</link><description>Recent content in Blogging on Nansen Li's Blog
李楠森的博客</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Nansen Li 🌈 （李楠森）</copyright><lastBuildDate>Tue, 15 Apr 2025 20:45:20 +0100</lastBuildDate><atom:link href="https://nansenli.com/tags/blogging/index.xml" rel="self" type="application/rss+xml"/><item><title>April 2025 Tech Notes</title><link>https://nansenli.com/post/2025/04/tech2504/</link><pubDate>Tue, 15 Apr 2025 20:45:20 +0100</pubDate><guid>https://nansenli.com/post/2025/04/tech2504/</guid><description>&lt;h1 id="introduction">Introduction
&lt;/h1>&lt;p>I plan to record some weekly tech-related notes and insights starting from this issue. I&amp;rsquo;ll probably update every two to four weeks.&lt;/p>
&lt;h1 id="migrating-personal-blog-from-hexo-to-hugo">Migrating Personal Blog from Hexo to Hugo
&lt;/h1>&lt;p>This week, I migrated my blog from Hexo to Hugo, primarily because:&lt;/p>
&lt;p>Hugo has better i18n support. Hexo doesn&amp;rsquo;t support i18n very well; I previously modified the template to implement Chinese and English switching, but the maintenance cost was high. I discovered that Hugo natively supports multiple languages.&lt;/p>
&lt;p>After switching, I also found the following advantages:&lt;/p>
&lt;p>Theme configuration is simpler. I&amp;rsquo;m using the &lt;a class="link" href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener"
>Stack&lt;/a> theme, which has been mostly problem-free. The official example configuration works well right out of the box. It also comes with Google Analytics integration and RSS feeds that automatically separate by language, making it very convenient.&lt;/p>
&lt;p>During the migration process, I didn&amp;rsquo;t encounter any major obstacles. You just need your old Markdown files, copy them to the new project directory, and force push to your original GitHub Pages repository. After force pushing, you&amp;rsquo;ll need to reconfigure your custom domain in GitHub, and the upgrade will be seamless, including comments and other features.&lt;/p>
&lt;p>The only difference is that Hugo uses lowercase links by default, while Hexo preserves case sensitivity, which might cause some old links to become invalid, requiring search engines to rebuild their indices.&lt;/p>
&lt;h1 id="mysterious-optimus-alpha-model-appears-on-httpsopenrouteraihttpsopenrouterai-and-dominates-rankings">Mysterious Optimus Alpha Model Appears on &lt;a class="link" href="https://openrouter.ai/" target="_blank" rel="noopener"
>https://openrouter.ai/&lt;/a> and Dominates Rankings
&lt;/h1>&lt;p>&lt;img src="https://nansenli.com/img/rescued/a7835acf9e85.png"
loading="lazy"
alt="Image.png"
>&lt;/p>
&lt;p>Because this model was free and powerful, it was chosen as OpenRouter&amp;rsquo;s primary traffic handling model after launch.&lt;/p>
&lt;p>After OpenAI officially announced GPT-4.1 on the 14th, the model was removed from OpenRouter. Obviously, this model was GPT-4.1.&lt;/p>
&lt;p>GPT-4.1 is a model specialized in programming capabilities, with a 1M context window. Indeed, in the programming field, OpenAI has been struggling against Claude 3.7 and Gemini 2.5 Pro. Neither o1 nor o3 models have achieved a leading position in programming. Hopefully, OpenAI will keep improving.&lt;/p>
&lt;blockquote>
&lt;p>OpenRouter is a middleware service platform that allows users to &lt;strong>access multiple large language model APIs&lt;/strong> through a unified interface. You can think of it as a &amp;ldquo;proxy&amp;rdquo; or &amp;ldquo;router&amp;rdquo; that manages API calls to different large model providers (OpenAI, Anthropic, Mistral, Google Gemini, Cohere, etc.).&lt;/p>
&lt;/blockquote>
&lt;p>It seems that this time, OpenAI chose OpenRouter as its test release platform, rather than &lt;a class="link" href="https://lmarena.ai/" target="_blank" rel="noopener"
>https://lmarena.ai/&lt;/a>.&lt;/p>
&lt;h1 id="openrouterai">OpenRouter.ai
&lt;/h1>&lt;p>&lt;a class="link" href="https://openrouter.ai/" target="_blank" rel="noopener"
>OpenRouter&lt;/a>&lt;/p>
&lt;p>This is an LLM platform that includes many free/paid high-quality models.&lt;/p>
&lt;p>&lt;img src="https://nansenli.com/img/rescued/def8fd9ff726.png"
loading="lazy"
alt="Image.png"
>&lt;/p>
&lt;p>Select &amp;ldquo;Prompt pricing&amp;rdquo; as 0, then choose &amp;ldquo;Top Weekly&amp;rdquo; to see the best free models currently available.&lt;/p>
&lt;p>However, when using it, you need to enable logging and data usage for training.&lt;/p>
&lt;p>Currently, Gemini 2.5 Pro is an option.&lt;/p>
&lt;p>The Ranking feature allows you to view real-time traffic distribution across all models on the platform, making it easy to see which models perform best.&lt;/p>
&lt;h1 id="nanobrowser">nanobrowser
&lt;/h1>&lt;p>&lt;img src="https://nansenli.com/img/rescued/8d34bb10e9ba.png"
loading="lazy"
alt="Image.png"
>&lt;/p>
&lt;p>A browser plugin for Chrome that can control browser automation operations.&lt;/p>
&lt;p>I tested it and found it doesn&amp;rsquo;t support Arc browser. The experience was limited - page scrolling occasionally fails, it can&amp;rsquo;t summarize entire page content (only partial content is visible), and operations are sometimes incorrect.&lt;/p>
&lt;p>Although I don&amp;rsquo;t particularly recommend this product, it might represent a future direction. It seems we&amp;rsquo;ll see many AI agents emerging.&lt;/p>
&lt;p>Gray market industries like ticket scalping and point farming will probably be delighted.&lt;/p>
&lt;h1 id="markitdown">markitdown
&lt;/h1>&lt;p>&lt;img src="https://nansenli.com/img/rescued/e37c2c0e7d7a.png"
loading="lazy"
alt="Image.png"
>&lt;/p>
&lt;p>A tool for converting content in different formats to Markdown.&lt;/p>
&lt;p>Offline, it can process different files into Markdown format. I tried it, and the conversion is fairly basic.&lt;/p>
&lt;p>It also supports integration with LLMs to improve conversion results and handle images in documents.&lt;/p>
&lt;p>This could potentially be a good MCP service in the future.&lt;/p>
&lt;h1 id="pdf-search">PDF search
&lt;/h1>&lt;p>&lt;img src="https://nansenli.com/img/rescued/d1310e598823.png"
loading="lazy"
alt="Image.png"
>&lt;/p>
&lt;p>An application that can quickly search content across multiple PDFs.&lt;/p>
&lt;p>It uses a fuzzy search approach. The principle is to split PDFs and perform embedding vector calculations, then match them with search terms.&lt;/p>
&lt;p>Suitable for searching documents during exam periods.&lt;/p>
&lt;p>The downside is that indexing is done by page, so after searching, you need to find the corresponding part on the page yourself.&lt;/p></description></item><item><title>Building a Personal Blog with Flask</title><link>https://nansenli.com/post/jianshu/%E7%BD%91%E7%BB%9C/%E5%9F%BA%E4%BA%8Eflask%E7%9A%84%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/</link><pubDate>Sun, 30 Jul 2017 17:38:00 +0000</pubDate><guid>https://nansenli.com/post/jianshu/%E7%BD%91%E7%BB%9C/%E5%9F%BA%E4%BA%8Eflask%E7%9A%84%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/</guid><description>&lt;h2 id="introduction">Introduction
&lt;/h2>&lt;p>The source code can be run directly, supports markdown syntax, supports email registration, and any issues can be referenced in &lt;a class="link" href="https://book.douban.com/subject/26274202/" target="_blank" rel="noopener"
>《Flask Web Development: Web Application Development in Action with Python》&lt;/a>.&lt;/p>
&lt;p>Blog website: &lt;a class="link" href="http://www.unrealblue.cc" target="_blank" rel="noopener"
>http://www.unrealblue.cc&lt;/a>
Project repository: &lt;a class="link" href="https://github.com/linanwx/unrealblue-blog" target="_blank" rel="noopener"
>https://github.com/linanwx/unrealblue-blog&lt;/a>&lt;/p>
&lt;h2 id="preview">Preview
&lt;/h2>&lt;p>&lt;img src="https://nansenli.com/img/rescued/a0027251f6b8.jpg"
loading="lazy"
alt="image.png"
>&lt;/p>
&lt;p>&lt;img src="https://nansenli.com/img/rescued/ee8b6a7c6286.jpg"
loading="lazy"
alt="markdown syntax"
>&lt;/p>
&lt;p>&lt;img src="https://nansenli.com/img/rescued/2482752767fe.jpg"
loading="lazy"
alt="login"
>&lt;/p>
&lt;p>&lt;img src="https://nansenli.com/img/rescued/a827700f36d3.jpg"
loading="lazy"
alt="homepage"
>&lt;/p>
&lt;h2 id="deployment-process">Deployment Process
&lt;/h2>&lt;p>First, to verify the program functionality, you need to deploy it on your local machine. After that, you can use nginx as a reverse proxy tool to expose the port, so that others can access your blog on the public network. Then follow the same steps on the server. The specific process is as follows:&lt;/p>
&lt;ol>
&lt;li>Install the virtualenv Python virtual environment with &lt;code>pip install virtualenv&lt;/code> or &lt;code>pip3 install virtualenv&lt;/code>. Then use virtualenv to create a venv environment in a suitable directory, for example under this project with &lt;code>virtualenv venv&lt;/code>.&lt;/li>
&lt;li>Activate the virtualenv environment by running the activate script in the venv directory: &lt;code>. venv/bin/activate&lt;/code>. Note the position of the dot. After this, you will see the (venv) marker at the beginning of the command line.&lt;/li>
&lt;li>Install all modules listed in requirements.txt within the virtual environment: &lt;code>pip3 install -r requirements.txt&lt;/code>. If installation is too slow, you may need to configure a domestic pip source. See the pip official page for how to change the pip source.&lt;/li>
&lt;li>Import environment variables by creating an &lt;code>env&lt;/code> file in the project directory with the following fields:&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>&lt;code>MAIL_USERNAME=email@example.com&lt;/code> (Email used by the server to send verification codes, an email account with smtp service enabled. The program uses QQ email by default, modify the config file to use other types of email)&lt;/li>
&lt;li>&lt;code>MAIL_PASSWORD=password&lt;/code> (Password for the above email, note that QQ email uses a special 16-digit password)&lt;/li>
&lt;li>&lt;code>FLASK_ADMIN=admin@example.com&lt;/code> (After the server is running, an account created with this email will be the administrator)&lt;/li>
&lt;li>&lt;code>MAIL_SERVER=smtp.qq.com&lt;/code> (Email server address)&lt;/li>
&lt;li>&lt;code>FLASKY_MAIL_SENDER=example@foxmail.com&lt;/code> (Sender&amp;rsquo;s email)&lt;/li>
&lt;/ul>
&lt;ol start="5">
&lt;li>Set up database migration by entering the following commands:&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>&lt;code>python manager.py db init&lt;/code> (The init command creates a migration repository, which will add a migrations folder)&lt;/li>
&lt;li>&lt;code>python manager.py db migrate -m &amp;quot;initial migration&amp;quot;&lt;/code> (The migrate command is used to automatically create migration scripts)&lt;/li>
&lt;li>&lt;code>python manager.py db upgrade&lt;/code> (Update the database. The first time you use this command, it will create a new database called data-dev.sqlite)&lt;/li>
&lt;/ul>
&lt;ol start="6">
&lt;li>Deploy the program: &lt;code>python manager.py deploy&lt;/code>&lt;/li>
&lt;li>Run the program locally: &lt;code>python manager.py runserver&lt;/code>. Open http://127.0.0.1:5000 to view it, press Ctrl+C to exit the program.&lt;/li>
&lt;li>If running on a server and you want to preserve data, you can copy the migrations folder and the data-dev.sqlite database to the server, then use &lt;code>./venv/bin/gunicorn -w 4 -b 127.0.0.1:8080 manager:app&lt;/code>. At this point, you should be able to see the webpage on port 8080, and this port is exposed to the external network. Enter the server address in your local browser, and you will be able to see the blog.&lt;/li>
&lt;/ol></description></item></channel></rss>