diff --git a/.gitignore b/.gitignore index 6c20d5a0..2ec5d4c4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ /content/lib/doc/* /content/cli/manpage.md /static/api/*/*.json -/static/*/download -/templates/jsonld/*/*.html \ No newline at end of file +/static/*/download \ No newline at end of file diff --git a/.site-templates/scripts/jsonld.py b/.site-templates/scripts/jsonld.py deleted file mode 100644 index a28dc8e1..00000000 --- a/.site-templates/scripts/jsonld.py +++ /dev/null @@ -1,36 +0,0 @@ -import json -import toml - -site_config = toml.load('config.toml') -url = site_config['base_url'] - -### Kosmorro application information -document = json.dumps({ - "@context": "https://schema.org", - "@type": "SoftwareApplication", - "name": "Kosmorro", - "author": { - "@type": "Person", - "name": "Jérôme Deuchnord", - "gender": "https://schema.org/Male", - "sameAs": "https://deuchnord.fr" - }, - "license": f"https://github.com/Kosmorro/kosmorro/blob/v{site_config['extra']['cli_version']}/LICENSE.md", - "applicationSuite": "Kosmorro", - "applicationCategory": "Science", - "applicationSubCategory": "Astronomy", - "featureList": "\n".join([ - "- Calculate the ephemerides for the date and location of your choice", - "- Get informed as soon as possible of interesting astronomical events", - "- Generate nice-looking PDFs for your observation nights", - ]), - "screenshot": f"{url}/img/screenshots/terminal/events-detection.png", - "operatingSystem": "macOS, Linux, FreeBSD", - "downloadUrl": f"{url}/cli/download", - "softwareVersion": f"{site_config['extra']['cli_version']}", - "releaseNotes": f"{url}/cli/changelog" -}) - -for path in ['static/api/SoftwareApplications/cli.json', 'templates/jsonld/SoftwareApplications/cli.html']: - with open(path, 'w') as file: - file.write(document) diff --git a/Makefile b/Makefile index 3f7f8df1..9fb466da 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ lib-doc: rm content/lib/doc/$${branch}/LICENSE.md; \ done; \ echo "Adding redirections to version $${branch}"; \ - echo "+++\ntitle = \"Redirecting to version $${branch}...\"\nredirect_to = \"/lib/doc/$${current_version}\"\n+++" > content/lib/doc/current/_index.md; \ + echo -e "+++\ntitle = \"Redirecting to version $${branch}...\"\nredirect_to = \"/lib/doc/$${current_version}\"\n+++" > content/lib/doc/current/_index.md; \ cp content/lib/doc/current/_index.md content/lib/doc/_index.md manpage: @@ -33,13 +33,9 @@ manpage: | sed -E 's/^`([A-Za-z_=-]+)`/- \0/' \ >> content/cli/manpage.md -generate-jsonlds: - python3 .site-templates/scripts/jsonld.py - pages: changelog lib-doc manpage -scripts: generate-jsonlds -serve: scripts +serve: pages zola serve build: diff --git a/templates/base.html b/templates/base.html index 3daa1b70..d8c27dd7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,8 +23,6 @@ - - {% block jsonld %}{% endblock %}
diff --git a/templates/index.html b/templates/index.html index 5d1c3c68..e1c53904 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,6 @@ {% block ogtitle %}Kosmorro - A program to calculate your ephemerides{% endblock %} {% block description %}Available for Linux, FreeBSD and Mac!{% endblock %} {% block ogdescription %}Available for Linux, FreeBSD and Mac!{% endblock %} -{% block jsonld %}{% endblock %} {% block stylesheets %}