Skip to content
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

migrated the website to Docusaurus #386

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CircuitVerse-Documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions CircuitVerse-Documentation/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site live at : https://circuitverse-docs.netlify.app/
70 changes: 70 additions & 0 deletions CircuitVerse-Documentation/add_front_matter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import os
import re

# Define the root directory for the docs folder
root_dir = "./docs"

# Template for front matter
front_matter_template = """---
id: {id}
title: "{title}"
description: "{description}"
---
"""

# Function to clean up the file name (remove leading numbers and hyphens)
def clean_file_name(file_name):
base_name = os.path.splitext(file_name)[0]
cleaned_name = re.sub(r"^\d+", "", base_name) # Remove leading numbers
cleaned_name = cleaned_name.lstrip("-").replace("-", " ") # Remove leading hyphens and replace hyphens with spaces
return cleaned_name.capitalize(), cleaned_name

# Function to generate front matter for a file
def generate_front_matter(file_name, folder_name):
title, id_name = clean_file_name(file_name)
unique_id = f"{folder_name}-{id_name}" # Prefix folder name to ensure uniqueness
description = f"{title} page in {folder_name.replace('-', ' ').capitalize()} of CircuitVerse documentation."
return front_matter_template.format(id=unique_id, title=title, description=description)

# Function to overwrite front matter in a file
def overwrite_front_matter_in_file(file_path, folder_name):
print(f"Processing file: {file_path}") # Debug: Log the file being processed
try:
with open(file_path, "r") as file:
content = file.read()

# Extract the content after existing front matter
if content.strip().startswith("---"):
# Find the closing `---` of the existing front matter
content_after_front_matter = content.split("---", 2)[2].strip()
else:
content_after_front_matter = content.strip()

# Generate new front matter
file_name = os.path.basename(file_path)
front_matter = generate_front_matter(file_name, folder_name)
new_content = front_matter + "\n\n" + content_after_front_matter

print(f"Generated new front matter: \n{front_matter}") # Debug: Show new front matter

# Write the updated content back to the file
with open(file_path, "w") as file:
file.write(new_content)
print(f"Updated front matter for: {file_path}") # Debug: Confirm success
except Exception as e:
print(f"Error processing file {file_path}: {e}")

# Walk through all .mdx files in the directory and subdirectories
def process_all_mdx_files(root_directory):
for subdir, _, files in os.walk(root_directory):
folder_name = os.path.basename(subdir) # Get the folder name (e.g., chapter1)
for file in files:
if file.endswith(".mdx"):
file_path = os.path.join(subdir, file)
overwrite_front_matter_in_file(file_path, folder_name)

if __name__ == "__main__":
print(f"Starting front matter overwrite for all .mdx files in {root_dir}...\n")
process_all_mdx_files(root_dir)
print("\nFront matter overwrite complete!")

54 changes: 54 additions & 0 deletions CircuitVerse-Documentation/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"appId": "DM4KWCC17E",
"apiKey": "8d998bfb5e12b330595f6e4c8a6368d8",
"rateLimit": 8,
"maxDepth": 10,
"startUrls": ["https://circuitverse-docs.netlify.app/"],
"sitemaps": ["https://circuitverse-docs.netlify.app/sitemap.xml"],
"ignoreCanonicalTo": true,
"discoveryPatterns": ["https://circuitverse-docs.netlify.app/**"],
"actions": [
{
"indexName": "circuitverse-netlify",
"pathsToMatch": ["https://circuitverse-docs.netlify.app/**"],
"recordExtractor": {
"type": "function",
"function": "({ $, helpers }) => { const lvl0 = $('.menu__link.menu__link--sublist.menu__link--active, .navbar__item.navbar__link--active').last().text() || 'Documentation'; return helpers.docsearch({ recordProps: { lvl0: { selectors: '', defaultValue: lvl0 }, lvl1: ['header h1', 'article h1'], lvl2: 'article h2', lvl3: 'article h3', lvl4: 'article h4', lvl5: 'article h5, article td:first-child', lvl6: 'article h6', content: 'article p, article li, article td:last-child' }, indexHeadings: true, aggregateContent: true, recordVersion: 'v3' }); }"
}
}
],
"initialIndexSettings": {
"circuitverse-docs": {
"attributesForFaceting": ["type", "lang", "language", "version", "docusaurus_tag"],
"attributesToRetrieve": ["hierarchy", "content", "anchor", "url", "url_without_anchor", "type"],
"attributesToHighlight": ["hierarchy", "content"],
"attributesToSnippet": ["content:10"],
"camelCaseAttributes": ["hierarchy", "content"],
"searchableAttributes": [
"unordered(hierarchy.lvl0)",
"unordered(hierarchy.lvl1)",
"unordered(hierarchy.lvl2)",
"unordered(hierarchy.lvl3)",
"unordered(hierarchy.lvl4)",
"unordered(hierarchy.lvl5)",
"unordered(hierarchy.lvl6)",
"content"
],
"distinct": true,
"attributeForDistinct": "url",
"customRanking": ["desc(weight.pageRank)", "desc(weight.level)", "asc(weight.position)"],
"ranking": ["words", "filters", "typo", "attribute", "proximity", "exact", "custom"],
"highlightPreTag": "<span class=\"algolia-docsearch-suggestion--highlight\">",
"highlightPostTag": "</span>",
"minWordSizefor1Typo": 3,
"minWordSizefor2Typos": 7,
"allowTyposOnNumericTokens": false,
"minProximity": 1,
"ignorePlurals": true,
"advancedSyntax": true,
"attributeCriteriaComputedByMinProximity": true,
"removeWordsIfNoResults": "allOptional",
"separatorsToIndex": "_"
}
}
}
67 changes: 67 additions & 0 deletions CircuitVerse-Documentation/docs/chapter1/1introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
id: chapter1-introduction
title: "Introduction"
description: "Introduction page in Chapter1 of CircuitVerse documentation."
slug : /
---

