External Libraries

PJAX

:coffee: ☕️ 为啥用复制的emoji比插件用语法生成的好(此时emoji右下角有额外的东西)

Pjax is a standalone JavaScript module that uses AJAX (XmlHttpRequest) and pushState() to deliver a fast browsing experience.

It allows you to completely transform the user experience of standard websites (server-side generated or static ones) to make users feel like they are browsing an app, especially for those with low bandwidth connections.

Change dir to NexT directory, and install module to source/lib directory.

1
2
$ cd themes/next
$ git clone https://github.com/theme-next/theme-next-pjax source/lib/pjax
        If you want to use the CDN instead of clone this repo, then need to <strong>set vendors</strong> in <span class="label primary">theme config file</span>:<figure class="highlight yml"><figcaption><span>next/_config.yml</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">vendors:</span></span><br><span class="line">  <span class="string">...</span></span><br><span class="line">  <span class="attr">pjax:</span> <span class="string">//cdn.jsdelivr.net/gh/theme-next/theme-next-pjax@0/pjax.min.js</span></span><br><span class="line">  <span class="string">...</span></span><br></pre></td></tr></table></figure>
      </div>

After the plugin installed, you can enable it by setting value pjax to true in theme config file.

next/_config.yml
1
2
3
4
# Easily enable fast Ajax navigation on your website.
# Dependencies: https://github.com/theme-next/theme-next-pjax
# For moreinformation: https://github.com/MoOx/pjax
pjax: true

Quote

1
{% cq %} Elegant in code, simple in core {% endcq %}

Elegant in code, simple in core

1
2
3
4
{% btn https://www.baidu.com,, download fa-3x, 百度 %}
{% btn https://www.baidu.com,, download fa-2x, 百度 %}
{% btn https://www.baidu.com, 百度 (buggy), download %}
{% btn https://www.baidu.com, 百度 (fixed width), download fa-fw %}
百度 (buggy) 百度 (fixed width)
正在加载今日诗词....
buy me a cup of coffee ☕️