=== The Analects 论语 ===
Contributors: litouch
Donate link: https://www.lunyu.xyz
Tags: Confucius, analects, Chinese classics, daily analects, search of analects
Requires at least: 5.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Bring Confucius' Analects to your WordPress site. Provides Daily Analects and Analects Search features. 
让《论语》走进您的网站：提供“每日论语”和“论语查询”功能。如果你想更深入的学习论语，强烈推荐访问我们的官网“論語SDK”，网站提供了更为丰富的收藏笔记功能。

== Description ==

### English

The Analects plugin provides two core features:

- **Daily Analects** – Display a daily excerpt from Confucius’ Analects.  
- **Search in the Analects** – Full-text search within the Analects.

**Features:**
- 📝 Fully offline – connects to a preconfigured Supabase database with built-in data. No external API required.  
- ⚡ Easy to use – use shortcodes or widgets to display the features.  
- 🎨 Theme adaptive – UI auto-adapts to your WordPress theme.  
- 📦 Open-source SDK – powered by a JavaScript SDK on GitHub. Developers are welcome to follow and contribute.  
- 📝 This plugin uses a build process (Webpack) to generate production-ready JavaScript files from human-readable source code. Full source code is included in the /src directory. Developers may run `npm install` and `npm run build` to regenerate the dist files.

If you want to learn more details or study The Analects more, it's high recommended to go to our website "論語SDK“ at https://www.lunyu.xyz where you can bookmark your favorite analects and write down your own thoughts and insights.

**Requirements:** WordPress 5.0+, PHP 7.4+  
**License:** GPLv2 or later. Free & open-source.  

---

### 中文

“论语插件”为 WordPress 网站提供两个核心功能：

- **每日论语** – 每天展示一段孔子《论语》原文。  
- **论语查询** – 支持对《论语》全文检索。  

**功能特点：**
- 📝 完全离线 – 内置 Supabase 数据库信息，无需外部 API。  
- ⚡ 即装即用 – 支持短代码和小工具（widget）。  
- 🎨 界面自适应 – 自动适配当前主题。  
- 📦 开源 SDK – 插件依赖 GitHub 上的 JavaScript SDK，欢迎提交优化。  
- 📝 插件的js源代码可以在/src目录找到，开发者可以用'npm install' 'npm run build'来生成dist文件。

**运行环境要求:** WordPress 5.0+，PHP 7.4+  
**开源许可协议:** GPLv2 或更高版本。  

如果你想更深入的学习论语，强烈推荐访问我们的官网“論語SDK”，https://www.lunyu.xyz，网站提供了更为丰富的收藏笔记功能。

---

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/the-analects/` or install via the WordPress plugin directory.  
2. Activate the plugin through the ‘Plugins’ screen in WordPress.  
3. Use the shortcodes:  
   - `[analects_daily]` → Display Daily Analects  
   - `[analects_search]` → Display Analects search box  
4. Or go to *Appearance → Widgets* and add the provided widget ’Daily Analects‘.  

---

== Frequently Asked Questions ==

= Does this plugin require an external API? =  
No. It is fully offline and works with built-in data.

= Can I customize the styling? =  
Yes. The plugin adapts to your theme automatically, and you can override styles via custom CSS.

= Is it free to use? =  
Yes. This plugin is licensed under GPLv2 or later.

== Changelog ==

= 1.3.0 =  
* Migrate to Supabase RPC to get daily analects.

---

= 1.1.0 =  
* Move to new embedded version SDK. For the completed version SDK, please refer to lunyu.xyz.

---

= 1.0.3 =  
* Remove the 2nd frame for character/proverb/argument options.
* Change h1 tag to h2.

---

= 1.0.1 =  
* Fix some coding escaping bugs.  

---

= 1.0.0 =  
* Initial release with Daily Analects and Search features.  

---

== Upgrade Notice ==

= 1.0.0 =  
First stable release.
