Skip to content

Commit

Permalink
updated all the dependencies version
Browse files Browse the repository at this point in the history
update the readme for install all the depencies from pyproject

added pelican-obsidian plugin and add example blog post about how to use that
  • Loading branch information
arulrajnet committed Dec 27, 2024
1 parent 3b505c6 commit 4bf8692
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ attila
dist
build
*.egg-info
seo_report.html
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ Install the following module for pelican inside `attila-demo` folder

virtualenv .venv
source .venv/bin/activate
pip3 install -U pelican Markdown ghp-import invoke awscli pysvg Pygments requests webassets pillow jsmin cssmin BeautifulSoup4
pip install .

To activate virtualenv in windows(git-bash)

source .venv/Scripts/activate

**Install attila theme**

This is not needed. All the required dependencies are already installed. This is just an example to install the theme.

pip install git+https://github.com/arulrajnet/attila.git@master

OR
Expand Down
Binary file added content/assets/images/pelican-in-rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/assets/images/pelican-in-rock.webp
Binary file not shown.
Binary file not shown.
158 changes: 158 additions & 0 deletions content/pelican-obsidian-example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
title: Pelican Obsidian Example
date: 2015-11-01 00:35
author: pelican
category: Example
tags:
- pelican
- obsidian
- plugin
- markdown
slug: pelican-obsidian-example
cover: /assets/images/pelican-obsidian-example-cover.webp
color: gray
headline: This blog post written in Obsidian and published with Pelican
status: published
---

This blog post written in Obsidian and published with Pelican.

