/ΙΎuΛpΙnΛtΙΙΎ/ (Bengali)
Table of Contents π©
Fork of pidgeotto
Rupantar is a command-line tool that enables quick generation of simple, minimally themed, static websites with extensive support for customizations.
- Customizable templates using Jinja2
- Fits well with multiple use cases
- Blogging, personal knowledge base, portfolio, etc.
- Fully JavaScript-free
- Trust the resilience of good ol' HTML and CSS
- RSS and Atom feed generation
- Fast build times
- Bundled web server with live reload on changes
- Cross-platform
- Runs in Windows, Linux, and macOS machines
- Minimal system resource usage/footprint
Rupantar has the following dependencies:
-
PyYAML: Project configuration and page metadata management
-
tomli: Same as above for TOML enjoyers
- Not required if running Python 3.11 or above
-
jinja2: Templating engine used to render the HTML/XML pages
-
markdown2: Reading Markdown files
-
xdg-base-dirs: Getting location for app runtime data storage ('AppData')
- as per the XDG Base Dir spec
- mostly for storing logs when running rupantar
-
Rupantar needs Python installed locally.
- CPython version compatibility: Python interpreter version 3.10 or higher.
-
pip, Python's default package management tool, can be used. -
If
pipxis available, it is recommended to use that instead. -
Installation from source:
- Install Git
- Clone this git repository
cdinto therupantardirectory
$ pip install -r requirements -
Direct installation using Git:
$ pip install git+https://github.com/bhodrolok/rupantar -
Using pipx:
$ pipx install rupantar==0.9.5a0
- NB: Rupantar is a pure CLI tool, without any GUI.
To get a comprehensive list of commands and options:
$ rupantar -hTo get the detailed usage of a specific command:
$ rupantar cmd_name -hTo initiate a project ( say for example notun):
$ rupantar init notun- NB: Some generic questions will be asked running this command in order to set up some configuration values.
- To avoid this, pass the
-sor--skipflag afterinit.- They will be filled with some sane defaults.
To add a new post/page (say for example kagoch, to the existing notun project):
$ rupantar new notun kagochTo build the static pages (for notun):
$ rupantar build notunTo preview the website locally:
$ rupantar serve notun- Useful for quick and simple testing via a local HTTP web server.
The overall skeleton of a fully built & ready-to-serve rupantar project looks something like:
rupantar_project/
βββ config.yml <-- Config for the page title, CSS file, and other custom config (custom templates, etc.)
βββ content/ <-- Directory to store Markdown files.
β βββ header.md
β βββ footer.md
β βββ home.md
β βββ notes/ <-- Directory to store Markdown files for content of extra pages.
β βββ example_blog.md
βββstatic/ <-- Directory to store static content eg: CSS, images, etc.
β βββ demo.css
βββ public/ <-- Directory to store the generated static site.
βββ templates/ <-- Directory to store Jinja2 layouts for the pages.
βββ home_template.html.jinja
βββ note_template.html.jinja
βββ your_custom_template.html.jinja
βββ feed_template.xml.jinja
Rupantar itself is developed with a "src layout" structure so as to follow a more modern, standardized, and organized way of managing everything. To read more about that, click here.
A π§ features roadmap of this Python project can be found here.
And lastly, there is also a TODO.md for some transparency and organization (and quick notes/documentation :P).
-
It is recommended to use Poetry for better dependency management, packaging, and release.
- A big reason is the ease in managing virtual environments.
- Why consider
venvsin the first place? Well you get an isolated environment, better reproducibility, better dependency management, and (most importantly!) minimize risk of any conflicts with other existing Python projects/dependencies locally on the system. Especially if they were installed globally system-wide usingpip. - Just overall makes the development process more smoother.
-
After forking and cloning the repository:
- Navigate to the cloned project directory.
- Install all the dependencies, including the optional ones:
$ poetry install --with=dev,test,docu - Activate a virtual env:
$ poetry shell - Run rupantar:
$ poetry run rupantar -h
This is an open source project. Suggestions, bug reports, feature requests, documentation improvements, etc. are more than welcome through Pull Requests (PRs) and Issues.
The usual steps for contributing via a PR are:
-
Fork this repository to your own GitHub account
-
Clone the repository to your machine
$ git clone https://github.com/Bhodrolok/rupantar.gitcdto where you cloned the repo and create a local git branch
$ git checkout -b new-feature-branch- Make your changes and commit them to that branch
$ git commit -m "brief description about changes"- Push your changes to your remote fork
$ git push origin new-feature-branch
- Create a new Pull Request!
This project is licensed under the MIT License.
tldr is that rupantar is Free and Open Source Software (FOSS)!
