Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arulrajnet/attila
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0
Choose a base ref
...
head repository: arulrajnet/attila
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 13 commits
  • 31 files changed
  • 3 contributors

Commits on Nov 1, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    IvanRibakov Ivan Ribakov
    Copy the full SHA
    1e83283 View commit details

Commits on Feb 19, 2024

  1. Fix #101 add icon for instagram (#102)

    - generate the icon from fontello
    
    - Use the insta profile id in article and author templates
    arulrajnet authored Feb 19, 2024
    Copy the full SHA
    cce7615 View commit details
  2. Update readme for supported social links in AUTHOR_META (#103)

    arulrajnet authored Feb 19, 2024
    Copy the full SHA
    bc49578 View commit details

Commits on May 3, 2024

  1. Fix wrong body_class values in archives, authors, categories, pages a…

    …nd tags templates (#104)
    
    * fix: correct body_class in archives, authors, categories, pages and tags HTML
    
    * Revert "fix: correct body_class in archives, authors, categories, pages and tags HTML"
    
    This reverts commit a1b5b25.
    
    * fix: delete useless modification and correct body_class in base.html
    
    * Changes in current_url for tags and categories
    
    ---------
    
    Co-authored-by: Arul <[email protected]>
    Tseing and arulrajnet authored May 3, 2024
    Copy the full SHA
    ab26570 View commit details

Commits on Aug 8, 2024

  1. Create FUNDING.yml

    arulrajnet authored Aug 8, 2024
    Copy the full SHA
    1cffdee View commit details

Commits on Sep 8, 2024

  1. Install as pip (#107)

    * Github action added for publish asciidoc
    
    * Fix #69 added pyproject.toml file
    
    - This is needed for build and publish
    
    * Fix #69 update pyproject and readme.adoc
    
    * Add __init__.py in attila module
    
    * Fix the module not fount error
    arulrajnet authored Sep 8, 2024
    Copy the full SHA
    399a2a9 View commit details
  2. Typo fix in readme

    arulrajnet committed Sep 8, 2024
    Copy the full SHA
    a1e7d74 View commit details

Commits on Sep 14, 2024

  1. MathJax cnd codehighlight support for asciidoc

    arulrajnet committed Sep 14, 2024
    Copy the full SHA
    767c693 View commit details

Commits on Oct 20, 2024

  1. Fix #106 make the theme work with article cover startwith / or not

    arulrajnet committed Oct 20, 2024
    Copy the full SHA
    7209b4c View commit details

Commits on Dec 26, 2024

  1. Performance fixes (#108)

    * update to latest pelican
    
    - update highlight js to latest version
    
    - remove margin for pre code. this is used for line numbers
    
    - webassets and cssmin for stylesheet compress
    
    * added minify
    arulrajnet authored Dec 26, 2024
    Copy the full SHA
    0c5930e View commit details
  2. update versions

    arulrajnet committed Dec 26, 2024
    Copy the full SHA
    fe58ee7 View commit details
  3. support for image-process added to cover images

    arulrajnet committed Dec 26, 2024
    Copy the full SHA
    6bb3409 View commit details

Commits on Jan 13, 2025

  1. support for pelican-statistics added

    arulrajnet committed Jan 13, 2025
    Copy the full SHA
    6a6484f View commit details
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [arulrajnet]
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Python package
name: Package Build and Test

on: [push]

jobs:
build:
build-and-test:

runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.12"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
33 changes: 33 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GitHub Pages Asciidoc Publish

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Includes the AsciiDoctor GitHub Pages Action to convert adoc files to html and publish to gh-pages branch
- name: asciidoctor-ghpages
uses: manoelcampos/asciidoctor-ghpages-action@v2.3.0
with:
pdf_build: true
# asciidoctor_params: --attribute=nofooter
# adoc_file_ext: .ascii # default is .adoc
# source_dir: docs/ # default is .
# slides_build: true
# pre_build:
# post_build:
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -4,3 +4,6 @@ output
tests/.cache/
.venv
.direnv
dist
build
*.egg-info
29 changes: 24 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -19,18 +19,36 @@ https://github.com/zutrinken/attila[attila]
== Demo

* https://attila.demo.arulraj.net[Blog]
* https://attila.demo.arulraj.net/2015/11/headlines-blockquotes-images.html[Post]
* https://attila.demo.arulraj.net/2015/11/headlines-blockquotes-images/[Post]
* https://attila.demo.arulraj.net/tag/general/[Tag Archive]
* https://attila.demo.arulraj.net/author/zutrinken/[Author
* https://attila.demo.arulraj.net/author/pelican/[Author
Archive]
* https://attila.demo.arulraj.net/archives.html[All archive]
* https://attila.demo.arulraj.net/archive/[All archive]
* https://attila.demo.arulraj.net/pages/about/[Page]

Demo blog https://github.com/arulrajnet/attila-demo[source code]

[[install]]
== Install

=== Using Pip

[source,bash]
----
pip install git+https://github.com/arulrajnet/attila.git@master
----

Then in your `pelicanconf.py` set the theme to `attila`.

[source,python]
----
import attila
THEME = attila.get_path()
----

=== Using pelican-themes


The recommend way to install is using pelican-themes command.

@@ -49,8 +67,7 @@ folder name
* Navigation support
* Paralax cover images for posts, author archives and blog
* Author informations for posts and author archives
* Featured posts (via
https://github.com/getpelican/pelican-plugins/tree/master/neighbors[plugin])
* Featured posts (via https://github.com/pelican-plugins/neighbors[plugin])
* Reading progress for posts
* Automatic code syntax highlight
* Disqus support
@@ -265,6 +282,8 @@ AUTHOR_META = {
}
....

The supported social profile for author are `facebook`, `github`, `linkedin`, `twitter` and `instagram`.

[[analytics]]
=== Analytics

14 changes: 14 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import logging
from pathlib import Path

logger = logging.getLogger("attila")

ATTILA_ROOT: Path = Path(__file__).resolve().parent


def get_path() -> str:
"""Returns installation path of the theme.
Used in ``pelicanconf.py`` to dynamiccaly fetch theme location on the system.
"""
return str(ATTILA_ROOT)
73 changes: 73 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[project]
requires-python = ">=3.7"
name = "attila"
version = "2.0"
description = "Attila Pelican Theme"
authors = [
{ name = "Arulraj Venni", email = "me@arulraj.net"}
]
readme = "README.md"
license = {file = "LICENSE"}

keywords = [
'pelican',
'pelican-theme',
'markdown',
'theme',
'python',
'ghost',
]

classifiers = [
# See: https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
'Environment :: Web Environment',
'Framework :: Pelican :: Themes',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: JavaScript',
'Programming Language :: Other',
"Programming Language :: Python :: 3",
'Topic :: Internet :: WWW/HTTP',
'Topic :: Text Processing :: Markup :: HTML',
'Topic :: Text Processing :: Markup :: Markdown',
]

dependencies = [
"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.2.0",
"pelican-statistics >= 1.0.0",
"pelican-webassets >= 2.1.0",
]

[project.urls]
"Homepage" = 'https://github.com/arulrajnet/attila'
"Documentation" = 'http://arulrajnet.github.io/attila'
"Repository" = 'https://github.com/arulrajnet/attila'
"Funding" = "https://github.com/sponsors/arulrajnet"
"Issues" = "https://github.com/arulrajnet/attila/issues"
"Releases" = "https://github.com/arulrajnet/attila/releases"

[tool.setuptools]
include-package-data = true
packages = [
"attila",
"attila.static",
"attila.templates",
]

[tool.setuptools.package-dir]
"attila" = "."
"attila.static" = "static"
"attila.templates" = "templates"

[tool.setuptools.package-data]
"*" = ["**"]
50 changes: 4 additions & 46 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -243,50 +243,6 @@ td,th {
-moz-osx-font-smoothing: grayscale
}

/*.icon-star:before {
content: '\e800'
}
.icon-mail:before {
content: '\e801'
}
.icon-globe:before {
content: '\e802'
}
.icon-arrow-left:before {
content: '\e803'
}
.icon-arrow-right:before {
content: '\e804'
}
.icon-search:before {
content: '\e805'
}
.icon-rss:before {
content: '\e807'
}
.icon-twitter:before {
content: '\f099'
}
.icon-facebook:before {
content: '\f09a'
}
.icon-menu:before {
content: '\f0c9'
}
.icon-linkedin:before {
content: '\f0e1'
} */

.icon-star:before { content: '\e800'; } /* '' */
.icon-rss:before { content: '\e801'; } /* '' */
.icon-posts:before { content: '\e802'; } /* '' */
@@ -304,6 +260,7 @@ td,th {
.icon-github:before { content: '\e80e'; } /* '' */
.icon-reddit:before { content: '\e80f'; } /* '' */
.icon-mail:before { content: '\e816'; } /* '' */
.icon-instagram:before { content: '\f16d'; } /* '' */

@font-face {
font-family: 'Libre Baskerville';
@@ -801,8 +758,9 @@ button,input,select,textarea {
display: block;
position: static;
top: auto;
margin: -1.33334em -1.33334em -1.33334em 1.33334em;
padding: 1.33334em;
/* This is for if the code has line numbers. */
/* margin: -1.33334em -1.33334em -1.33334em 1.33334em;
padding: 1.33334em; */
overflow-x: auto;
font-size: 0.75em;
line-height: 2em;
3 changes: 3 additions & 0 deletions static/font/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
The icons are generated from https://fontello.com/

Refer the [config.json](config.json) for the list of icons and their respective unicode.


star - Font Awesome, star-empty - e800
rss - Font Awesome, rss - e801
@@ -18,3 +20,4 @@ linkedin - Entypo, linkedin - e80d
github - Zocial, github-circled - e80e
reddit - Font Awesome, reddit-alien- e80f
mail - Font Awesome, mail - e816
instagram - Font Awesome, instagram - f16D
8 changes: 7 additions & 1 deletion static/font/config.json
Original file line number Diff line number Diff line change
@@ -107,6 +107,12 @@
"css": "menu",
"code": 59402,
"src": "fontawesome"
},
{
"uid": "4c1ef492f1d2c39a2250ae457cee2a6e",
"css": "instagram",
"code": 61805,
"src": "fontawesome"
}
]
}
}
Binary file modified static/font/icon.eot
Binary file not shown.
8 changes: 5 additions & 3 deletions static/font/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/font/icon.ttf
Binary file not shown.
Binary file modified static/font/icon.woff
Binary file not shown.
Binary file modified static/font/icon.woff2
Binary file not shown.
10 changes: 9 additions & 1 deletion templates/archives.html
Original file line number Diff line number Diff line change
@@ -5,12 +5,16 @@
{% if HEADER_COVER %}
{% if HEADER_COVER|lower|truncate(4, True, '') == "http" %}
{% set selected_cover = HEADER_COVER %}
{% elif HEADER_COVER.startswith('/') %}
{% set selected_cover = SITEURL+HEADER_COVER %}
{% else %}
{% set selected_cover = SITEURL+"/"+HEADER_COVER %}
{% endif %}
{% elif HOME_COVER %}
{% if HOME_COVER|lower|truncate(4, True, '') == "http" %}
{% set selected_cover = HOME_COVER %}
{% elif HOME_COVER.startswith('/') %}
{% set selected_cover = SITEURL+HOME_COVER %}
{% else %}
{% set selected_cover = SITEURL+"/"+HOME_COVER %}
{% endif %}
@@ -35,7 +39,11 @@
<h1 class="post-title">{{ current_display_title }}</h1>
{% if selected_cover %}
<div class="post-cover cover">
<img src="{{ selected_cover }}" alt="{{ current_title }}" />
{% if "image_process" is plugin_enabled %}
<img class="image-process-large-photo" src="{{ selected_cover }}" alt="{{ current_title }}" />
{% else %}
<img src="{{ selected_cover }}" alt="{{ current_title }}" />
{% endif %}
</div>
{% elif selected_color %}
<div class="post-cover cover" style="background-color: {{ selected_color }}">
Loading