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

Create Mobile UI Section #156

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ docs/app-runtime
docs/cli/style
docs/capture-plugins

mobile/mobile-ui

# temp directories for copied docs
.cli-repo-temp
.ap-repo-temp
.cypress-repo-temp
.ar-repo-temp
.clistyle-repo-temp
.mui-repo-temp
11 changes: 9 additions & 2 deletions docs-migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const migrateDocs = ({

// Set up sparse checkout to retrieve only the 'docs' directory
execSync('git sparse-checkout init')
execSync('git sparse-checkout set docs')
execSync('git sparse-checkout add docs')

postDownloadActions.forEach((action) => {
console.log(`executing post download action: ${action}`)
Expand Down Expand Up @@ -97,7 +97,7 @@ migrateDocs({
{ from: 'dist/markdown/api.md', to: 'api.md' },
],
postDownloadActions: [
'git sparse-checkout set src docs',
'git sparse-checkout add src docs',
'yarn',
'yarn build:jsdoc',
],
Expand Down Expand Up @@ -145,3 +145,10 @@ migrateDocs({
targetDir: './docs/capture-plugins',
ignoreDirs: ['user']
})

migrateDocs({
repo: 'https://github.com/dhis2/dhis2-mobile-ui.git',
tempDir: '.mui-repo-temp',
targetDir: './mobile/mobile-ui',
branch: 'main'
})
17 changes: 16 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ module.exports = {
{
to: 'docs',
activeBasePath: 'docs',
label: 'Docs',
label: 'Web Development',
position: 'left',
},
{
to: 'mobile',
activeBasePath: 'mobile',
label: 'Mobile Development',
position: 'left',
},
{ to: 'blog', label: 'Blog', position: 'left' },
Expand Down Expand Up @@ -120,6 +126,15 @@ module.exports = {
sidebarPath: require.resolve('./sidebarsEvents.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
id: 'mobile',
path: 'mobile',
routeBasePath: 'mobile',
sidebarPath: require.resolve('./sidebarsMobile.js'),
},
],
[
'@docusaurus/plugin-content-docs',
{
Expand Down
7 changes: 7 additions & 0 deletions mobile/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: overview
---

# Mobile Documentation

This is the documentation for the mobile SDK and UI components.
5 changes: 0 additions & 5 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,6 @@ module.exports = {
},

'aditionalreferences',
{
type: 'link',
label: 'Android SDK',
href: 'https://docs.dhis2.org/en/develop/developing-with-the-android-sdk/about-this-guide.html',
},
{
type: 'link',
label: 'Web API',
Expand Down
18 changes: 18 additions & 0 deletions sidebarsMobile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
mobile: [
{ id: 'overview', label: 'Overview', type: 'doc' },
{
'Mobile UI': [
{
type: 'autogenerated',
dirName: 'mobile-ui',
}
]
},
{
type: 'link',
label: 'Android SDK',
href: 'https://docs.dhis2.org/en/develop/developing-with-the-android-sdk/about-this-guide.html',
}
],
}