forked from gravity-doc/gravity-doc.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from lalalabox/docsify
Docsify
- Loading branch information
Showing
34 changed files
with
2,138 additions
and
2,015 deletions.
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 |
---|---|---|
@@ -1,37 +1,39 @@ | ||
## Gravity Documentation | ||
[上海交通大学天文系Gravity集群文档](https://gravity-doc.github.io) | ||
|
||
This is the documentation for the **Gravity Cluster** of [Department of Astronomy](http://astro.sjtu.edu.cn/en/) at [Shanghai Jiao Tong University (SJTU)](https://www.sjtu.edu.cn/). | ||
|
||
### Welcome to contribute | ||
This doc is hosted on [Github](https://github.com/gravity-doc/gravity-doc.github.io). Feel free to submit a pull request. | ||
|
||
Your name will be honoured in the [contributor list](https://github.com/gravity-doc/gravity-doc.github.io/graphs/contributors) once your contributions are merged. | ||
|
||
**中文内容也欢迎!🥳** | ||
|
||
|
||
### Contact | ||
|
||
You can contact us via | ||
|
||
- [[email protected]](mailto:[email protected]) | ||
- **WeChat group** | ||
|
||
if you need | ||
|
||
1. create an **account** 🙋♂️🙋♀️ | ||
2. change **password** 🔐 | ||
3. **extend time** of your job ⌛ | ||
4. other problems ❔ | ||
|
||
### Acknowledging the Gravity Cluster | ||
|
||
We would appreciate it if all publications that include results generated using **Gravity** cluster include a short statement in the Acknowledgment section. For example: | ||
|
||
若您在论文中使用了Gravity得到的结果,希望您能够在致谢中提到**Gravity**。例如: | ||
|
||
- **本工作的计算使用了上海交通大学天文系Gravity高性能计算集群** | ||
- **This work made use of the Gravity Supercomputer at the Department of Astronomy, Shanghai Jiao Tong University.** | ||
|
||
<img src="./docs/images/logo_DOA_large.png" height = "80" div align=right /> | ||
## Gravity Documentation | ||
|
||
[上海交通大学天文系Gravity集群文档](https://gravity-doc.github.io) | ||
|
||
This is the documentation for the **Gravity Cluster** of [Department of Astronomy](http://astro.sjtu.edu.cn/en/) at [Shanghai Jiao Tong University (SJTU)](https://www.sjtu.edu.cn/). | ||
|
||
### Welcome to contribute | ||
|
||
This doc is hosted on [Github](https://github.com/gravity-doc/gravity-doc.github.io). Feel free to submit a pull request. | ||
|
||
Your name will be honoured in the [contributor list](https://github.com/gravity-doc/gravity-doc.github.io/graphs/contributors) once your contributions are merged. | ||
|
||
**中文内容也欢迎!🥳** | ||
|
||
|
||
### Contact | ||
|
||
You can contact us via | ||
|
||
- [[email protected]](mailto:[email protected]) | ||
- **WeChat group** | ||
|
||
if you need | ||
|
||
1. create an **account** 🙋♂️🙋♀️ | ||
2. change **password** 🔐 | ||
3. **extend time** of your job ⌛ | ||
4. other problems ❔ | ||
|
||
### Acknowledging the Gravity Cluster | ||
|
||
We would appreciate it if all publications that include results generated using **Gravity** cluster include a short statement in the Acknowledgment section. For example: | ||
|
||
若您在论文中使用了Gravity得到的结果,希望您能够在致谢中提到**Gravity**。例如: | ||
|
||
- **本工作的计算使用了上海交通大学天文系Gravity高性能计算集群** | ||
- **This work made use of the Gravity Supercomputer at the Department of Astronomy, Shanghai Jiao Tong University.** | ||
|
||
 |
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
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,69 @@ | ||
#!/bin/bash | ||
################### convert_to_docsify.sh ################### | ||
# This script is used to convert the original markdown files | ||
# to docsify markdown files. | ||
############################################################# | ||
set -e | ||
|
||
# Check if the script is running inside a Git repository | ||
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then | ||
echo "This script must be run inside a Git repository!!!" | ||
exit 1 | ||
fi | ||
|
||
# switch to docsify branch | ||
git checkout docsify | ||
# undo any changes | ||
git checkout . | ||
# pull latest changes | ||
git pull | ||
|
||
source_file="docs/index.md" | ||
target_file="docs/README.md" | ||
|
||
# Check if source file exists | ||
if [ ! -f "$source_file" ]; then | ||
echo "source file $source_file does not exist" | ||
else | ||
# Rename file | ||
mv "$source_file" "$target_file" | ||
fi | ||
|
||
# Function to process markdown files | ||
process_markdown() { | ||
echo "Processing $1" | ||
# Remove part of "--- ... ---" | ||
sed -i '/^---[[:space:]]*$/,/^---[[:space:]]*$/d' "$1" | ||
|
||
# Convert HTML image to markdown image | ||
sed -i 's|<img src="\(.*\)/\([^"/]*\)"[^>]*>||g' "$1" | ||
|
||
# Convert danger, warning, note, and tip blocks | ||
sed -i -E -e '/^```(danger|warning|note|tip)[[:space:]]*$/,/^```[[:space:]]*$/ { | ||
/^```(danger|warning|note|tip)[[:space:]]*$/! { | ||
s/^[>-][[:space:]]*// | ||
s/^[[:digit:]]+\.*// | ||
/^[[:space:]]*$/d | ||
} | ||
s/^```(danger|warning)[[:space:]]*$/!> \*\*Important\*\*⚠️/ | ||
s/^```(note|tip)[[:space:]]*$/?> \*\*Tip\*\*💡/ | ||
s/```[[:space:]]*$// | ||
t | ||
}' "$1" | ||
} | ||
|
||
export -f process_markdown | ||
|
||
# Process markdown files using find and process_markdown function | ||
find . -type f -name "*.md" -exec bash -c 'process_markdown "$0"' {} \; | ||
|
||
# Build Docker image of docsify | ||
if [ -d "docs" ] && [ "$(id -u)" = "0" ]; then | ||
cd docs | ||
docker build -f Dockerfile -t docsify/demo . | ||
docker restart docsify | ||
else | ||
echo "docs directory does not exist or you are not root" | ||
fi | ||
|
||
echo "Done" |
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
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
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
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 |
---|---|---|
@@ -1,6 +1,3 @@ | ||
--- | ||
sort: 2 | ||
--- | ||
|
||
# Advanced | ||
|
||
|
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
Oops, something went wrong.