-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating Nuclia Widget #792
Draft
justdaksh
wants to merge
102
commits into
nuclia
Choose a base branch
from
nuclia_widget
base: nuclia
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+905
−1,355
Draft
Changes from 2 commits
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
99a154c
Integrating Nuclia Widget
justdaksh 520b294
removing redundant searchtester script
justdaksh b4533ea
Merged with main
justdaksh 26ba768
Merged with main
justdaksh e752db2
Revert "Merged with main"
justdaksh 2f72d6b
Merging with main
justdaksh 642e5e0
Resolved conflicts of widget with nuclia
justdaksh a6aca93
Updated nuclia_sync.yml
justdaksh aa591bf
Updated Environment varibles
justdaksh ae4d412
Merge branch 'nuclia_widget' of https://github.com/plone/training int…
justdaksh c20299a
Updating env varibale to upload job
justdaksh 00dda20
Functioning breadcrumbs,Debugging CI
justdaksh cdb9d41
Removed breadmaker.py && heading_to_breadcrumb_mapping.json
justdaksh 95037a4
Updated nuclia workflow
justdaksh 69e1658
Nuclia Sync: Updated docs
invalid-email-address adf5cbd
remove print statements
justdaksh 8262dda
Merge branch 'nuclia_widget' of https://github.com/plone/training int…
justdaksh 09683d9
Rerunning jobs for debugging
justdaksh dfc5dfe
Updating Commit Changes Run
justdaksh 38cd562
Nuclia Sync: Updated docs
invalid-email-address 930ebfe
Reverting to using JSON for breadcrumbs insted of metadata
justdaksh 323e5de
Merge branch 'nuclia_widget' of https://github.com/plone/training int…
justdaksh dd68adf
Nuclia Sync: Updated docs
invalid-email-address c0d8c37
Updated searchhtml
justdaksh 0572655
Merge branch 'nuclia_widget' of https://github.com/plone/training int…
justdaksh 7d30969
Nuclia Sync: Updated docs
invalid-email-address 4e53835
Using metadata,style changes
justdaksh adb5743
Updating workflow
justdaksh b5c5647
Added field parameter to upload script
justdaksh 28b2a20
Style Changes on results
justdaksh 6dc5fdc
title font-size change
justdaksh 5823c65
Merge branch 'main' into nuclia_widget
justdaksh 731c4d9
Merge branch 'refs/heads/main' into nuclia_widget
stevepiercy 1257b91
Merge remote-tracking branch 'origin/nuclia_widget' into nuclia_widget
stevepiercy 3373a37
Merge branch 'nuclia' into nuclia_widget
stevepiercy 3f214f7
refactor: volto customization for JS beginners
nileshgulia1 f044b3a
remove some chapters,fix grammer
nileshgulia1 9fb4a52
fix weather block
nileshgulia1 9adc25f
simplified installation docs
nileshgulia1 7811dfb
fix prerequisites
nileshgulia1 4d8b8aa
fix blank line
nileshgulia1 b82654d
fix code block
nileshgulia1 0a78266
initial commit
iRohitSingh e11dd6c
Merge branch 'main' into rafactor-volto-customization
claudiaifrim cca0c31
use correct command for pnpm workspaces
nileshgulia1 482f91a
amend more worspace hints
nileshgulia1 d91612d
pin matching Plone and Volto versions correctly
nileshgulia1 93bffda
Merge branch 'main' into rafactor-volto-customization
nileshgulia1 d9c8dcd
Apply suggestions from code review
nileshgulia1 6e843e8
refactor: apply leftover suggestions
nileshgulia1 a650478
replace occurances of <a> in links by md
nileshgulia1 722b66a
Merge branch 'main' into nuclia_widget
stevepiercy 0893762
Merge branch 'nuclia' into nuclia_widget
stevepiercy fb1ec8a
Merge branch 'nuclia' into nuclia_widget
stevepiercy fefecda
fix search page
ebrehault daa573a
Move search results inside the searchtext block, and wrap with a styl…
stevepiercy 85de850
Don't recreate the virtual environment, just delete it
stevepiercy dd1d1bd
Update Makefile
stevepiercy a0fad25
Merge pull request #865 from plone/make-use-sphinx-build-target
stevepiercy 1f2a61d
Merge branch 'main' into rafactor-volto-customization
nileshgulia1 a1fa751
some improvements in content
iRohitSingh 61f3100
fix all the things pointed by steve
iRohitSingh e050e90
fix: apply suggestions from @stevepiercy
nileshgulia1 19685d8
Merge pull request #860 from plone/rafactor-volto-customization
nileshgulia1 70f172b
update extending vlt training
danalvrz b566968
Merge branch 'main' into vlt-training
danalvrz 814ef3c
Merge branch 'main' into vlt-training
danalvrz b3f800c
Promote current trainings, use dash for directory
stevepiercy d895014
Fix errors with `numbered` option in `toctree` directive
stevepiercy 6c5c279
Fix errors with `numbered` option in `toctree` directive
stevepiercy 8250d6a
Populate meta information for teaching section, in hopes that the oth…
stevepiercy 89c2df3
what_vagrant_does.md is an orphan (not included in a toctree). We don…
stevepiercy 1f9dc3e
Fix broken references
stevepiercy bc7799f
Exclude files that are not included in a toctree, and are not referen…
stevepiercy 7e4f768
Clean up MyST syntax for toctree
stevepiercy d2f6442
Use proper lexer and syntax for selected lexer, wherever possible. JS…
stevepiercy 92c7c09
Document how to override build configuration options
stevepiercy bdcd5de
Merge pull request #871 from plone/tidy-up-training
stevepiercy 56f6e93
Fix RTD pull request previews
stevepiercy ee4564a
Include .github/workflows/rtd-pr-preview.yml as "docs"
stevepiercy 541386e
Merge pull request #874 from plone/fix-rtd-build-2
stevepiercy c03a2be
Fix spelling of Node.js
stevepiercy 4031b4d
Merge pull request #875 from plone/test-rtd-pr-build
stevepiercy ad51a2d
We r bad spelrz
stevepiercy f8baaa5
whoops, wrong project-slug
stevepiercy 78776f9
Merge pull request #876 from plone/rtd-pr-test-2
stevepiercy 3b1f032
It's a good thing that there are so many misspellings of Node.js to c…
stevepiercy 58755ad
Clearly I cant type
stevepiercy f4699a8
Merge pull request #877 from plone/rtd-pr-test-3
stevepiercy ff18b56
At this rate Node.js will be spelled correctly throughout the trainin…
stevepiercy 1f7bc9e
Merge pull request #878 from plone/rtd-pr-test-4
stevepiercy 9e48d47
Remove lesscpy from requirements.txt
stevepiercy 1c348e6
Merge pull request #879 from plone/update-reqs
stevepiercy fcffb53
Use no-tracking url of youtube
ksuess 68fd2cf
Merge pull request #882 from plone/privacy-youtube
stevepiercy f8e6d50
Merge branch 'main' into nuclia_widget
stevepiercy 6c11bbc
Change from secret to repo env.
stevepiercy 76aa8e3
Try another var
stevepiercy f6f0fda
This should do it, copied from build_deploy_staging.yml
stevepiercy c0e95e9
fix SDK call for deletion
ebrehault b89c046
typo
ebrehault 7346523
- Bump actions versions
stevepiercy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Nuclia Sync | ||
|
||
on: [push] | ||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install requirements | ||
run: | | ||
pip install -q -r requirements-initial.txt | ||
pip install -q -r requirements.txt | ||
|
||
- name: Run Nuclia Sync | ||
run: | | ||
python3 upload.py | ||
|
||
- name: Run Breadcrumb Json maker | ||
run: | | ||
python3 breadmaker.py | ||
|
||
- name: Commit changes | ||
run: | | ||
git config --global user.name github-actions | ||
git config --global user.email [email protected] | ||
git add . | ||
git commit -m "Nuclia Sync: Updated docs" | ||
git push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import json | ||
import os | ||
from upload import extract_first_heading, PUBLIC_URL | ||
|
||
# Load nuclia_sync.json | ||
try: | ||
with open("./docs/_static/nuclia_sync.json", "r") as sync_info: | ||
nuclia_sync_data = json.load(sync_info) | ||
except FileNotFoundError: | ||
print("Error: nuclia_sync.json not found.") | ||
except json.JSONDecodeError as e: | ||
print(f"Error decoding JSON: {e}") | ||
|
||
|
||
def normalize_path(path): | ||
return path.replace('.md', '').replace('./docs', '').lstrip('/') | ||
|
||
|
||
def create_url(origin_url, url_path): | ||
return f"{origin_url.rstrip('/')}/{url_path}" | ||
|
||
|
||
def generate_breadcrumb_for_path(path): | ||
breadcrumb = {} | ||
temp_path = "./" | ||
path_items = path.split('/')[1:] | ||
|
||
for path_item in path_items: | ||
temp_path = os.path.join(temp_path, path_item) | ||
if temp_path.endswith(".md"): | ||
heading = extract_first_heading(temp_path) | ||
breadcrumb[heading] = create_url( | ||
PUBLIC_URL, normalize_path(temp_path)) | ||
else: | ||
index_md_path = os.path.join(temp_path, "index.md") | ||
if os.path.exists(index_md_path): | ||
heading = extract_first_heading(index_md_path) | ||
breadcrumb[heading] = create_url( | ||
PUBLIC_URL, normalize_path(temp_path)) | ||
temp_path = os.path.join(temp_path, "") | ||
return breadcrumb | ||
|
||
|
||
result = {"heading_to_breadcrumb": {}} | ||
for md_path in nuclia_sync_data["docs"]: | ||
heading = extract_first_heading(md_path) | ||
breadcrumb = generate_breadcrumb_for_path(md_path) | ||
result["heading_to_breadcrumb"][heading] = breadcrumb | ||
|
||
|
||
try: | ||
with open("./docs/_static/heading_to_breadcrumb_mapping.json", "w") as mapping_file: # noqa | ||
json.dump(result, mapping_file, indent=4) | ||
print("Data written to heading_to_breadcrumb_mapping.json.") | ||
except Exception as e: | ||
print(f"Error writing JSON: {e}") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So everytime there is a commit on main, we run the job, which makes a commit on main.
It looks like an infinite loop :)
Maybe the job should have a condition like if the last changes are only about our 2 generated json files, we stop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ebrehault I have put the check for
nuclia_sync.json
only. This should work, right?