Procházet zdrojové kódy

docs: update linkcheck configs

linkcheck CI job can now pass, no longer necessary to ignore the results from it.
Marius Vikhammer před 3 roky
rodič
revize
5aa01cb80e
2 změnil soubory, kde provedl 16 přidání a 2 odebrání
  1. 1 2
      .gitlab/ci/docs.yml
  2. 15 0
      docs/conf_common.py

+ 1 - 2
.gitlab/ci/docs.yml

@@ -228,5 +228,4 @@ check_doc_links:
   script:
     - cd docs
     - pip install -U -r requirements.txt
-    # At the moment this check will always fail due to multiple known limitations, ignore result
-    - build-docs -t $DOCTGT -l $DOCLANG linkcheck || { echo "THERE ARE ISSUES DUE TO KNOWN LIMITATIONS, PLEASE FIX THEM. Nowadays we're ignored them to pass pipeline."; true; }
+    - build-docs -t $DOCTGT -l $DOCLANG linkcheck

+ 15 - 0
docs/conf_common.py

@@ -196,6 +196,21 @@ google_analytics_id = os.environ.get('CI_GOOGLE_ANALYTICS_ID', None)
 
 project_homepage = 'https://github.com/espressif/esp-idf'
 
+linkcheck_anchors = False
+
+linkcheck_exclude_documents = ['index',  # several false positives due to the way we link to different sections
+                               'api-reference/protocols/esp_local_ctrl',  # Fails due to `https://<mdns-hostname>.local`
+                               'api-reference/provisioning/wifi_provisioning',  # Fails due to `https://<mdns-hostname>.local`
+                               ]
+
+
+linkcheck_ignore = ['https://webhome.phy.duke.edu/~rgb/General/dieharder.php',  # Certificate error
+                    'https://dl.espressif.com/dl/esp32s3_rom.elf',  # Not published
+                    'https://docs.espressif.com/projects/esptool/en/latest/esp32c2/espefuse/index.html',  # Not published
+                    'https://www.espressif.com/sites/default/files/documentation/esp32-c2_datasheet_en.pdf',  # Not published
+                    ]
+
+
 # Custom added feature to allow redirecting old URLs
 with open('../page_redirects.txt') as f:
     lines = [re.sub(' +', ' ', line.strip()) for line in f.readlines() if line.strip() != '' and not line.startswith('#')]