From 09d3c937cb3ee2538c775b94d24facb64350e3a6 Mon Sep 17 00:00:00 2001 From: sharadcodes Date: Tue, 26 Nov 2019 00:34:00 +0530 Subject: [PATCH] upd plg --- _config.yml | 4 +- all_collections/_posts/2019-11-11-Jekyll.md | 2 + api.json | 44 +++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 api.json diff --git a/_config.yml b/_config.yml index aa42264..a58a8a5 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,6 @@ author: name: Sharad Raj Singh Maurya email: dev_sharad@outlook.com -incremental: true plugins: - jekyll-paginate - jemoji @@ -32,3 +31,6 @@ defaults: path: "" values: layout: "post" + + +exclude: ['sitemap.xml','feed.xml', 'LICENSE', 'README.md'] \ No newline at end of file diff --git a/all_collections/_posts/2019-11-11-Jekyll.md b/all_collections/_posts/2019-11-11-Jekyll.md index 244b106..e9bbeb2 100644 --- a/all_collections/_posts/2019-11-11-Jekyll.md +++ b/all_collections/_posts/2019-11-11-Jekyll.md @@ -4,6 +4,8 @@ title: Hello Jekyll date: 2018-10-09 tag: Jekyll author: Alexa Crisis +categories: ["Jekyll"] +image: "a.png" --- Text can be **bold**, _italic_, ~~strikethrough~~ or `keyword` diff --git a/api.json b/api.json new file mode 100644 index 0000000..8f52e20 --- /dev/null +++ b/api.json @@ -0,0 +1,44 @@ +--- +layout: null +--- + +{ + "website_title": "{{ site.title | xml_escape }}", + "website_url": "{{ "/" | absolute_url }}", + "posts": [ + {% for post in site.posts %} + { + "title": {{ post.title | jsonify }}, + "content_text": {{ post.content | strip_html | strip_newlines | jsonify }}, + "content_html": {{ post.content | strip_newlines | jsonify }}, + "url": "{{ post.url | absolute_url }}", + {% if post.image.size > 0 %} + "image": {{ post.image | jsonify }},{% endif %} + {% if post.categories.size > 0 %} + "categories": {{ post.categories | jsonify }},{% endif %} + {% if post.tags.size > 0 %} + "tags": {{ post.tags | jsonify }},{% endif %} + "date_published": "{{ post.date | date_to_xmlschema }}", + "date_modified": "{{ post.date | date_to_xmlschema }}", + {% if post.author %} + "author": {% if post.author.name %} "{{ post.author.name }}" {% else %} "{{ post.author }}" {% endif %} + {% else %} + "author": {% if site.author.name %} "{{ site.author.name }}" {% else %} "{{ site.author }}" {% endif %} + {% endif %} + }{% if forloop.last == false %},{% endif %} + {% endfor %} + ], + "pages": [ + {% for page in site.pages %} + { + "title": {{ page.title | jsonify }}, + "content_text": {{ page.content | strip_html | strip_newlines | jsonify }}, + "content_html": {{ page.content | strip_newlines | jsonify }}, + "url": "{{ page.url | absolute_url }}", + "date_published": "{{ page.date | date_to_xmlschema }}", + "date_modified": "{{ page.date | date_to_xmlschema }}" + }{% if forloop.last == false %},{% endif %} + {% endfor %} + ] + +} \ No newline at end of file