Used [https://github.com/jonathan-s/pelican-obsidian](pelican-obsidian) plugin to convert Obsidian markdown to Pelican markdown.

Obsidian is a powerful knowledge base that works on top of a local folder of plain text Markdown files. Here are some key Markdown features in Obsidian:

## Headings

Use `#` for headings. The number of `#` symbols indicates the level of the heading.

```md
# Heading 1
## Heading 2
### Heading 3
```
# Heading 1
## Heading 2
### Heading 3

## Bold and Italics:

Use `**` or `__` for bold text and `*` or `_` for italic text.

```md
**bold text**

*italic text*
```

**bold text**

*italic text*

## Lists

Create ordered and unordered lists using numbers or `-`/`*`.

```md
- Item 1
- Item 2
- Subitem 1
1. First item
2. Second item
```

- Item 1
- Item 2
- Subitem 1
1. First item
2. Second item

## Links

Create links using `text`.

```
[Obsidian](https://obsidian.md)
```
[Obsidian](https://obsidian.md)

Internal links to other notes in Obsidian are created using `[[note title]]`.

```
Refer this blog post [[code-block-markdown]]
```

Refer this blog post [[code-block-markdown]]


## Images

Embed images using `![alt text](image URL)`.

Image from public URL

```
![Obsidian Logo](https://upload.wikimedia.org/wikipedia/commons/1/10/2023_Obsidian_logo.svg)
```

![Obsidian Logo](https://upload.wikimedia.org/wikipedia/commons/1/10/2023_Obsidian_logo.svg)


Image from local file

```
![[pelican-in-rock.png]]
```

![[pelican-in-rock.png]]

## Code Blocks

Use backticks for inline code and triple backticks for code blocks.

```md
`inline code`
```

`inline code`

Multiline code block:

```md
```python
def hello_world():
print("Hello, World!")
```
```
```python
def hello_world():
print("Hello, World!")
```

## Blockquotes

Use `>` for blockquotes.

```md
> This is a blockquote.
```

> This is a blockquote.
## Tables

Create tables using pipes `|` and dashes `-`.

```md
| Header 1 | Header 2 |
|----------|----------|
| Row 1 | Data 1 |
| Row 2 | Data 2 |
```

| Header 1 | Header 2 |
|----------|----------|
| Row 1 | Data 1 |
| Row 2 | Data 2 |

These are just a few of the many Markdown features supported by Obsidian. It also supports advanced features like backlinks, graph view, and plugins to extend its functionality.
78 changes: 63 additions & 15 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,25 @@
ARCHIVES_URL = 'archive/'
ARCHIVES_SAVE_AS = 'archive/index.html'

# To show the line numbers for code blocks
# Refer https://docs.getpelican.com/en/stable/settings.html?highlight=MARKDOWN#basic-settings
# MARKDOWN = {
# 'extension_configs': {
# 'markdown.extensions.codehilite': {'css_class': 'highlight', 'linenums': True},
# 'markdown.extensions.extra': {},
# 'markdown.extensions.meta': {},
# },
# 'output_format': 'html5',
# }
# PYGMENTS_RST_OPTIONS = {'linenos': 'table'}
# Markdown settings
# Refer - https://github.com/DataDog/Python-Markdown/tree/master/markdown/extensions
MARKDOWN = {
"extension_configs": {
"markdown.extensions.codehilite": {"css_class": "highlight"},
"markdown.extensions.extra": {},
"markdown.extensions.meta": {},
"markdown.extensions.smarty": {},
"markdown.extensions.tables": {},
# This is for enabling the TOC generation
"markdown.extensions.toc": {
"title": "Table of Contents",
# empty marker to generate only header ids
"marker": "[TOC]",
"permalink": "false",
},
},
"output_format": "html5",
}

### Plugins

Expand All @@ -108,12 +116,24 @@
]

PLUGINS = [
'sitemap',
'neighbors',
'assets',
'post_stats',
"pelican.plugins.image_process",
"pelican.plugins.minify",
"pelican.plugins.neighbors",
"pelican.plugins.obsidian",
"pelican.plugins.related_posts",
"pelican.plugins.seo",
"pelican.plugins.sitemap",
"pelican.plugins.webassets",
"post_stats",
]

# Minify settings
CSS_MIN = True
JS_MIN = True
HTML_MIN = True
INLINE_CSS_MIN = True
INLINE_JS_MIN = True

# Sitemap
SITEMAP = {
'format': 'xml',
Expand All @@ -135,6 +155,34 @@
# Analytics
GOOGLE_ANALYTICS = "UA-3546274-12"

# Settings for image_process
IMAGE_PROCESS = {
"crisp": {
"type": "responsive-image",
"srcset": [
("1x", ["scale_in 800 600 True"]),
("2x", ["scale_in 1600 1200 True"]),
("4x", ["scale_in 3200 2400 True"]),
],
"default": "1x",
},
"large-photo": {
"type": "responsive-image",
"sizes": (
"(min-width: 1200px) 800px, "
"(min-width: 992px) 650px, "
"(min-width: 768px) 718px, "
"100vw"
),
"srcset": [
("600w", ["scale_in 600 450 True"]),
("800w", ["scale_in 800 600 True"]),
("1600w", ["scale_in 1600 1200 True"]),
],
"default": "800w",
},
}

try:
import attila
THEME = attila.get_path()
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,20 @@ keywords = [
]

dependencies = [
"cssmin == 0.2.0",
"jsmin == 3.0.1",
"pelican == 4.9.1",
"pelican == 4.10.2",
"pelican-image-process == 3.0.4",
"pelican-minify == 2.0.0",
"pelican-neighbors == 1.2.0",
"pelican-related-posts == 1.0.0",
"pelican-seo == 1.2.2",
"pelican-sitemap == 1.1.0",
"pelican-webassets == 2.0.0",
"pelican-sitemap == 1.2.0",
"pelican-webassets == 2.1.0",
"markdown == 3.7",
"ghp-import == 2.1.0",
"invoke == 2.2.0",
"pysvg == 0.2.2",
"attila@git+https://github.com/arulrajnet/attila#egg=master",
"pelican-obsidian@git+https://github.com/jonathan-s/pelican-obsidian#egg=main",
]

[tool.setuptools]
Expand Down

0 comments on commit 4bf8692

Please sign in to comment.