# Introduction

<iframe
width="100%"
height="330px"
src="https://circuitverse.org/simulator/embed/701"
id="projectPreview"
scrolling="no"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
>
{" "}
</iframe>

Inspired by Logisism, CircuitVerse is an open-source educational tool for designing and visualizing digital logic circuit simulations in the cloud. Users including educators, students, electronic engineers, and hobbyists can play with digital circuit simulations from their browsers for exploring different “what-if” scenarios. As required, a user can share their creations using unique circuit URLs, or fork different contributions of the CircuitVerse community to yield their curiosity. Figure 1 shares a screenshot of a ripple carry adder simulation built using CircuitVerse.

![](/img/img_chapter1/1.1.png)

<div align="center">
<em>Figure 1.1: Ripple Carry Adder simulation built using CircuitVerse</em>
</div>

Developed for educators by educators, the CircuitVerse platform delivers high class learning experience in a scalable way. Educators can manage, track, and achieve their classroom learning goals in a single, powerful solution. They can create and manage different student groups, post different assignments, define submission deadlines and add or export grades (refer Figure 2). Using the CircuitVerse Chrome extension, educators can embed live circuits in their Google Slides and demonstrate concepts without navigating across different tabs. Alternatively, they can also export images or embed iFrames within their webpages.

![](/img/img_chapter1/1.2.png)

<div align="center">
<em>
Figure 1.2: Educators can manage, track, and achieve their classroom
learning goals using CircuitVerse platform
</em>
</div>

As the CircuitVerse community grows, educators and students can join the online forums to share ideas, questions, and resources related to teaching and learning digital logic design using CircuitVerse.

![](/img/img_chapter1/1.3.png)

<div align="center">
<em>
Figure 1.3: Connect and collaborate on CircuitVerse Forum for sharing ideas,
questions, and resources related to teaching and learning digital logic
design
</em>
</div>

Watch the below video for a quick demonstration of the CircuitVerse platform.

<div>
<iframe
width="500px"
height="400px"
src="https://www.youtube.com/embed/3Df-2Cn_80A"
frameborder="0"
scrolling="no"
webkitAllowFullScreen
mozAllowFullScreen
allowFullScreen
></iframe>
</div>
33 changes: 33 additions & 0 deletions CircuitVerse-Documentation/docs/chapter1/2keyfeatures.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
id: chapter1-keyfeatures
title: "Keyfeatures"
description: "Keyfeatures page in Chapter1 of CircuitVerse documentation."
---

# Key Features

This section shares key features of the CircuitVerse simulator.

![](/img/img_chapter1/1.4.png)

<div align="center">
<em>Figure 1.4: Some of the key features of the CircuitVerse simulator</em>
</div>

1. **Build and simulate your circuits in the cloud**: Create and run your simulations in your browser without the hassle of software installation or operating system dependent instructions. Since the process of circuit creation and simulation is seamless, users can edit and troubleshoot their circuit design or apply changes while the simulation is running. Users can save and open their circuits online (against the user’s dashboard) or offline (locally on their machine).

2. **Transform your ideas using a powerful, intuitive and interactive schematic editor**:

- **Design using an easy-to-use interactive schematic editor**: As users drag and drop circuit elements on the canvas, horizontal and vertical wires can be drawn to complete the circuit connections. The wires are color coded to test and analyze the circuit simulations with ease.
- **Customize input attributes of circuit components**: CircuitVerse includes a vast library of circuit elements that range from basic gates to register transfer level design, and from basic input/output to system level components. Most of the CircuitVerse components include customizable attributes for building complex designs within the simulator.
- **Design supports multibit wires (buses)**: Every input and output circuit element has a bit width associated with it. Most of the CircuitVerse components include attributes allowing you to customize the bit widths of their inputs and outputs. CircuitVerse supports multibit wires across two components demanding multi bit widths. As needed, splitters can also be used to direct bits in different directions.

3. **Insert subcircuit**: Hierarchical circuits can be created by nesting and reusing smaller circuits in larger circuits (something like this). No need to mention verilog here.

4. **Export images in multiple formats**: High-resolution CircuitVerse images can be exported in multiple formats for different views and background options.

5. **Visualize circuit simulations using timing diagram**: Timing diagrams can be used to analyze and debug the behavior of circuits for different input sequences. debug logical mistakes and race conditions. Timing diagrams can be paired with the Flag circuit element to explain different concepts such as propagation delay, stable state and race conditions.

6. **Embed simulations across webpages and presentations**: Since the CircuitVerse webpages are structured using HTML5, an iframe can be generated for embedding each CircuitVerse simulation within web pages. Alternatively, users can download the CircuitVerse Chrome extension for embedding live CircuitVerse circuits within a Google Slides presentation.

7. **Connect and collaborate over CircuitVerse**: Users can also share their unique circuit URLs and seek help from the CircuitVerse online forums. If needed, they can also collaborate over their creations or fork an existing user contribution for meaningful learning.
13 changes: 13 additions & 0 deletions CircuitVerse-Documentation/docs/chapter1/3systemrequirments.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
id: chapter1-systemrequirments
title: "Systemrequirments"
description: "Systemrequirments page in Chapter1 of CircuitVerse documentation."
---

# System Requirements

In order to access CircuitVerse simulations on a Mac or a PC, you will need a broadband internet connection and a compatible web browser. CircuitVerse officially supports Google Chrome and Mozilla Firefox. While users have been able to successfully run the simulator on Apple Safari, we are unable to officially support this browser at this time.

> NOTE: Since CircuitVerse is built in HTML5, browsers do not require Flash Player or JavaScript to load the CircuitVerse simulator.

Additionally, CircuitVerse does not support touch screen devices or mobile browsers for any device.
76 changes: 76 additions & 0 deletions CircuitVerse-Documentation/docs/chapter2/1gettingstarted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
id: chapter2-gettingstarted
title: "Getting Started"
description: "Getting Started page in Chapter 2 of CircuitVerse documentation."
---

# Getting Started with CircuitVerse User Account

While a user can browse through the CircuitVerse contributions and build circuit simulations without creating a CircuitVerse user account, having a CircuitVerse user account empowers a user to do different tasks including:

1. Use dashboard to save and manage circuit simulation files
2. Fork a live circuit contribution to explore and build upon the work of other users
3. Share circuit simulation project files using unique URLs
4. Collaborate with different user groups for different group projects
5. Embed interactive circuits using iframe within web pages and Google Slides

## Create CircuitVerse User Account

CircuitVerse platform supports Google, Facebook, and GitHub sign-in secure authentication systems to reduce the burden of login for the users. Users can get started by signing in with their Google, Facebook, or GitHub Account, or creating a user account using their preferred email address.

<div>
<iframe>insert video for user account login</iframe>
</div>

## Login to CircuitVerse User Account

After successfully logging in to the CircuitVerse platform, a user receives different options to manage their circuit simulation projects within CircuitVerse (refer Figure 2.1). Table 2.1 provides a brief description of the available options.

![drawing](/img/img_chapter2/2.1.png)

<div align="center">
<em>
Figure 2.1: Different options for managing circuit simulation projects
within CircuitVerse
</em>
</div>

**Table 2.1: Description of the CV login drop-down menu**

<table>
<tr>
<td>
<strong>Name</strong>
</td>
<td>
<strong>Description</strong>
</td>
</tr>
<tr>
<td>Dashboard</td>
<td>
<p>Some of the key functions include:</p>
<ul>
<li>
Organizes, stores, and provides a holistic view of all circuit
simulations associated with the user account
</li>
<li>Displays different settings for managing the user profile</li>
</ul>
</td>
</tr>
<tr>
<td>My Groups</td>
<td>
<p>Some of the key functions include:</p>
<ul>
<li>Add members across different groups</li>
<li>Add assignments for group collaboration</li>
<li>
Provides a holistic view of all user groups associated with the user
account
</li>
</ul>
</td>
</tr>
</table>
Loading