set events

This commit is contained in:
Waylon Walker 2023-01-01 14:08:21 -06:00
parent ff84817732
commit 1f844dae9d
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
15 changed files with 1448 additions and 1 deletions

10
site/.copier-answers.yml Normal file
View file

@ -0,0 +1,10 @@
# Changes here will be overwritten by Copier
_commit: v2
_src_path: git+https://github.com/WaylonWalker/markata-blog-starter
author_email: waylon@waylonwalker.com
author_fullname: Waylon Walker
author_twitter: '@_waylonwalker'
description: Creeper Adventure is a game I am making with my son.
project_name: creeper adventure
python_package_import_name: creeper_adventure
url: https://creeper-adventure.waylonwalker.com

42
site/.github/workflows/build-site.yml vendored Normal file
View file

@ -0,0 +1,42 @@
# This is a basic workflow to help you get started with Actions
name: Build using markata
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches:
- "*"
# do not trigger ci when pushing gh-pages step
- "!prod-markata"
pull_request:
branches:
- "main"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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@v3
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: install hatch
run: pip install hatch
- name: build with markata
run: hatch run build
- name: GitHub Pages
uses: crazy-max/ghaction-github-pages@v3.0.0
with:
# you can choose the target branch of your choice
target_branch: prod-markata
build_dir: markout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

964
site/.gitignore vendored Normal file
View file

