Skip to content

Commit

Permalink
reverted docs
Browse files Browse the repository at this point in the history
  • Loading branch information
clsource committed Jan 14, 2025
1 parent 966fafb commit 4215b6a
Show file tree
Hide file tree
Showing 42 changed files with 1,998 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/antora-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish Antora docs to GitHub Pages
on:
push:
branches: [docs]
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
Expand All @@ -28,7 +28,7 @@ jobs:
with:
node-version: '18'
- name: Install Antora
run: npm i antora
run: npm i antora asciidoctor-emoji asciidoctor-kroki @antora/lunr-extension
- name: Generate Site
run: npx antora antora-playbook.yml
- name: Upload Artifacts
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: antora.build antora.server dev.shell dev.services mix.deps mix.setup mix.phoenix.server
.PHONY: dev.shell dev.services mix.deps mix.setup mix.phoenix.server

# Devenv Commands
dev.shell dsh:
Expand Down
37 changes: 37 additions & 0 deletions antora-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
site:
title: Tololo Docs
url: https://elixircl.github.io/tololo
start_page: "tololo::index.adoc"

content:
sources:
- url: .
branches: HEAD
start_path: docs/

antora:
extensions:
- require: '@antora/lunr-extension'

asciidoc:
extensions:
- asciidoctor-emoji
- asciidoctor-kroki
attributes:
kroki-fetch-diagram: true
experimental: ''
idprefix: ''
idseparator: '-'
page-pagination: ''
highlightjs-theme: monokai
highlightjs-languages: js, elixir, sql, yaml

ui:
bundle:
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable
snapshot: true
# https://gitlab.com/antora/antora-ui-default/-/tree/master/src/partials
supplemental_files: supplemental-ui/

output:
dir: _dist
12 changes: 12 additions & 0 deletions docs/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"customizations": {
"vscode": {
"extensions": [
"mkhl.direnv"
]
}
},
"image": "ghcr.io/cachix/devenv:latest",
"overrideCommand": false,
"updateContentCommand": "devenv test"
}
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_dist/
13 changes: 13 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: antora.build antora.server shell

shell s:
@devenv shell

antora.build b:
@rm -rf ./_dist
@antora ../antora-playbook.yml
@touch ./_dist/.nojekyll

antora.server as:
@make antora.build
@npm run serve
8 changes: 8 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: tololo
version: ~
title: Tololo Ecommerce
nav:
- modules/ROOT/nav.adoc
- modules/decisions/nav.adoc
- modules/developer/nav.adoc
- modules/requirements/nav.adoc
100 changes: 100 additions & 0 deletions docs/devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1736426010,
"owner": "cachix",
"repo": "devenv",
"rev": "1c384bc4be3ee571511fbbc6fdc94fe47d60f6cf",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733477122,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1735882644,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
}
},
"root": "root",
"version": 7
}
19 changes: 19 additions & 0 deletions docs/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ pkgs, lib, inputs, ... }:

# top-level devenv.nix. contains services not essential to running the backend, such as Prometheus and Kafka
{
devcontainer.enable = true;

# https://devenv.sh/common-patterns/#configure-the-shell-based-on-the-current-machine
packages = [
pkgs.gnumake
pkgs.antora
];

# for Antora extensions
languages.javascript.enable = true;
languages.javascript.yarn = {
enable = true;
install.enable = true;
};
}
Empty file added docs/modules/ROOT/nav.adoc
Empty file.
96 changes: 96 additions & 0 deletions docs/modules/ROOT/pages/_example.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
= Welcome!
:navtitle: Welcome

Example using _UML_ and _Emoji_.

emoji:bear[5x]


[plantuml]
----
@startuml
Class01 <|-- Class02
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 -- Class10
@enduml
----

[source, js]
----
// File: app.js
const User = ({
username:'clsource'
});
----

[dbml]
----
Table users {
id integer
username varchar
role varchar
created_at timestamp
}
Table posts {
id integer [primary key]
title varchar
body text [note: 'Content of the post']
user_id integer
status post_status
created_at timestamp
}
Enum post_status {
draft
published
private [note: 'visible via URL only']
}
Ref: posts.user_id > users.id // many-to-one
----


