From f250bb1f8d10a96933e8a232a9bed7adcded94b6 Mon Sep 17 00:00:00 2001 From: Rehan Haider Date: Sun, 15 Oct 2023 06:57:50 +0000 Subject: [PATCH 1/3] FEAT: Series capability --- content/aws/25000000-mount-efs-ec2.md | 1 + content/aws/50000000-flask-on-beanstalk.md | 1 + .../aws/75000000-iam-cross-account-role.md | 1 + .../aws/87500000-cdk-api-gateway-route53.md | 1 + design/alexis/templates/article.html | 3 ++ .../layouts/partial/series_navigation.html | 53 +++++++++++++++++++ settings.py | 15 +++--- 7 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 design/alexis/templates/layouts/partial/series_navigation.html diff --git a/content/aws/25000000-mount-efs-ec2.md b/content/aws/25000000-mount-efs-ec2.md index 52bbab39..8d4bf407 100644 --- a/content/aws/25000000-mount-efs-ec2.md +++ b/content/aws/25000000-mount-efs-ec2.md @@ -1,6 +1,7 @@ Title: Mount Amazon EFS Drive on EC2 Ubuntu Linux using NFS Utils Date: 2022-06-13 Category: AWS Academy +Series: AWS CDK Tags: aws, linux Author: Rehan Haider Summary: A comprehensive guide to mount Amazon Elastic File Storage (EFS) on Ubuntu Linux using NFS Utils and then use it to serve files from the EFS drive. The guided includes instructions for both AWS Console & CLI diff --git a/content/aws/50000000-flask-on-beanstalk.md b/content/aws/50000000-flask-on-beanstalk.md index 9862eb86..09f7e3b5 100644 --- a/content/aws/50000000-flask-on-beanstalk.md +++ b/content/aws/50000000-flask-on-beanstalk.md @@ -1,6 +1,7 @@ Title: Run Flask Apps on Elastic Beanstalk Date: 2022-07-30 Category: AWS Academy +Series: AWS CDK Tags: aws, python Author: Rehan Haider Summary: Create a simple Flask app and run on AWS Elastic Beanstalk diff --git a/content/aws/75000000-iam-cross-account-role.md b/content/aws/75000000-iam-cross-account-role.md index 8fcf487c..40be5e20 100644 --- a/content/aws/75000000-iam-cross-account-role.md +++ b/content/aws/75000000-iam-cross-account-role.md @@ -1,6 +1,7 @@ Title: Cross Account Access to AWS Services using IAM Roles Date: 2022-08-13 Category: AWS Academy +Series: AWS CDK Tags: aws Author: Rehan Haider Summary: Access another AWS account temporarily using an IAM role and STS diff --git a/content/aws/87500000-cdk-api-gateway-route53.md b/content/aws/87500000-cdk-api-gateway-route53.md index c2c73e86..a400496a 100644 --- a/content/aws/87500000-cdk-api-gateway-route53.md +++ b/content/aws/87500000-cdk-api-gateway-route53.md @@ -1,6 +1,7 @@ Title: CDK API Gateway with Custom Domain Date: 2022-10-24 Category: AWS Academy +Series: AWS CDK Tags: aws, cdk, python Author: Rehan Haider Summary: Create API Gateway and connect it with a custom domain / subdomain using Route53 diff --git a/design/alexis/templates/article.html b/design/alexis/templates/article.html index a965b25a..0923e5db 100644 --- a/design/alexis/templates/article.html +++ b/design/alexis/templates/article.html @@ -21,6 +21,9 @@
Need Help? Open a discussion thread on GitHub.
+ {% if article.series %} + {% include "layouts/partial/series_navigation.html" %} + {% endif %} {% include "layouts/partial/tags.html"%}
{% include "layouts/related.html" %} diff --git a/design/alexis/templates/layouts/partial/series_navigation.html b/design/alexis/templates/layouts/partial/series_navigation.html new file mode 100644 index 00000000..b798c2df --- /dev/null +++ b/design/alexis/templates/layouts/partial/series_navigation.html @@ -0,0 +1,53 @@ + + +
+ +
+ + \ No newline at end of file diff --git a/settings.py b/settings.py index 34b6fa87..ba73002c 100644 --- a/settings.py +++ b/settings.py @@ -22,9 +22,9 @@ # Paths THEME_STATIC_DIR = "assets" THEME = "design/alexis" -## Path to blog content +# Path to blog content PATH = "content" -## Path to static folders +# Path to static folders STATIC_PATHS = [ "images", "extra/SW.js", @@ -67,13 +67,14 @@ (1, "{url}", "{save_as}"), (2, "{base_name}/{number}/", "{base_name}/{number}/index.html"), ) -PAGINATED_TEMPLATES = {"index": None, "tag": None, "category": None, "author": None} +PAGINATED_TEMPLATES = {"index": None, + "tag": None, "category": None, "author": None} # Uncomment following line if you want document-relative URLs when developing # RELATIVE_URLS = True -## Python-Markdown extension configuration +# Python-Markdown extension configuration MARKDOWN = { "extension_configs": { # Needed for code syntax highlighting @@ -93,13 +94,13 @@ # Plugin Settings # ---------------- -## Tag Cloud settings +# Tag Cloud settings TAG_CLOUD_STEPS = 4 TAG_CLOUD_MAX_ITEMS = 100 TAG_CLOUD_SORTING = "size" TAG_CLOUD_BADGE = True -## Sitemap configuration +# Sitemap configuration SITEMAP = { "format": "xml", "priorities": {"articles": 1, "indexes": 1, "pages": 0.25}, @@ -126,6 +127,7 @@ "pelican.plugins.tag_cloud", "pelican.plugins.related_posts", "plugins.fix_sitemap", + "pelican.plugins.series", # "plugins.minify", ] prod_plugins = [ @@ -134,6 +136,7 @@ "pelican.plugins.related_posts", "plugins.fix_sitemap", "plugins.search", + "pelican.plugins.series", "plugins.minify", ] From f24ed9cf555498b5e5964c4d2227ec7300b77684 Mon Sep 17 00:00:00 2001 From: Rehan Haider Date: Sun, 15 Oct 2023 06:58:24 +0000 Subject: [PATCH 2/3] FEAT: Series capability --- content/aws/22575000-run-wordpress-on-ec2.md | 20 ++++++++++--------- content/aws/25000000-mount-efs-ec2.md | 1 - content/aws/50000000-flask-on-beanstalk.md | 1 - .../aws/75000000-iam-cross-account-role.md | 1 - 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/content/aws/22575000-run-wordpress-on-ec2.md b/content/aws/22575000-run-wordpress-on-ec2.md index 6304927a..fdfdc1aa 100644 --- a/content/aws/22575000-run-wordpress-on-ec2.md +++ b/content/aws/22575000-run-wordpress-on-ec2.md @@ -17,15 +17,17 @@ Nevertheless, WordPress is going nowhere hence in this guide we will cover how t We will do the following steps to install WordPress on an EC2 instance: -1. [Create an EC2 instance](#create-an-ec2-instance) -2. [Install NGINX](#install-nginx) -3. [Install PHP](#install-php) -4. [Configure NGINX to serve PHP](#configure-nginx-to-serve-php) -5. [Install MySQL/MariaDB](#install-mysqlmariadb) -6. [Configure & Secure MySQL/MariaDB](#configure-secure-mysqlmariadb) -7. [Create the database](#create-the-database) -8. [Configure WordPress](#configure-wordpress) -9. [Start WordPress](#start-wordpress) +- [How to install WordPress on an EC2 instance?](#how-to-install-wordpress-on-an-ec2-instance) + - [Create an EC2 instance](#create-an-ec2-instance) + - [Install NGINX](#install-nginx) + - [Install PHP](#install-php) + - [Configure NGINX to serve PHP](#configure-nginx-to-serve-php) + - [Install MySQL/MariaDB](#install-mysqlmariadb) + - [Configure \& Secure MySQL/MariaDB](#configure--secure-mysqlmariadb) + - [Create the database](#create-the-database) + - [Install WordPress](#install-wordpress) + - [Configure WordPress](#configure-wordpress) + - [Start WordPress](#start-wordpress) ### Create an EC2 instance diff --git a/content/aws/25000000-mount-efs-ec2.md b/content/aws/25000000-mount-efs-ec2.md index 8d4bf407..52bbab39 100644 --- a/content/aws/25000000-mount-efs-ec2.md +++ b/content/aws/25000000-mount-efs-ec2.md @@ -1,7 +1,6 @@ Title: Mount Amazon EFS Drive on EC2 Ubuntu Linux using NFS Utils Date: 2022-06-13 Category: AWS Academy -Series: AWS CDK Tags: aws, linux Author: Rehan Haider Summary: A comprehensive guide to mount Amazon Elastic File Storage (EFS) on Ubuntu Linux using NFS Utils and then use it to serve files from the EFS drive. The guided includes instructions for both AWS Console & CLI diff --git a/content/aws/50000000-flask-on-beanstalk.md b/content/aws/50000000-flask-on-beanstalk.md index 09f7e3b5..9862eb86 100644 --- a/content/aws/50000000-flask-on-beanstalk.md +++ b/content/aws/50000000-flask-on-beanstalk.md @@ -1,7 +1,6 @@ Title: Run Flask Apps on Elastic Beanstalk Date: 2022-07-30 Category: AWS Academy -Series: AWS CDK Tags: aws, python Author: Rehan Haider Summary: Create a simple Flask app and run on AWS Elastic Beanstalk diff --git a/content/aws/75000000-iam-cross-account-role.md b/content/aws/75000000-iam-cross-account-role.md index 40be5e20..8fcf487c 100644 --- a/content/aws/75000000-iam-cross-account-role.md +++ b/content/aws/75000000-iam-cross-account-role.md @@ -1,7 +1,6 @@ Title: Cross Account Access to AWS Services using IAM Roles Date: 2022-08-13 Category: AWS Academy -Series: AWS CDK Tags: aws Author: Rehan Haider Summary: Access another AWS account temporarily using an IAM role and STS From 94d1d3a1d096e0a7bdcbd2326b2cdf1a27707729 Mon Sep 17 00:00:00 2001 From: Rehan Haider Date: Sun, 15 Oct 2023 07:18:04 +0000 Subject: [PATCH 3/3] FIX: Added missing dependency of pelican series that was causing a build error --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ca84c30f..ff58a03a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,12 +21,14 @@ packaging==21.3 pelican==4.8.0 pelican-algolia==2.2.0 pelican-related-posts==1.0.0 +pelican-series==2.1.0 pelican-sitemap==1.0.2 pelican-tag-cloud==1.0.1 pelican-webassets==2.0.0 pluggy==1.0.0 py==1.11.0 Pygments==2.12.0 +pyHtmlProofer==0.7.3a0 pyparsing==3.0.9 pytest==7.1.2 python-dateutil==2.8.2 @@ -41,4 +43,3 @@ Unidecode==1.3.4 urllib3==1.26.11 webassets==2.0 webencodings==0.5.1 -pyhtmlproofer \ No newline at end of file