@ -0,0 +1,964 @@
**/.markata.cache/
markout/
# Created by https://www.toptal.com/developers/gitignore/api/vim,node,data,emacs,python,pycharm,executable,sublimetext,visualstudio,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,node,data,emacs,python,pycharm,executable,sublimetext,visualstudio,visualstudiocode
### Data ###
*.csv
*.dat
*.efx
*.gbr
*.key
*.pps
*.ppt
*.pptx
*.sdf
*.tax2010
*.vcf
*.xml
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
### Executable ###
*.app
*.bat
*.cgi
*.com
*.exe
*.gadget
*.jar
*.pif
*.vb
*.wsf
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### PyCharm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/
# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml
# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/
# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$
# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml
# Azure Toolkit for IntelliJ plugin
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
.idea/**/azureSettings.xml
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
### SublimeText ###
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# Support for Project snippet scope
.vscode/*.code-snippets
# Ignore code-workspaces
*.code-workspace
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
# Local History for Visual Studio Code
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
### VisualStudio Patch ###
# Additional files built by Visual Studio
# End of https://www.toptal.com/developers/gitignore/api/vim,node,data,emacs,python,pycharm,executable,sublimetext,visualstudio,visualstudiocode
.markata.cache
.markata.cache

9
site/LICENSE.txt Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2022-present [( author_fullname )] <[( author_email )]>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

106
site/README.md Normal file
View file

@ -0,0 +1,106 @@
# markata-blog-starter
This is a blog starter for the python static site generator `markata`.
## New blog from template
The markata cli includes a `new` command that will present you with questions
to fill in the jinja variables in this repo.
``` bash
pipx install markata
markata new blog [directory]
```
Alternatively using copier directly
``` bash
pipx install copier
pip install copier
copier git+https://github.com/WaylonWalker/markata-blog-starter [directory]
```
> Note: make sure you specify the [directory] that youu want your site to be
> created into, not [directory]
## Installation
This site comes with a `pyproject.toml` that can be used by hatch to
automatically take care of your virtual environments for you.
``` bash
pip install hatch
```
## Building the site, Leveraging Hatch
Hatch comes with a nice system for creating scirpts that you can run in your
managed virtual environment with less effort of managing. You can create any
that you want in your own `pyproject.toml`, but these come with the template
out of the box.
``` bash
# builds the site
hatch run build
# clean's cache and output directory
hatch run clean
# clean's cache and output directory, and builds
hatch run clean-build
# runs a development server, watches for changes and rebuilds.
hatch run tui
# run's clean then start's the tui
hatch run clean-tui
```
> Hatch takes care of the venv for you
## Building the site, vanilla
You will want to install everything in a virtual environment to prevent
yourself from clogging up your system python, or trying to run two versions of
`markata` for different projects.
``` bash
# using hatch for the virtual environment
hatch shell
# using venv
python -m venv .venv
. ./.venv/bin/activate
pip install -e .
```
Once you have your virtual environment created and activated you can use the
markata cli plugin to build your site.
``` bash
# builds the site
markata build
# clean's cache and output directory
markata clean
# runs a development server, watches for changes and rebuilds.
markata tui
```
## repl or script
It's also possible to run the build from a repl like ipython or a python
script.
``` python
from markata import Markata
m = Markata()
m.run()
```
## License
`markata-blog-starter` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

View file

@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
#
# SPDX-License-Identifier: MIT
__version__ = '0.0.1'

View file

@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
#
# SPDX-License-Identifier: MIT

236
site/markata.toml Normal file
View file

@ -0,0 +1,236 @@
#
# __ __ _ _ _ _
# | \/ | __ _ _ __| | ____ _| |_ __ _ | |_ ___ _ __ ___ | |
# | |\/| |/ _` | '__| |/ / _` | __/ _` || __/ _ \| '_ ` _ \| |
# | | | | (_| | | | < (_| | || (_| || || (_) | | | | | | |
# |_| |_|\__,_|_| |_|\_\__,_|\__\__,_(_)__\___/|_| |_| |_|_|
#
# https://creeper-adventure.waylonwalker.com
[markata]
# bump site version to bust GitHub actions cache
version = 0
# 2 weeks in seconds
default_cache_expire = 1209600
## Markata Setup
# Patterns to look for content
glob_patterns = "pages/**/*.md"
# include an edit link
edit = false
# Where to output the site
# output_dir = "markout"
# Static directory to copy over
# assets_dir = "static"
# plugins to enable
hooks = [
"markata.plugins.publish_source",
"markata.plugins.prevnext",
# "markata.plugins.service_worker", # enable the service_worker to deploy as a pwa with offline support, not reccommended for pages with frequent changes.
"default"
]
# plugins to disable
disabled_hooks = [
# seo is replaces by using markta.head.meta in config
"markata.plugins.seo",
]
## Site Config
url = "https://creeper-adventure.waylonwalker.com"
description = "Creeper Adventure is a game I am making with my son."
title = "creeper adventure"
rss_description = "Creeper Adventure is a game I am making with my son."
author_name = "Waylon Walker"
author_email = "waylon@waylonwalker.com"
## PWA config
site_name = "creeper adventure"
theme_color = "#322D39"
background_color = "#B73CF6"
start_url = "/"
short_name = "creeper adventure"
display = "minimal-ui"
icon = "icon.png"
# use a different template than the built in one
# post_template = "pages/templates/post_template.html"
## Color Theme
# color_bg = '#1f2022'
# color_bg_code = '#1f2022'
# color_text = '#eefbfe'
# color_link = '#fb30c4'
# color_accent = '#e1bd00c9'
# overlay_brightness = '.85'
# color_bg_light = '#eefbfe'
# color_bg_code_light = '#eefbfe'
# color_text_light = '#1f2022'
# color_link_light = '#47cbff'
# color_accent_light = '#ffeb00'
# overlay_brightness_light = '.95'
# default lang
lang = 'en'
[markata.nav]
'Home'='/'
'All Posts'='/archive'
[markata.prevnext]
# strategy can be 'first' or 'all'
# 'first' will cycle through the first map the post is found in.
# 'all' will cycle through all of the maps
strategy='first'
# if you want different colors than your main color_text and color_accent, then
# you can override it here
# colors can be any valid css color format
prevnext_color_text="white"
prevnext_color_text_light="black"
prevnext_color_angle="white"
prevnext_color_angle_light="black"
## markata.plugins.auto_description configuration
[markata.auto_description.description]
len=160
[markata.auto_description.long_description]
len=250
[markata.auto_description.super_description]
len=500
[markata.auto_publish.filters]
til="templateKey=='til' and date<=today and post.get('published', False)== 'True'"
## SEO | <head>
[[markata.head.text]]
# dynamically get the title for each page
value = "<title>{{ title|e }}</title>"
[[markata.head.meta]]
name = "twitter:title"
# dynamically get the title for each page
content = "{{ title|e }}"
[[markata.head.meta]]
name = "og:title"
# dynamically get the title for each page
content = "{{ title|e }}"
[[markata.head.meta]]
name = "description"
# dynamically get the description for each page
content = "{{ description|e }}"
[[markata.head.meta]]
name = "og:description"
# dynamically get the description for each page
content = "{{ description|e }}"
[[markata.head.meta]]
name = "twitter:description"
# dynamically get the description for each page
content = "{{ description|e }}"
[[markata.head.meta]]
name = "og:type"
content = "article"
[[markata.head.link]]
# dynamically get the canonical url for each page
href="{{ config.url }}/{{ slug + '/' if slug != 'index' else '' }}"
rel="canonical"
[[markata.head.meta]]
# dynamically get the canonical url for each page
name="og:url"
content="{{ config.url }}/{{ slug }}/"
[[markata.head.meta]]
# dynamically get the canonical url for each page
name="og:image"
content="{{ config.url }}/{{ slug }}.jpg"
[[markata.head.meta]]
name="og:image:width"
content=1200
[[markata.head.meta]]
name="og:image:height"
content=600
[[markata.head.meta]]
name="twitter:creator"
content="@_waylonwalker"
[[markata.head.meta]]
name="twitter:card"
content="summary_large_image"
[[markata.head.meta]]
name = "og:author"
content = "Waylon Walker"
[[markata.head.meta]]
name = "og:site_name"
content = "creeper adventure"
[[markata.head.meta]]
name = "og:author_email"
content = "waylon@waylonwalker.com"
[[markata.head.meta]]
# set the site generator to the current markata version
name = "generator"
content = "markata {{ __version__ }}"
# [[markata.head.meta]]
# name = "monetization"
# content = "<your wallet url>"
[[markata.head.meta]]
name = "theme-color"
content="#322D39"
## markata.plugins.feeds configuration
[markata.feeds.archive]
# creates a feed at /archive
filter="date<=today and post.get('published', False)"
sort="date"
reverse="True"
[markata.feeds.all]
# creates a feed at /all
filter="True"
sort="date"
reverse="True"
[markata.feeds.published]
# creates a feed at /published
filter="date<=today and post.get('published', False)"
sort="date"
reverse="True"
[markata.feeds.draft]
# creates a feed at /draft
filter="date>today or not post.get('published', False)"
sort="date"
reverse="True"

