Skip to content

Commit

Permalink
DOC: update development documentation 4a2a4f2
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Dec 1, 2024
0 parents commit 8bd09b1
Show file tree
Hide file tree
Showing 45,735 changed files with 17,313,177 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6af1b78874e8765b71cabb1c99a0c30c
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mapdl.docs.pyansys.com
37 changes: 37 additions & 0 deletions gen-sitemap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""
Generate a sitemap.
"""

import os
import xml.etree.ElementTree as ET
from xml.dom.minidom import parseString

with open('CNAME') as fid:
cname = fid.read().strip()
base_url = f"https://{cname}"

base_path = "version/stable"

def create_sitemap_element(url):
url_elem = ET.Element("url")
loc_elem = ET.SubElement(url_elem, "loc")
loc_elem.text = url
return url_elem

sitemap = ET.Element("urlset", xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")

for root, dirs, files in os.walk(base_path):
for file in files:
if file.endswith(".html"):
file_path = os.path.join(root, file)
url = os.path.join(base_url, file_path)
sitemap_element = create_sitemap_element(url)
sitemap.append(sitemap_element)

tree = ET.ElementTree(sitemap)

# Pretty-print the XML content
pretty_xml = parseString(ET.tostring(tree.getroot(), encoding="utf-8")).toprettyxml(indent=" ")

with open("sitemap.xml", "w", encoding="utf-8") as f:
f.write(pretty_xml)
1 change: 1 addition & 0 deletions googled04f663dfe3ce5a9.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-site-verification: googled04f663dfe3ce5a9.html
Loading

0 comments on commit 8bd09b1

Please sign in to comment.