== Antora Demo Site and Playbook Project
:url-project: https://antora.org
:url-org: https://gitlab.com/antora
:url-group: {url-org}/demo
:url-repo: {url-group}/docs-site
:url-demo-playbook: {url-repo}/blob/main/antora-playbook.yml
:url-antora-docs: https://docs.antora.org/antora/latest
:url-docs-quickstart: {url-antora-docs}/install-and-run-quickstart/
:url-docs-playbook: {url-antora-docs}/playbook/
:url-docs-run: {url-antora-docs}/run-antora/
:url-opendevise: https://opendevise.com

This is the playbook project for the Antora demo site.
You can view the site produced by the Antora playbook ([.path]_antora-playbook.yml_) stored in this project at https://antora.gitlab.io/demo/docs-site.

You can also use this project and the demo documentation components to generate the demo site on your own computer
To use the demo materials and generate the demo site locally, follow the steps in the {url-docs-quickstart}[Antora quickstart].

== Antora Playbook

An {url-docs-playbook}[Antora playbook] is responsible for generating a documentation site.
It contains the instructions a user wants to relay to the Antora site generator.
These instructions include the content Antora should collect and the UI it should apply to the generated site.

The file [.path]_antora-playbook.yml_ in this repository is the playbook used to produce the demo site.
It tells Antora where to find the Component A and Component B remote content repositories and default UI.

== Generate the Demo Site

After cloning this playbook project repository to your computer or setting up your own playbook for the demo site (see the {url-docs-quickstart}[Antora quickstart] for instructions) you can generate the demo site by {url-docs-run}[running Antora].

== Copyright and License

Copyright (C) 2017-present by OpenDevise Inc. and the individual contributors to Antora.

Use of this software is granted under the terms of the https://www.mozilla.org/en-US/MPL/2.0/[Mozilla Public License Version 2.0] (MPL-2.0).
See link:LICENSE[] to find the full license text.

== Authors

Development of Antora is led and sponsored by {url-opendevise}[OpenDevise Inc].
49 changes: 49 additions & 0 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
= 🔭 Tololo E-commerce

High in the mountains of the Coquimbo region of Chile lies a peak called
Cerro Tololo, whose name means "`on the edge of the abyss,`" a
description given to the mountain by the ancient Diaguita people, in
reference to its rugged geography on its northeastern side.

- https://en.wikipedia.org/wiki/Cerro_Tololo_Inter-American_Observatory[Wikipedia]
image::https://github.com/user-attachments/assets/e0908d44-0905-4240-b5ab-52e844ad7e6d[By CTIO/NOIRLab/NSF/AURA/R. Sparks - https://noirlab.edu/public/images/iotw2103a/, CC BY 4.0, https://commons.wikimedia.org/w/index.php?curid=99545008]

*Tololo* is a set of _Elixir_ components that bring functionality akin
to Shopify and other e-commerce platforms to
https://phoenixframework.org/[Phoenix Framework]. You have complete
freedom to create your own storefront(s), but we’ve already done the
hard work for you in the backend.

[CAUTION]
====
Version 1.x is currently in alpha release. We recommend this
version for new projects, however, it is not feature-complete and
therefore may not be deemed production-ready.
====

[IMPORTANT]
====
Tololo is mainly targeted to Chilean’s market needs.
====

== Features

Tololo E-commerce is mainly inspired by
https://github.com/lunarphp/lunar[Lunar PHP] and https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api[Shopify Storefront API] and aims to be similar in scope and features.

- *Ecommerce Engine*: Based around https://ash-hq.org/[Ash Framework]
models, the e-commerce core provides all the functionality you need to
create an online store.

- *Backoffice*: Manage your catalogue, customers and orders in our
modern and extendable admin area, built in _Phoenix LiveView_.

- *API*: Power your storefront or mobile app via _Tololo’s_ API.

== Learning

This project is not only a product that can be used in the Real World™,
but is meant to be used as an example to learn how to make an
professional _Elixir_ artifact. So we take great care in documentation
for developers.
7 changes: 7 additions & 0 deletions docs/modules/decisions/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.Architecture Decisions
* xref:0000-use-adr.adoc[]
* xref:use-elixir-phoenix.adoc[]
* xref:use-ash.adoc[]
* xref:use-nix.adoc[]
* xref:use-antora-docs.adoc[]
* xref:use-tbd-and-cc.adoc[]
Loading

0 comments on commit 4215b6a

Please sign in to comment.