18
site/pages/404.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Whoops that page was not found
date: 2022-09-01 1:00:00
description: 404, looks like we can't find the page you are looking for
published: false
output_html: 404.html
---
404, looks like we can't find the page you are looking for. Try one of these
pages.
<ul>
{% for post in markata.map('post', filter='published') %}
<li><a href="{{ post.slug }}">{{ post.title }}</a></li>
{% endfor %}
</ul>

16
site/pages/index.md Normal file
View file

@ -0,0 +1,16 @@
---
date: 2022-09-01 1:00:00
title: Markata Blog Starter
published: True
tags:
- home
- meta
---
Creeper adventure is a game I am making with my son.
## Downloads
* [windows](./creeper-windows-latest.zip)
* [linux](./creeper-ubuntu-latest.zip)

View file

37
site/pyproject.toml Normal file
View file

@ -0,0 +1,37 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "creeper_adventure"
description = "Creeper Adventure is a game I am making with my son."
readme = "README.md"
requires-python = ">=3.7"
license = "MIT"
authors = [
{ name = "Waylon Walker", email = "waylon@waylonwalker.com" },
]
dependencies = ['markata~=0.5.0.dev0']
dynamic = ["version"]
[tool.hatch.version]
path = "creeper_adventure/__about__.py"
[tool.hatch.envs.default]
dependencies = [
"pyinstrument",
]
[tool.hatch.envs.default.scripts]
clean = "markata clean"
build = "markata build"
tui = "markata tui"
serve = "python -m http.server 8000 --directory=markout"
clean-build = ['clean', 'build',]
clean-tui = ['clean', 'build', 'tui']

BIN
site/static/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

1
site/static/robots.txt Normal file
View file

@ -0,0 +1 @@
User-agent: *