瀏覽代碼

Adds a meta on top of every generated class to hide 'Edit on Github' link

Linked docs issue https://github.com/godotengine/godot-docs/pull/2656
StraToN 6 年之前
父節點
當前提交
d83b8881ae
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      doc/tools/makerst.py

+ 1 - 0
doc/tools/makerst.py

@@ -347,6 +347,7 @@ def make_rst_class(class_def, state, dry_run, output_dir):  # type: (ClassDef, S
         f = open(os.path.join(output_dir, "class_" + class_name.lower() + '.rst'), 'w', encoding='utf-8')
         f = open(os.path.join(output_dir, "class_" + class_name.lower() + '.rst'), 'w', encoding='utf-8')
 
 
     # Warn contributors not to edit this file directly
     # Warn contributors not to edit this file directly
+    f.write(":github_url: hide\n\n")
     f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n")
     f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n")
     f.write(".. DO NOT EDIT THIS FILE, but the " + class_name + ".xml source instead.\n")
     f.write(".. DO NOT EDIT THIS FILE, but the " + class_name + ".xml source instead.\n")
     f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n")
     f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n")