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

Feature/simplify landing page #422

Merged
merged 18 commits into from
Mar 30, 2023
Merged
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
35 changes: 35 additions & 0 deletions .github/workflows/landing-page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Landing-page

on:
push:
branches:
- main
- feature/simplify-landing-page

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install .[docs]
pip install sphinx_design

- name: Build landing-page
run: |
cd doc/landing-page
make html
- name: Publish
uses: tsunematsu21/actions-publish-gh-pages@v1.0.2
with:
dir: doc/landing-page/_build/html
repo: dfetch-org/dfetch-org.github.io
branch: main
token: ${{ secrets.GH_DFETCH_ORG_DEPLOY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
coverage.xml
example/Tests/
build
doc/landing-page/_build
4 changes: 2 additions & 2 deletions dfetch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
manifest:
version: 0.0 # DFetch Module syntax version
version: 0.0

remotes: # declare common sources in one place
remotes:
- name: github
url-base: https://github.com/

Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv", "landing-page"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
Expand Down
21 changes: 21 additions & 0 deletions doc/landing-page/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = DFetch
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
touch "$(BUILDDIR)/html/.nojekyll"
199 changes: 199 additions & 0 deletions doc/landing-page/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 11 16:03:16 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os

from dfetch import __version__

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions = ['sphinx.ext.autodoc', 'sphinx_autodoc_annotation', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinxarg.ext', 'sphinx.ext.autosectionlabel']
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinxarg.ext",
"sphinx.ext.autosectionlabel",
"plantweb.directive",
"sphinxcontrib.asciinema",
"sphinx_design",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"

# The master toctree document.
master_doc = "index"

# General information about the project.
project = "Dfetch"
copyright = "2021, Dfetch-org"
author = "DFetch"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = ""

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "alabaster"

html_css_files = [
"css/custom.css",
]

html_logo = "../images/dfetch_logo.png"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
"show_powered_by": False,
"github_user": "dfetch-org",
"github_repo": "dfetch",
"github_banner": True,
"show_related": True,
"note_bg": "#FFF59C",
"nosidebar": True,
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
"**": [
"about.html",
"searchbox.html",
"navigation.html",
"relations.html", # needs 'show_related': True theme option to display
]
}


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = "dfetchdoc"


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "dfetch.tex", "Dfetch Documentation", "Dfetch", "manual"),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "dfetch", "Dfetch Documentation", [author], 1)]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"dfetch",
"Dfetch Documentation",
author,
"Dfetch",
"One line description of project.",
"Miscellaneous",
),
]

# Options for asciicasts
sphinxcontrib_asciinema_defaults = {
"theme": "monokai",
"preload": 1,
"font-size": "10px",
"speed": 1.5,
"loop": False,
"autoplay": True,
}
102 changes: 102 additions & 0 deletions doc/landing-page/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.. Dfetch documentation master file

:sd_hide_title:

.. image:: ../images/dfetch_header.png
:width: 100%
:align: center


Dfetch
######

.. grid:: 3

.. grid-item::

.. button-link:: https://pypi.org/project/dfetch/
:color: primary
:shadow:
:expand:

:material-regular:`download;2em` Download

.. grid-item::

.. button-link:: https://dfetch.rtfd.io/
:color: secondary
:shadow:
:expand:

:material-regular:`description;2em` Docs

.. grid-item::

.. button-link:: https://github.com/dfetch-org/dfetch/
:color: secondary
:shadow:
:expand:

:material-regular:`article;2em` Source

.. asciinema:: ../asciicasts/basic.cast

Are you tired of managing dependencies using Git submodules or SVN externals? Introducing *Dfetch*, a VCS agnostic, no-hassle, source-only solution
that allows you to easily retrieve dependencies as plain text from various sources. *Dfetch* eliminates the need for Git submodules or SVN externals
by providing a efficient and user-friendly way to manage your project's dependencies using *vendoring*. It promotes upstreaming changes and allows for local
customizations all while maintaining self-contained code repositories.

Say goodbye to the hassle of traditional dependency management solutions and hello to a more efficient and streamlined process with *Dfetch*.

.. card:: :material-regular:`done_all;4em;sd-text-primary` **Check for updates**
:class-card: sd-bg-dark sd-text-light

*Dfetch* simplifies dependency management by allowing users to easily check for
updates and integrate them seamlessly into their codebase.

.. asciinema:: ../asciicasts/check.cast


.. grid:: 1 1 2 2

.. grid-item::

:material-regular:`shuffle;4em;sd-text-primary` **VCS-agnostic**

*Dfetch* is a versatile solution, being VCS agnostic it can be used with both Git and SVN, enabling users to seamlessly manage dependencies regardless of their VCS of choice and even to mix them.


.. grid-item::

:material-regular:`archive;4em;sd-text-primary` **Self-contained**

*Dfetch* ensures self-contained repositories by including dependencies directly within the project, eliminating external links and making deployment easier.


.. grid-item::

:material-regular:`build;4em;sd-text-primary` **Simple yaml config**

*Dfetch* simplifies configuration with its easy-to-use YAML file, allowing users to set up and manage dependencies with minimal setup and effort.


.. grid-item::

:material-regular:`lock_open;4em;sd-text-primary` **No lock-in**

*Dfetch* provides freedom of choice, users are not locked into using *Dfetch*, they can easily switch to other dependency management solutions.


.. card:: :material-regular:`smart_toy;4em;sd-text-primary` **Integrate**
:class-card: sd-bg-dark sd-text-light

*Dfetch* streamlines the integration process by being easily adaptable to various CI/CD automated tools, making it a breeze to implement in any development workflow.
It can generate reports for Github, Gitlab, Jenkins, DependencyTrack and more!

.. asciinema:: ../asciicasts/check-ci.cast


.. card:: Example config

.. literalinclude:: ../../dfetch.yaml
:language: yaml
Loading