Skip to content

Commit c1ccc12

Browse files
committed
[docs] Mass migration to mdbook
1 parent 9b1db9d commit c1ccc12

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+481
-222
lines changed

.github/workflows/mdbook.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish mdbook to GitHub Pages
2+
3+
on:
4+
push:
5+
paths: ["docs/**"]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-20.04
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Setup mdBook
19+
uses: peaceiris/actions-mdbook@v1
20+
with:
21+
mdbook-version: "latest"
22+
23+
- run: |
24+
cd docs
25+
mdbook build
26+
27+
- name: Deploy
28+
uses: peaceiris/actions-gh-pages@v3
29+
if: ${{ github.ref == 'refs/heads/main' }}
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./docs/book

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ __pycache__/
66
pkgs/*
77
!pkgs/stdlib
88

9+
# Hide mdbook build
10+
docs/book/
11+
912
# Everything pip related
1013
dist/
1114
build/

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xpp.iipython.dev

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
<img src = "./assets/xpp.png" alt = "x++ logo" id = "logo">
33
<hr>
44
<p>an interpreted, minimalistic programming language</p>
5-
<img alt="License" src="https://img.shields.io/github/license/iiPythonx/xpp?color=c3e7ff&style=flat-square">
6-
<img alt="Downloads" src="https://img.shields.io/github/downloads/iiPythonx/xpp/total.svg?color=c3e7ff&style=flat-square">
7-
<img alt="Last commit" src="https://img.shields.io/github/last-commit/iiPythonx/xpp?color=c3e7ff&style=flat-square">
8-
<img alt="Repo size" src="https://img.shields.io/github/repo-size/iiPythonx/xpp?color=c3e7ff&style=flat-square">
9-
<img alt="Stars" src="https://img.shields.io/github/stars/iiPythonx/xpp?color=c3e7ff&style=flat-square">
5+
<img alt = "License" src = "https://img.shields.io/github/license/iiPythonx/xpp?color=c3e7ff&style=flat-square">
6+
<img alt = "Downloads" src = "https://img.shields.io/github/downloads/iiPythonx/xpp/total.svg?color=c3e7ff&style=flat-square">
7+
<img alt = "Last commit" src = "https://img.shields.io/github/last-commit/iiPythonx/xpp?color=c3e7ff&style=flat-square">
8+
<img alt = "Repo size" src = "https://img.shields.io/github/repo-size/iiPythonx/xpp?color=c3e7ff&style=flat-square">
9+
<img alt = "Stars" src = "https://img.shields.io/github/stars/iiPythonx/xpp?color=c3e7ff&style=flat-square">
1010
<hr>
1111
</div>
1212

@@ -34,10 +34,10 @@ Welcome to the official documentation for x++! This documentation will get you s
3434
- [Credits and Links ▾](#credits--links)
3535
- [Contributors](#contributors)
3636
- [Resources](#resources)
37-
- [Tutorials](./docs/tutorials.md)
38-
- [Documents](./docs/documents.md)
39-
- [Python API](./docs/pythonAPI.md)
40-
- [Standard Library](./docs/standardLibrary.md)
37+
- [Tutorials](https://xpp.iipython.dev/tutorials.html)
38+
- [Documents](https://xpp.iipython.dev/documents.html)
39+
- [Python API](https://xpp.iipython.dev/python-api.html)
40+
- [Standard Library](https://xpp.iipython.dev/stdlib.html)
4141

4242
<!-- ---- About ---- -->
4343
<h2 align = "center" id = "about">
@@ -77,6 +77,13 @@ Next, visit our [github repository](https://github.com/iiPythonx/xpp/) and downl
7777
git clone https://github.com/iiPythonx/xpp
7878
```
7979

80+
To install xpp system-wide, run the following:
81+
```
82+
pip install .
83+
```
84+
85+
You will now have the `xpp` command available for use.
86+
8087
If you are choosing Visual Studio Code as your Integrated Development Environment, you can also install the [x++ extension](https://marketplace.visualstudio.com/items?itemName=iiPython.xpp) on the marketplace to get syntax highlighting on your x++ files.
8188

8289
### Step 2: Set-Up
@@ -98,22 +105,22 @@ You can edit the main entry file by editing the configuration in `.xconfig`. It
98105
}
99106
```
100107

101-
> You can learn more about setting up your project in the [tutorials](./docs/tutorials.md).
108+
> You can learn more about setting up your project in the [tutorials](https://xpp.iipython.dev/tutorials.html).
102109
103110
### Step 3: Execution
104111

105112
After you are done writing your x++ code, you can execute your x++ project immediately by opening up a terminal and typing:
106113

107114
```
108-
python main.py .
115+
xpp .
109116
```
110117

111118
Currently, you should see the terminal output:
112119

113120
```
114121
"Hello, world!"
115122
```
116-
> You can also compile your xpp code into Python using [caffeine](./docs/caffeine.md).
123+
> You can also compile your xpp code into Python using [caffeine](https://xpp.iipython.dev/caffeine.html).
117124
118125
<!-- ---- FAQ ---- -->
119126
<h2 align = "center">
@@ -127,7 +134,7 @@ Starting on March 6th, 2023, x2 was deprecated in favor of x++ as the language w
127134

128135
### Q: Can I use x++ for data management, game design, or simply for fun?
129136

130-
Most of the things you could think of making are able to be created within x++. However, you can also supercharge xpp with the power of Python; [see here](./docs/pythonAPI.md).
137+
Most of the things you could think of making are able to be created within x++. However, you can also supercharge xpp with the power of Python; [see here](https://xpp.iipython.dev/python-api.html).
131138

132139
<!-- ---- Contrib + resources ---- -->
133140
<h2 align = "center">
@@ -146,6 +153,6 @@ Most of the things you could think of making are able to be created within x++.
146153

147154
---
148155

149-
Last Updated: December 2nd, 2023 by iiPython
156+
Last Updated: March 9th, 2024 by iiPython
150157

151158
[↑ Go To Top](#introduction)

docs/README.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<div align = "center">
2+
<h1>xpp</h1>
3+
<hr>
4+
<p>an interpreted, minimalistic programming language</p>
5+
<img alt="License" src="https://img.shields.io/github/license/iiPythonx/xpp?color=c3e7ff&style=flat-square">
6+
<img alt="Downloads" src="https://img.shields.io/github/downloads/iiPythonx/xpp/total.svg?color=c3e7ff&style=flat-square">
7+
<img alt="Last commit" src="https://img.shields.io/github/last-commit/iiPythonx/xpp?color=c3e7ff&style=flat-square">
8+
<img alt="Repo size" src="https://img.shields.io/github/repo-size/iiPythonx/xpp?color=c3e7ff&style=flat-square">
9+
<img alt="Stars" src="https://img.shields.io/github/stars/iiPythonx/xpp?color=c3e7ff&style=flat-square">
10+
<hr>
11+
</div>
12+
13+
<!-- ---- Introduction ---- -->
14+
<h2 align = "center" id = "introduction">
15+
Introduction
16+
</h2>
17+
18+
Welcome to the official documentation for x++! This documentation will get you started in the development of your first x++ project or will help you learn more about x++ in general with in-depth explanations and tutorials.
19+
20+
<!-- ---- TOC ---- -->
21+
<h2 align = "center" id = "table-of-contents">
22+
Table of Contents
23+
</h2>
24+
25+
- **Home ▾**
26+
- [Introduction](#introduction)
27+
- [ToC](#table-of-contents)
28+
- [About](#about)
29+
- [Getting Started ▾](#getting-started)
30+
- [Step 1: Installation](#step-1-installation)
31+
- [Step 2: Set-Up](#step-2-set-up)
32+
- [Step 3: Execution](#step-3-execution)
33+
- [Frequently Asked Questions](#frequently-asked-questions)
34+
- [Credits and Links ▾](#credits--links)
35+
- [Contributors](#contributors)
36+
- [Resources](#resources)
37+
- [Tutorials](tutorials.md)
38+
- [Documents](documents.md)
39+
- [Python API](python-api.md)
40+
- [Standard Library](stdlib.md)
41+
42+
<!-- ---- About ---- -->
43+
<h2 align = "center" id = "about">
44+
About
45+
</h2>
46+
47+
x++ (Pronounced "ex-plus-plus") is a high-level, interpreted language written in Python by [iiPython](https://github.com/iiPythonx) with low-level syntax, similar to that of [x86 Assembly](https://en.wikipedia.org/wiki/X86_assembly_language) (and additionally inspired by [Batch](https://en.wikipedia.org/wiki/Batch_file)).
48+
49+
x++ contains features such as:
50+
- Automatic garbage collection
51+
- Scoped/file/global variables
52+
- Sectioning/function system
53+
- Mature python integration
54+
- Import/export/module system
55+
- Object-oriented programming through the use of files
56+
- ... much more!
57+
58+
<!-- ---- Getting started ---- -->
59+
<h2 align = "center" id = "getting-started">
60+
Getting Started
61+
</h2>
62+
63+
### Step 1: Installation
64+
65+
First and foremost, make sure you have [Python](https://python.org/downloads/) (Python 3.10 is required, however we recommend 3.11+) installed on your device. You can check if you have Python installed by opening up a terminal and typing:
66+
67+
```
68+
python3 -V
69+
```
70+
(on NT* platforms, replace `python3` with `py`)
71+
72+
It is highly recommended to have a text editor or Integrated Development Environment, such as [Visual Studio Code](https://code.visualstudio.com/), as its built-in development tools and add-ons will speed up and facilitate your development process. However, a simple text editor like notepad is sufficient.
73+
74+
Next, visit our [github repository](https://github.com/iiPythonx/xpp/) and download a clone of the repository by clicking on the green `Code ▾` button and the `Download ZIP` option. Optionally, if you have [git](https://git-scm.com/) installed on your device, you can also clone the repository by opening up a terminal and typing:
75+
76+
```
77+
git clone https://github.com/iiPythonx/xpp
78+
```
79+
80+
To install xpp system-wide, run the following:
81+
```
82+
pip install .
83+
```
84+
85+
You will now have the `xpp` command available for use.
86+
87+
If you are choosing Visual Studio Code as your Integrated Development Environment, you can also install the [x++ extension](https://marketplace.visualstudio.com/items?itemName=iiPython.xpp) on the marketplace to get syntax highlighting on your x++ files.
88+
89+
### Step 2: Set-Up
90+
91+
Once you open up your x++ project, you should be able to find a file named `main.xpp`. By default, this is your main entry file and is where you will be writing your x++ code. Within the file, you should see an example program similar to:
92+
93+
```xpp
94+
:: Main
95+
prt "Hello, world!"
96+
```
97+
98+
Any x++ files should always end in the `.xpp` extension.
99+
100+
You can edit the main entry file by editing the configuration in `.xconfig`. It is a JSON-like file that contains all the configurations for your x++ project. Within it, you should see:
101+
102+
```xconfig
103+
{
104+
"main": "main.xpp"
105+
}
106+
```
107+
108+
> You can learn more about setting up your project in the [tutorials](tutorials.md).
109+
110+
### Step 3: Execution
111+
112+
After you are done writing your x++ code, you can execute your x++ project immediately by opening up a terminal and typing:
113+
114+
```
115+
python main.py .
116+
```
117+
118+
Currently, you should see the terminal output:
119+
120+
```
121+
"Hello, world!"
122+
```
123+
> You can also compile your xpp code into Python using [caffeine](caffeine.md).
124+
125+
<!-- ---- FAQ ---- -->
126+
<h2 align = "center">
127+
Frequently Asked Questions
128+
</h2>
129+
130+
### Q: Why is it called x++?
131+
132+
The language originally started as the "X Programming Language" because the name sounded cool. As development went on, a second revision was published and the name was changed to `x2`.
133+
Starting on March 6th, 2023, x2 was deprecated in favor of x++ as the language was beginning to undergo major changes.
134+
135+
### Q: Can I use x++ for data management, game design, or simply for fun?
136+
137+
Most of the things you could think of making are able to be created within x++. However, you can also supercharge xpp with the power of Python; [see here](python-api.md).
138+
139+
<!-- ---- Contrib + resources ---- -->
140+
<h2 align = "center">
141+
Credits & Links
142+
</h2>
143+
144+
### Contributors
145+
146+
- [iiPython](https://github.com/iiPythonx) - Developer, Documentation
147+
- [DmmD Gaming](https://github.com/DmmDGM) - Original Documentation, Ideas, & Standard Library
148+
149+
### Resources
150+
151+
- [Github Repository](https://github.com/iiPythonx/xpp)
152+
- [Visual Studio Code x++ Extension](https://marketplace.visualstudio.com/items?itemName=iiPython.xplusplus)
153+
154+
---
155+
156+
Last Updated: December 2nd, 2023 by iiPython
157+
158+
[↑ Go To Top](#introduction)

docs/SUMMARY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Summary
2+
3+
[Introduction](README.md)
4+
5+
# Reference Guide
6+
- [Tutorials](tutorials.md)
7+
- [Hello, world!](tutorials/hello-world.md)
8+
- [User Input](tutorials/user-input.md)
9+
- [Branching](tutorials/branching.md)
10+
- [Calculator](tutorials/calculator.md)
11+
- [Documents](documents.md)
12+
- [Comments](documents/comments.md)
13+
- [Comparators](documents/comparators.md)
14+
- [Configuration](documents/configuration.md)
15+
- [Data Types](documents/datatypes.md)
16+
- [Operators](documents/operators.md)
17+
- [Packages](documents/packages.md)
18+
- [Sections](documents/sections.md)
19+
- [Variables](documents/variables.md)
20+
- [Python API](python-api.md)
21+
- [Caffeine](caffeine.md)
22+
- [Standard Library](stdlib.md)

docs/book.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[book]
2+
title = "x++ Documentation"
3+
description = "An interpreted, minimalistic programming language."
4+
authors = ["iiPython"]
5+
language = "en"
6+
src = "./"
7+
8+
[output.html]
9+
git-repository-url = "https://github.com/iiPythonx/xpp"

docs/caffeine.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# [x++](../README.md) / Caffeine
1+
# [x++](README.md) / Caffeine
22

33
## Table of Contents
44

5-
- [Home](../README.md)
6-
- [Tutorials](./tutorials.md)
7-
- [Documents](./documents.md)
8-
- [Python API](./pythonAPI.md)
5+
- [Home](README.md)
6+
- [Tutorials](tutorials.md)
7+
- [Documents](documents.md)
8+
- [Python API](python-api.md)
99
- **Caffeine ▾**
1010
- [Introduction](#introduction)
11-
- [Standard Library](./standardLibrary.md)
11+
- [Standard Library](stdlib.md)
1212

1313
## Introduction
1414

1515
This document is coming soon.
1616

1717
---
1818

19-
Last Updated: July 5th, 2023 by iiPython
19+
Last Updated: March 9th, 2024 by iiPython
2020

2121
[↑ Go To Top](#x--caffeine)

0 commit comments

Comments
 (0)