diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..9488508
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,36 @@
+name: Documentation
+
+on:
+ push:
+ branches: [ main ]
+ tags: ['*']
+ pull_request:
+ branches: [ main ]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
+
+jobs:
+ docs:
+ name: Documentation
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # write to gh-pages
+ statuses: write
+ steps:
+ - uses: actions/checkout@v4
+ - uses: julia-actions/setup-julia@v2
+ with:
+ version: '1' # latest stable Julia 1.x
+ - uses: julia-actions/cache@v1
+ - name: Install dependencies
+ run: |
+ julia --project=docs -e '
+ using Pkg
+ Pkg.develop(PackageSpec(path=pwd()))
+ Pkg.instantiate()'
+ - name: Build and deploy
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: julia --project=docs docs/make.jl
diff --git a/.gitignore b/.gitignore
index fa224e8..df95825 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,7 @@ Manifest.toml
results/
debug/
data/sims/
+docs/build/
+docs/src/index.md
**/.DS_Store
.vscode/
diff --git a/README.md b/README.md
index d40f096..0e3cf49 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,4 @@
-
-
-
-
-
-
-
+
[](https://jmartfrut.github.io/HyperFEM.jl/stable/)
[](https://jmartfrut.github.io/HyperFEM.jl/dev/)
@@ -14,13 +7,8 @@ src="https://github.com/jmartfrut/HyperFEM/blob/main/docs/imgs/logo.png?raw=true
# Multiphysics Simulation of Multifunctional Soft Materials
-
-
**HyperFEM** is a library within the [Gridap](https://github.com/gridap/Gridap.jl) ecosystem designed for the simulation of multiphysics problems involving multifunctional hyperelastic materials. The ultimate goal of HyperFEM is to provide a **high-level, expressive, and rapid prototyping tool** that accelerates the modeling stages of **Thermo–Electro–Magneto–Mechanical** multiphysics problems. To this end, it includes a comprehensive library of **analytically derived constitutive models** formulated through tensor algebra. In addition, HyperFEM provides abstractions for **monolithic and staggered solution schemes**, extending Gridap’s capabilities in the context of **nonlinear solid mechanics**.
-
-
-
## Installation
Open the Julia REPL, type `]` to enter package mode, and install as follows
@@ -141,12 +129,7 @@ x = solve!(comp_model; stepping=(nsteps=5, maxbisec=5), post=post_model)
## HyperFEM Gallery
-
-
-
-
-
+
@@ -160,17 +143,12 @@ C. Perez‐Garcia, R. Ortigosa, J. Martínez‐Frutos, and D. Garcia‐Gonzalez,
along with the required citations for [Gridap](https://github.com/gridap/Gridap.jl).
-# Project funded by:
+## Project funded by
- Grants PID2022-141957OA-C22/PID2022-141957OB-C22 funded by MCIN/AEI/ 10.13039/501100011033 and by ''ERDF A way of making Europe''
+
-
-
-
-
-
-# Contact
+## Contact
-Contact the project administrator [Jesús Martínez-Frutos](jesus.martinez@upct.es) for further questions about licenses and terms of use.
\ No newline at end of file
+Contact the project administrator [Jesús Martínez-Frutos](mailto:jesus.martinez@upct.es) for further questions about licenses and terms of use.
diff --git a/docs/Project.toml b/docs/Project.toml
index 7ebfe31..0f7c6d0 100644
--- a/docs/Project.toml
+++ b/docs/Project.toml
@@ -1,3 +1,3 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
-Mimosa = "ddbf423a-3df4-409e-9685-3dc416cae46c"
+HyperFEM = "ddbf423a-3df4-409e-9685-3dc416cae46c"
diff --git a/docs/imgs/.DS_Store b/docs/imgs/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
Binary files a/docs/imgs/.DS_Store and /dev/null differ
diff --git a/docs/make.jl b/docs/make.jl
index 9d8baf8..a020958 100644
--- a/docs/make.jl
+++ b/docs/make.jl
@@ -1,25 +1,34 @@
-using HyperFEM
using Documenter
+using HyperFEM
-DocMeta.setdocmeta!(HyperFEM, :DocTestSetup, :(using HyperFEM); recursive=true)
+readme_path = joinpath(@__DIR__, "..", "README.md")
+index_path = joinpath(@__DIR__, "src", "index.md")
+cp(readme_path, index_path, force=true)
-makedocs(;
- modules=[HyperFEM],
- authors="MultiSimo_Group",
- repo="https://github.com/jmartfrut/Mimosa.jl/blob/{commit}{path}#{line}",
- sitename="HyperFEM.jl",
- format=Documenter.HTML(;
- prettyurls=get(ENV, "CI", "false") == "true",
- canonical="https://jmartfrut.github.io/HyperFEM.jl",
- edit_link="main",
- assets=String[],
- ),
- pages=[
- "Home" => "index.md",
- ],
+makedocs(
+ sitename = "HyperFEM.jl",
+ modules = [
+ HyperFEM,
+ HyperFEM.TensorAlgebra,
+ HyperFEM.PhysicalModels,
+ HyperFEM.WeakForms,
+ HyperFEM.Solvers,
+ HyperFEM.DiscreteModeling,
+ HyperFEM.ComputationalModels
+ ],
+ pages = [
+ "HyperFEM" => "index.md", # Inject README.md (previously cloned into index.md)
+ "API reference" => "api.md" # Inject the docstrings from the code
+ ],
+ format = Documenter.HTML(
+ prettyurls = get(ENV, "CI", "false") == "true",
+ canonical = "https://MultiSimOLab.github.io/HyperFEM.jl",
+ ),
+ checkdocs = :none,
+ warnonly = true
)
-deploydocs(;
- repo="github.com/jmartfrut/HyperFEM.jl",
- devbranch="main",
+deploydocs(
+ repo = "github.com/MultiSimOLab/HyperFEM.jl.git",
+ devbranch = "main"
)
diff --git a/docs/src/api.md b/docs/src/api.md
new file mode 100644
index 0000000..a41d798
--- /dev/null
+++ b/docs/src/api.md
@@ -0,0 +1,15 @@
+# API reference
+
+```@autodocs
+Modules = [
+ HyperFEM,
+ HyperFEM.TensorAlgebra,
+ HyperFEM.PhysicalModels,
+ HyperFEM.WeakForms,
+ HyperFEM.Solvers,
+ HyperFEM.DiscreteModeling,
+ HyperFEM.ComputationalModels
+]
+Order = [:module, :type, :function, :macro]
+Public = true
+```
\ No newline at end of file
diff --git a/docs/src/index.md b/docs/src/index.md
deleted file mode 100644
index 798c9c6..0000000
--- a/docs/src/index.md
+++ /dev/null
@@ -1,14 +0,0 @@
-```@meta
-CurrentModule = Mimosa
-```
-
-# Mimosa
-
-Documentation for [Mimosa](https://github.com/jmartfrut/Mimosa.jl).
-
-```@index
-```
-
-```@autodocs
-Modules = [Mimosa]
-```