Package: lamya
lamyaThelamya(emphasis is on the ya - lamyà) package provides both an out of the box markdown static site generator and a framework for building your own custom ones.I like to think of it as a static site generator generator.InstallTo installlamyayou can use pip:pip install lamya[all]The reason I've added the optionalalldependencies is that by defaultlamyaattempts to usemarkdownas a markup processor andjinja2as a template engine, but if you know you will be using a different markup processor and template engine you are free to skip the[all]and just installlamya.QuickstartCLIYou can runlamya's static site generator as a module to turn a directory of markdown files into a static site:python -m lamya -url "http://my_url.com" --content_directory "path_to_content/" [OPTIONS]This will take all the markdown descendants of thepath_to_contentdirectory and turn them into a static site, built into a folder calledbuildin the current directory.NOTE: If no--content_directoryflag is provided,./contentwill be used. Additionally the--build_directoryflag can be used to specify where to build the site. For more info about flags have a look at the fullCLI Reference.Build scriptOr you could write a simple build script which uses thelamya.site_generator.SiteGeneratorlike so:fromlamya.site_generatorimportSiteGeneratorfrompathlibimportPathsite_gen=SiteGenerator(name="dontpanic",url="https://dont.panic",subtitle="we demand rigidly defined areas of doubt and uncertainty",theme_options={"sidebar":True,"sidebar_image":"/img/sidebar.png"},content_directory=Path("content"))# Make sure all content has been read and any front matter information has been# extracted, so it can be used in the templatessite_gen.process_content_tree()# optionally modify your existing content, generate new one, categorize# posts, etc.# optionally build a navigationsite_gen.build_navigation()# or you could manually provide one# site_gen.navigation = {}# generate the sitesite_gen.render()Alternatively, if you like the idea of mostly maintaining one Config object, which specifies most of your build process, you can utilize the same function that generates the site via the CLI method above -lamya.site_generator.SiteGenerator.run_from_config().fromlamya.configimportConfigasDefaultConfigfromlamya.site_generatorimportSiteGeneratorclassConfig(DefaultConfig):name="dontpanic"url="https://dont.panic"subtitle="we demand rigidly defined areas of doubt and uncertainty",content_directory="content",theme_options={"sidebar":True,"sidebar_image":"/img/sidebar.png"}site_gen=SiteGenerator.run_from_config(Config(),render=False)# We've set `render` to False above, so we can make any changes we'd like# here before actually rendering the site# NOTE: That this method is more similar to the CLI method above, since# all of the functions like `process_content_tree`, `build_navigation`, etc.# are called inside the `run_from_config`.site_gen.render()Featuresdesigned to be interacted with - import it and build your site the way you want itprovides an out-of-the-box site generatorcontent is described by a simple and easily modified tree structureeven though, there’s no specific extensions support, lamya is easily extensible, since it’s just a small collection of simple python objectsDocumentationGet started- install lamya and learn the basics to hit the ground runningThemes- information about developing, customizing, interacting with themes and also the documentation of the default themeCLI Reference- command line interface referenceAPI Reference- complete lamya API referenceOr here's a link to thefull documentation.LicenseThis project is licensed under theGNU General Public License v3.0Acknowledgementspygmentsis used for code highlightingtabler iconsfor the default themeI usedThe excellent lorem ipsum markdown generator by Jasper Van der Jeugtto generate some example markdown for my tests