Installs the kube-prometheus stack, a collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules combined with documentation and scripts to provide easy to operate end-to-end Kubernetes cluster monitoring with Prometheus using the Prometheus Operator.
This article is about how to use Helm to deploy kube-prometheus stack (Prometheus, Grafana) on Kubernetes (K8S).
MicroK8s is the smallest, fastest, fully-conformant Kubernetes that tracks upstream releases and makes clustering trivial. MicroK8s is great for offline development, prototyping, and testing. Use it on a VM as a small, cheap, reliable k8s for CI/CD. It’s also the best production grade Kubernetes for appliances. Develop IoT apps for k8s and deploy them to MicroK8s on your Linux boxes.
Posted onEdited onInSite
,
Hexo
,
Hexo PluginWord count in article: 2.4kReading time ≈2 mins.
hexo-generator-searchdb
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
hexo-generator-searchdb is used for generating a search index file, which contains all the necessary data of your articles that you can use to write a local search engine for your blog. Supports both XML and JSON format output.
Installation
Use npm to install hexo-generator-searchdb package.
path - file path. By default is search.xml. If the file extension is .json, the output format will be JSON. Otherwise XML format file will be exported.
field - the search scope you want to search, you can chose:
post (Default) - will only cover all the posts of your blog.
page - will only cover all the pages of your blog.
all - will cover all the posts and pages of your blog.
content - whether contains the whole content of each article. If false, the generated results only cover title and other meta info without mainbody. By default is true.
format - the form of the page contents, options are:
html (Default) - original html string being minified.
striptags - original html string being minified, and remove all the tags.
raw - markdown text of each posts or pages.
Then, configure this plugin in your hexo-theme-next plugin _config_next.yml.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# _config_next.yml
# Local Search # Dependencies: https://github.com/next-theme/hexo-generator-searchdb local_search: # DoItYourself # enable: false enable:true # If auto, trigger search by changing input. # If manual, trigger search by pressing enter key or search button. trigger:auto # Show top n results per article, show all results by setting to -1 top_n_per_article:1 # Unescape html strings to the readable one. unescape:false # Preload the search data when the page loads. preload:false
Finally, you can visit your site in the browser, and check whether the site works correctly after Hexo restarted or regenerated.
Posted onEdited onInSite
,
Hexo
,
Hexo Tag PluginWord count in article: 2.8kReading time ≈3 mins.
Download or preview PDF files
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
This article is about how to download or preview PDF files in Hexo.
PDF Folders
Global PDF Folder
Hexo Assets are non-post files in the source folder, such as images, CSS or JavaScript files. For instance, If you are only going to have a few PDF files in the Hexo project, then the easiest way is to keep them in a source/pdfs directory. Then, you can preview(by Browser preview) or download them using something like
1
[pdf demo](/pdfs/pdf-demo.pdf).
Post PDF Folder
For users who expect to regularly serve PDF files, and for those who prefer to separate their PDF files on a post-per-post basis, Hexo also provides a more organized way to manage assets. This slightly more involved, but very convenient approach to asset management can be turned on by setting the post_asset_folder setting in _config.yml to true.
With asset folder management enabled, Hexo will create a folder every time you make a new post with the hexo new [layout]
command. This asset folder will have the same name as the markdown file associated with the post. Place all PDF files related to your post into the associated folder, and you will be able to reference them using a relative path, making for an easier and more convenient workflow.
For example,
1
[pdf demo](pdf-demo.pdf).
or
1
[pdf demo](./pdfs/pdf-demo.pdf).
Preview PDF Embed
theme-next-pdf is a plugin that allows to preview PDF files embed in the blog pages.
Installation
Install module to source/lib directory.
Ihis installation is optional if youe just want to preview external PDF files.
1 2 3 4 5 6 7
# Use git submodule add $ git submodule add https://github.com/next-theme/theme-next-pdf source/lib/pdf # Or just use git clone $ git clone https://github.com/next-theme/theme-next-pdf source/lib/pdf $ hexo clean
# PDF tag # NexT will try to load pdf files natively, if failed, pdf.js will be used. # So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers. # Dependencies: https://github.com/next-theme/theme-next-pdf pdf: # DoItYourself # enable: false enable:true # Default height height:500px
Usage
In order to embed PDF files in the article, you just need to create an pdf tag with the URL of your local PDF file, e.g.
Local PDF files
Remember to put file.pdf into the source/path/to/your/file.pdf, such as source/pdfs/file.pdf.
1
{% pdf /path/to/your/file.pdf %}
External PDF files:
1
{% pdf http://www.africau.edu/images/default/sample.pd %}
Notice: Do not use cross-origin PDF files, it might be blocked by the CORS policy, unless you have resoved it.
Posted onEdited onInSite
,
HexoWord count in article: 2.4kReading time ≈2 mins.
col-hexo-docker
col-hexo is a Docker image to use Docker or Docker Compose to run Hexo.
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
Posted onEdited onInSite
,
HexoWord count in article: 1.5kReading time ≈1 mins.
hexo-related-popular-posts
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
hexo-related-popular-posts plugin is a hexo plugin that generates a list of links to related posts or popular posts.
Installation
Use npm to install hexo-related-popular-posts package.
Posted onEdited onInSite
,
Hexo
,
Hexo PluginWord count in article: 1.7kReading time ≈2 mins.
hexo-filter-nofollow
Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).
hexo-filter-nofollow plugin add nofollow attribute to all external links automatically.
hexo-filter-nofollow add `rel=“noopener external nofollow noreferrer” to all external links for security, privacy and SEO. Read more.