Skip to content

Commit

Permalink
FEAT: Series capability
Browse files Browse the repository at this point in the history
  • Loading branch information
rehanhaider committed Oct 15, 2023
1 parent f1d9025 commit f250bb1
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 6 deletions.
1 change: 1 addition & 0 deletions content/aws/25000000-mount-efs-ec2.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions content/aws/50000000-flask-on-beanstalk.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions content/aws/75000000-iam-cross-account-role.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions content/aws/87500000-cdk-api-gateway-route53.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions design/alexis/templates/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
</article>
<h5>Need Help? <a href="https://github.com/CloudBytesDotDev/CloudBytes.dev/discussions">Open a discussion
thread on GitHub</a>.</h5>
{% if article.series %}
{% include "layouts/partial/series_navigation.html" %}
{% endif %}
{% include "layouts/partial/tags.html"%}
<hr>
{% include "layouts/related.html" %}
Expand Down
53 changes: 53 additions & 0 deletions design/alexis/templates/layouts/partial/series_navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- FILEPATH: /workspaces/cloudbytes/design/alexis/templates/layouts/partial/series_navigation.html -->

<div class="series_navigation">
<ul class="pagination">

{% if article.series.previous == None %}
<li class="page-item">
<a class="page-link" aria-label="Previous"><span>
<< Prev: {{article.series.previous.title}}</span></a>
</li>
{% else %}
<li class="page-item">
<a href="/{{article.series.previous.url}}" class="page-link" aria-label="Previous"><span>
<< Prev: {{article.series.previous.title}}</span></a>
</li>
{% endif %}

<li class="page-item">
<a class="series-title" aria-label="Series"><span>
Series: {{article.series.name}}</span></a>
</li>

{% if article.series.next == None %}
<li class="page-item">
<a class="page-link active" aria-label="Next"><span>Next:
{{article.series.next.title}}
>></span></a>
</li>
{% else %}
<li class="page-item">
<a href="/{{article.series.next.url}}" class="page-link" aria-label="Next"><span>Next:
{{article.series.next.title}}
>></span></a>
</li>
{% endif %}
</ul>
</div>

<style>
.series_navigation {
text-align: center;
}

.pagination {
display: flex;
list-style-type: none;
padding: 0;
width: 100%;
/* Make sure the list takes up the full width of its parent */
justify-content: space-between;
/* Pushes the items to the extreme left and right */
}
</style>
15 changes: 9 additions & 6 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand All @@ -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},
Expand All @@ -126,6 +127,7 @@
"pelican.plugins.tag_cloud",
"pelican.plugins.related_posts",
"plugins.fix_sitemap",
"pelican.plugins.series",
# "plugins.minify",
]
prod_plugins = [
Expand All @@ -134,6 +136,7 @@
"pelican.plugins.related_posts",
"plugins.fix_sitemap",
"plugins.search",
"pelican.plugins.series",
"plugins.minify",
]

Expand Down

0 comments on commit f250bb1

Please sign in to comment.