Pagination in Jekyll 3 not generating pages - ruby

I'm encountering an issue with Pagination as I make a website; it would appear to be a nil variable, according to the command c 'paginator' when using this plugin: https://github.com/octopress/debugger
In addition, if I replace "site.posts" with "paginator.posts" in blog/index.html, I get no posts. I am running on Ruby 2.4 and Jekyll 3.3.1.
My setup is as follows:
_config.yml
gems:
- jekyll-autoprefixer
- jekyll-paginate
plugins_dir: [jekyll-autoprefixer, jekyll-paginate]
paginate: 3
paginate_path: "/blog/page:num/"
include: [ "_pages", "_posts" ]
_pages/blog/index.html
---
layout: page
title: Blog
subtitle: Blog posts
permalink: blog/index.html
---
{% for post in site.posts %}
<h1 class="post-title"> {{post.title}} </h1>
{% endfor %}
{% debug %}
<h1 class="post-title"> {{ paginator.total_posts }} </h1>
Directory Structure
├── Gemfile
├── Gemfile.lock
├── LICENSE
├── README.md
├── _config.yml
├── _data
│   ├── team.yml
│   └── template.yml
├── _includes
│   ├── about.html
│   ├── clients.html
│   ├── contact.html
│   ├── css
│   │   ├── agency.css
│   │   └── bootstrap.min.css
│   ├── footer.html
│   ├── head.html
│   ├── header.html
│   ├── js.html
│   ├── modals.html
│   ├── nav.html
│   ├── portfolio_grid.html
│   ├── services.html
│   └── team.html
├── _layouts
│   ├── default.html
│   ├── feed.xml
│   ├── page.html
│   ├── style.css
│   └── team.html
├── _pages
│   ├── architecture.md
│   ├── blog
│   │   └── index.html
│   └── team.html
├── _plugins
│   └── hex_to_rgb.rb
├── _posts
│   └── 2017-05-24-test.md
├── css
├── feed.xml
├── index.html
├── js
└── style.css
(Most files removed for brevity)
Thank you for any help!

Related

How do I add bootstrap.min.css to my Django project

I'm trying to customise the look of the DRF tutorial API by following this - https://www.django-rest-framework.org/topics/browsable-api/?q=base.html#the-browsable-api.
If I use a web address in the api.html href here, it works:
{% extends "rest_framework/base.html" %}
{% block bootstrap_theme %}
<link rel="stylesheet" href="https://bootswatch.com/5/vapor/bootstrap.min.css" type="text/css">
{% endblock %}
If I download bootstrap.min.css, where should I put it, and what should the href path be?
Wherever I try at the moment, I get a Not Found: error in the server logs.
Here's my TEMPLATES dictionary from settings.py:
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'snippets', 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
And my directory structure:
.
└── pastebin
├── db.sqlite3
├── manage.py
├── pastebin
│   ├── __init__.py
│   ├── __pycache__
│   ├── asgi.py
│   ├── pathtest.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── snippets
├── __init__.py
├── __pycache__
├── admin.py
├── apps.py
├── migrations
│   ├── 0001_initial.py
│   ├── 0002_snippet_highlighted.py
│   ├── __init__.py
│   └── __pycache__
├── models.py
├── serializers.py
├── templates
│   └── rest_framework
│   └── api.html
├── tests.py
├── urls.py
└── views.py
Thank you
I appear to have found a way. I'd be interested to know if this is the correct way.
I added a static directory with the downloaded css file in it:
.
└── pastebin
├── db.sqlite3
├── manage.py
├── pastebin
│   ├── __init__.py
│   ├── __pycache__
│   ├── asgi.py
│   ├── pathtest.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── snippets
│   ├── __init__.py
│   ├── __pycache__
│   ├── admin.py
│   ├── apps.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   ├── 0002_snippet_highlighted.py
│   │   ├── __init__.py
│   │   └── __pycache__
│   ├── models.py
│   ├── serializers.py
│   ├── templates
│   │   └── rest_framework
│   │   └── api.html
│   ├── tests.py
│   ├── urls.py
│   └── views.py
└── static
└── bootstrap.css
I updated the settings.py file with this:
STATICFILES_DIRS = [
BASE_DIR / "static",
]
And the href in api.html like so:
{% extends "rest_framework/base.html" %}
{% block bootstrap_theme %}
<link rel="stylesheet" href="/static/bootstrap.css" type="text/css">
{% endblock %}
According to the docs here, when running the development server with python3 manage.py runserver the serving of this static file is being handled automatically.

Apache Atlas: curl: (7) Failed to connect to localhost port 21000: Connection refused

I'm trying to run apache atlas on my local. There are several problem I have faced to.
First, for clearance of how I have build the apache atlas I will describe the steps:
git clone https://github.com/apache/atlas
cd atlas
mvn clean install -DskipTests -X
mvn clean package -Pdist -DskipTests
It has been built without any error. Here is the project structure:
.
├── 3party-licenses
│   ├── Antlr-LICENSE
│   ├── Respond-LICENSE
│   ├── animate-LICENSE
│   ├── backgrid-columnmanager-LICENSE
│   ├── bootstrap-daterangepicker-LICENSE
│   ├── bootstrap-sidebar-LICENSE
│   ├── es5-shim-LICENSE
│   ├── google-fonts-LICENSE
│   ├── handlebars-LICENSE
│   ├── hbs-LICENSE
│   ├── jQuery-QueryBuilder-LICENSE
│   ├── jQuery-ui-LICENSE
│   ├── janusgraph-LICENSE
│   ├── jquery-placeholder-LICENSE
│   ├── mock-LICENSE
│   ├── normalize.css-LICENSE
│   ├── platform-LICENSE
│   ├── pnotify-LICENSE
│   ├── require-handlebars-plugin-LICENSE
│   ├── swagger-ui-LECENSE
│   └── titan-LICENSE
├── DISCLAIMER.txt
├── LICENSE
├── NOTICE
├── README.txt
├── addons
│   ├── falcon-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── falcon-bridge-shim
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── hbase-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── hbase-bridge-shim
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── hbase-testing-util
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── hdfs-model
│   │   ├── pom.xml
│   │   └── target
│   ├── hive-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── hive-bridge-shim
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── impala-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── impala-bridge-shim
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── impala-hook-api
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── kafka-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── models
│   │   ├── 0000-Area0
│   │   ├── 1000-Hadoop
│   │   ├── 2000-RDBMS
│   │   ├── 3000-Cloud
│   │   └── 4000-MachineLearning
│   ├── sqoop-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── sqoop-bridge-shim
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── storm-bridge
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   └── storm-bridge-shim
│   ├── pom.xml
│   ├── src
│   └── target
├── atlas-examples
│   ├── pom.xml
│   ├── sample-app
│   │   ├── README.md
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   └── target
│   ├── maven-shared-archive-resources
│   └── rat.txt
├── authorization
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-authorization-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── build-tools
│   ├── pom.xml
│   ├── src
│   │   └── main
│   └── target
│   ├── atlas-buildtools-1.0.jar
│   ├── classes
│   └── maven-archiver
├── client
│   ├── client-v1
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── client-v2
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── common
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── pom.xml
│   ├── src
│   │   └── main
│   └── target
│   ├── maven-shared-archive-resources
│   └── rat.txt
├── common
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-common-3.0.0-SNAPSHOT-tests.jar
│   ├── atlas-common-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── dashboardv2
│   ├── gruntfile.js
│   ├── package-lock.json
│   ├── package.json
│   ├── pom.xml
│   ├── public
│   │   ├── css
│   │   ├── ieerror.html
│   │   ├── img
│   │   ├── index.html.tpl
│   │   ├── js
│   │   └── migration-status.html.tpl
│   └── target
│   ├── atlas-dashboardv2-3.0.0-SNAPSHOT
│   ├── atlas-dashboardv2-3.0.0-SNAPSHOT.war
│   ├── classes
│   ├── dist
│   ├── gruntfile.js
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── node
│   ├── node_modules
│   ├── package-lock.json
│   ├── package.json
│   ├── rat.txt
│   └── test-classes
├── dashboardv3
│   ├── gruntfile.js
│   ├── package-lock.json
│   ├── package.json
│   ├── pom.xml
│   ├── public
│   │   ├── css
│   │   ├── ieerror.html
│   │   ├── img
│   │   ├── index.html.tpl
│   │   └── js
│   └── target
│   ├── atlas-dashboardv3-3.0.0-SNAPSHOT
│   ├── atlas-dashboardv3-3.0.0-SNAPSHOT.war
│   ├── classes
│   ├── dist
│   ├── gruntfile.js
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── node
│   ├── node_modules
│   ├── package-lock.json
│   ├── package.json
│   ├── rat.txt
│   └── test-classes
├── dev-support
│   ├── atlas-docker
│   │   ├── Dockerfile
│   │   ├── Dockerfile.atlas
│   │   ├── Dockerfile.atlas-base
│   │   ├── Dockerfile.atlas-build
│   │   ├── README.md
│   │   ├── data
│   │   ├── dist
│   │   ├── docker-compose.atlas-base.yml
│   │   ├── docker-compose.atlas-build.yml
│   │   ├── docker-compose.atlas.yml
│   │   ├── patches
│   │   └── scripts
│   ├── atlas-scripts
│   │   ├── README.txt
│   │   ├── admin_status.sh
│   │   ├── classificationdef_get.sh
│   │   ├── entity_classification_bulk.sh
│   │   ├── entity_classifications_add.sh
│   │   ├── entity_classifications_delete.sh
│   │   ├── entity_classifications_update.sh
│   │   ├── entity_create.sh
│   │   ├── entity_delete_by_guid.sh
│   │   ├── entity_get_by_guid.sh
│   │   ├── entity_get_by_type_and_unique_attr.sh
│   │   ├── entity_update.sh
│   │   ├── entity_update_by_type_and_unique_attr.sh
│   │   ├── entitydef_get.sh
│   │   ├── enumdef_get.sh
│   │   ├── env_atlas.sh
│   │   ├── export_entity_by_guid.sh
│   │   ├── export_entity_by_type_and_attr.sh
│   │   ├── import_zip.sh
│   │   ├── sample-data
│   │   ├── search_basic.sh
│   │   ├── search_basic_with_attribute_filters.sh
│   │   ├── search_dsl.sh
│   │   ├── structdef_get.sh
│   │   ├── typedefs_create.sh
│   │   ├── typedefs_delete.sh
│   │   ├── typedefs_get.sh
│   │   └── typedefs_update.sh
│   ├── findbugsIncludeFile.xml
│   ├── smart-apply-patch.sh
│   └── test-patch.sh
├── distro
│   ├── pom.xml
│   ├── src
│   │   ├── bin
│   │   ├── conf
│   │   ├── data
│   │   ├── logs
│   │   ├── main
│   │   ├── server
│   │   └── test
│   └── target
│   ├── META-INF
│   ├── apache-atlas-3.0.0-SNAPSHOT-atlas-index-repair.zip
│   ├── apache-atlas-3.0.0-SNAPSHOT-bin.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-classification-updater.zip
│   ├── apache-atlas-3.0.0-SNAPSHOT-falcon-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-hbase-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-hive-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-impala-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-kafka-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-server.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-sources.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-sqoop-hook.tar.gz
│   ├── apache-atlas-3.0.0-SNAPSHOT-storm-hook.tar.gz
│   ├── archive-tmp
│   ├── atlas-distro-3.0.0-SNAPSHOT.jar
│   ├── bin
│   ├── conf
│   ├── data
│   ├── logs
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── rat.txt
│   ├── server
│   └── test-classes
├── docs
│   ├── docz-lib
│   │   ├── config
│   │   ├── docz
│   │   └── docz-core
│   ├── doczrc.js
│   ├── package.json
│   ├── pom.xml
│   ├── src
│   │   ├── documents
│   │   └── resources
│   ├── target
│   │   ├── atlas-docs-3.0.0-SNAPSHOT.jar
│   │   ├── classes
│   │   ├── docz-lib
│   │   ├── doczrc.js
│   │   ├── maven-archiver
│   │   ├── maven-shared-archive-resources
│   │   ├── package.json
│   │   ├── pom.xml
│   │   ├── rat.txt
│   │   ├── src
│   │   ├── test-classes
│   │   └── theme
│   └── theme
│   ├── components
│   ├── config.js
│   ├── index.js
│   ├── styles
│   └── utils
├── graphdb
│   ├── api
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── common
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── graphdb-impls
│   │   ├── pom.xml
│   │   └── target
│   ├── janus
│   │   ├── pom.xml
│   │   ├── readme.txt
│   │   ├── src
│   │   └── target
│   ├── janus-hbase2
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── pom.xml
│   ├── readme.txt
│   └── target
│   ├── maven-shared-archive-resources
│   └── rat.txt
├── intg
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-intg-3.0.0-SNAPSHOT-tests.jar
│   ├── atlas-intg-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── notification
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-notification-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── dependency
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── plugin-classloader
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-plugin-classloader-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── pom.xml
├── release-build.xml
├── release-log.txt
├── repository
│   ├── pom.xml
│   ├── src
│   │   ├── main
│   │   └── test
│   └── target
│   ├── atlas-repository-3.0.0-SNAPSHOT-tests.jar
│   ├── atlas-repository-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── generated-test-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   ├── solr
│   └── test-classes
├── server-api
│   ├── pom.xml
│   ├── src
│   │   └── main
│   └── target
│   ├── atlas-server-api-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── target
│   ├── maven-shared-archive-resources
│   │   └── META-INF
│   └── rat.txt
├── test-tools
│   ├── pom.xml
│   ├── src
│   │   └── main
│   └── target
│   ├── atlas-testtools-3.0.0-SNAPSHOT.jar
│   ├── classes
│   ├── generated-sources
│   ├── maven-archiver
│   ├── maven-shared-archive-resources
│   ├── maven-status
│   ├── rat.txt
│   └── test-classes
├── tools
│   ├── atlas-index-repair
│   │   ├── README
│   │   ├── pom.xml
│   │   ├── src
│   │   └── target
│   ├── atlas-migration-exporter
│   │   ├── README
│   │   ├── atlas-log4j.xml
│   │   └── atlas_migration_export.py
│   └── classification-updater
│   ├── pom.xml
│   ├── src
│   └── target
└── webapp
├── pom.xml
├── src
│   ├── main
│   └── test
└── target
├── api
├── atlas-webapp-3.0.0-SNAPSHOT
├── atlas-webapp-3.0.0-SNAPSHOT-classes.jar
├── atlas-webapp-3.0.0-SNAPSHOT.war
├── atlas.keystore
├── classes
├── enunciate
├── generated-sources
├── generated-test-sources
├── maven-archiver
├── maven-shared-archive-resources
├── maven-status
├── models
├── rat.txt
├── solr
├── test-classes
└── war
Whenever I want to run atlas_start.py file, I faced to following logs:
/bigdata/atlas/distro/src/conf/atlas-env.sh: line 59: MANAGE_LOCAL_HBASE=${hbase.embedded}: bad substitution
/bigdata/atlas/distro/src/conf/atlas-env.sh: line 62: MANAGE_LOCAL_SOLR=${solr.embedded}: bad substitution
/bigdata/atlas/distro/src/conf/atlas-env.sh: line 65: MANAGE_EMBEDDED_CASSANDRA=${cassandra.embedded}: bad substitution
/bigdata/atlas/distro/src/conf/atlas-env.sh: line 68: MANAGE_LOCAL_ELASTICSEARCH=${elasticsearch.managed}: bad substitution
java.io.FileNotFoundException: /bigdata/atlas/distro/src/server/webapp/atlas.war (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:112)
at jdk.jartool/sun.tools.jar.Main.run(Main.java:407)
at jdk.jartool/sun.tools.jar.Main.main(Main.java:1681)
The Server is no longer running with pid 29164
starting atlas on host localhost
starting atlas on port 21000
..............................................................................................................................................................................................................................................................................................................
Apache Atlas Server started!!!
here is the curl:
curl -u username:password http://localhost:21000/api/atlas/v2/types/typedefs/headers
error:
curl: (7) Failed to connect to localhost port 21000: Connection refused
After struggling with Apache Atlas for a while, I found 3.0.0 Snapshot version very buggy! Therefore I have decided to build and install Apache Atlas 2.1.0 RC3.
Prerequisite:
Make sure you have installed java on your machine. In case it is not installed on your computer, you can install it using the following command in Linux:
sudo apt-get install openjdk-8-jre
Then JAVA_HOME should be set:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Building:
Download Apache Atlas 2.1.0-rc3:
wget https://github.com/apache/atlas/archive/refs/tags/release-2.1.0-rc3.tar.gz
Unpack it:
 tar -xzvf release-2.1.0-rc3.tar.gz
Set environment variables:
export MANAGE_LOCAL_HBASE=true
export MANAGE_LOCAL_SOLR=true
Execute:
mvn clean -DskipTests install
mvn clean -DskipTests package -Pdist,embedded-hbase-solr
Change the directory to distro/target and unpack the server tar file:
cd distro/target
tar -xzvf apache-atlas-2.1.0-server.tar.gz
Change the directory to apache-atlas-2.1.0-server and run execute atlas_start.py script:
cd apache-atlas-2.1.0-server
bin/atlas_start.py
Important Tip 1: In official documentation it is said to change directory to apache-atlas-2.1.0, not apache-atlas-2.1.0-server. I have tried it but it doesn't work.
Important Tip 2: The following log doesn't mean that Apache Atlas is currently running!
configured for local hbase.
hbase started.
configured for local solr.
solr started.
setting up solr collections…
starting atlas on host localhost
starting atlas on port 21000
Apache Atlas Server started!!
To ensure that it is working properly or not, check the application.log in logs directory. If everything would be OK, it takes about 10 minutes to run without any error.
Brief screenshot of logs/application.log:
**Check the function:**
> curl -u admin:admin http://localhost:21000/api/atlas/admin/version
{"Description":"Metadata Management and Data Governance Platform over Hadoop","Revision":"release","Version":"2.1.0","Name":"apache-atlas"}%
or
http://localhost:21000 should look-like the following picture:
I want to thank Mark Chesnavsky helping me to resolve this issue. If you have any other issue you can check his post.

Cant install SPHINX - PermissionError: [Errno 13] Permission denied: './source'

Sphinx Quickstart wont let me go beyond the step where we confirm we need the docs in English .
I have an existing CONDA venv named - demo_venv.
I activate that and do a pip install , directory structure is as seen below -
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx$ pip install sphinx
the directory tree -
pycon-sphinx-tutorial
├── crawler
├── install.sh
├── README.rst
├── tutorial
As can be seen from the - tree , above and the Error below its a PermissionError: [Errno 13].
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs$ sphinx-quickstart
Welcome to the Sphinx 2.2.1 quickstart utility.
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).
Selected root path: .
You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: y
The project name will occur in several places in the built documentation.
> Project name: Crawler
> Author name(s): RohitDhankar
> Project release []: 1.0
If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.
For a list of supported codes, see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
> Project language [en]: en
Traceback (most recent call last):
File "/home/dhankar/anaconda2/envs/demo_venv/bin/sphinx-quickstart", line 10, in <module>
sys.exit(main())
File "/home/dhankar/anaconda2/envs/demo_venv/lib/python3.6/site-packages/sphinx/cmd/quickstart.py", line 615, in main
generate(d, overwrite=False, templatedir=args.templatedir)
File "/home/dhankar/anaconda2/envs/demo_venv/lib/python3.6/site-packages/sphinx/cmd/quickstart.py", line 371, in generate
ensuredir(srcdir)
File "/home/dhankar/anaconda2/envs/demo_venv/lib/python3.6/site-packages/sphinx/util/osutil.py", line 79, in ensuredir
os.makedirs(path, exist_ok=True)
File "/home/dhankar/anaconda2/envs/demo_venv/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: './source'
I understand that i need to change my Root path / Root Directory - as of now the SPHINX internal module/file - sphinx/cmd/quickstart.py , is unable to get to the right path where it has the correct permissions to create the _build directory. My QUESTION -- How to solve for this ?
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs$ sphinx-quickstart -c /media/dhankar/Dhankar_1/a5_test_sphinx
usage: sphinx-quickstart [OPTIONS] <PROJECT_DIR>
sphinx-quickstart: error: unrecognized arguments: -c
Am not sure if this is the best or even a correct approach . But for now this is what ive done -
Edited the file - sphinx/cmd/quickstart.py - as seen below , changed the value for the path within the dictionary DEFAULTS.
DEFAULTS = {
#'path': '.',
'path': '/media/dhankar/Dhankar_1/a5_test_sphinx/',
'sep': False,
'dot': '_',
'language': None,
'suffix': '.rst',
'master': 'index',
'makefile': True,
'batchfile': True,
}
This now gave me in terminal -
Welcome to the Sphinx 2.2.1 quickstart utility.
Please enter values for the following settings (just press Enter to
accept a default value, if one is given in brackets).
Selected root path: .
You have two options for placing the build directory for Sphinx output.
Either, you use a directory "_build" within the root path, or you separate
"source" and "build" directories within the root path.
> Separate source and build directories (y/n) [n]: n
The project name will occur in several places in the built documentation.
> Project name: Crawler
> Author name(s): RohitDhankar
> Project release []: 1.0
If the documents are to be written in a language other than English,
you can select a language here by its language code. Sphinx will then
translate text that it generates into that language.
For a list of supported codes, see
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language.
> Project language [en]: en
Creating file ./conf.py.
Creating file ./index.rst.
Creating file ./Makefile.
Creating file ./make.bat.
Finished: An initial directory structure has been created.
You should now populate your master file ./index.rst and create other documentation
source files. Use the Makefile to build the docs, like so:
make builder
where "builder" is one of the supported builders, e.g. html, latex or linkcheck.
Also the TREE at the directory is as seen below -
dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx$ tree
.
└── pycon-sphinx-tutorial
├── crawler
│   ├── _build
│   ├── conf.py
│   ├── docs
│   ├── index.rst
│   ├── make.bat
│   ├── Makefile
│   ├── src
│   │   ├── crawler
│   │   │   ├── __init__.py
│   │   │   ├── main.py
│   │   │   └── utils.py
│   │   └── __init__.py
│   ├── _static
│   └── _templates
├── install.sh
├── README.rst
├── tutorial
│   ├── cheatsheet.html
│   ├── finish.html
│   ├── genindex.html
│   ├── glossary.html
│   ├── _images
│   │   ├── cheatsheet-back-full.png
│   │   └── cheatsheet-front-full.png
│   ├── index.html
│   ├── objects.inv
│   ├── py-modindex.html
│   ├── search.html
│   ├── searchindex.js
│   ├── _sources
│   │   ├── cheatsheet.txt
│   │   ├── finish.txt
│   │   ├── glossary.txt
│   │   ├── index.txt
│   │   ├── start.txt
│   │   ├── step-1.txt
│   │   ├── step-2.txt
│   │   ├── step-3.txt
│   │   └── useful-links.txt
│   ├── start.html
│   ├── _static
│   │   ├── ajax-loader.gif
│   │   ├── basic.css
│   │   ├── comment-bright.png
│   │   ├── comment-close.png
│   │   ├── comment.png
│   │   ├── css
│   │   │   ├── badge_only.css
│   │   │   ├── badge_only.css.map
│   │   │   ├── theme.css
│   │   │   └── theme.css.map
│   │   ├── doctools.js
│   │   ├── down.png
│   │   ├── down-pressed.png
│   │   ├── file.png
│   │   ├── fonts
│   │   │   ├── FontAwesome.otf
│   │   │   ├── fontawesome-webfont.eot
│   │   │   ├── fontawesome-webfont.svg
│   │   │   ├── fontawesome-webfont.ttf
│   │   │   ├── fontawesome-webfont.woff
│   │   │   ├── Inconsolata-Bold.ttf
│   │   │   ├── Inconsolata-Regular.ttf
│   │   │   ├── Inconsolata.ttf
│   │   │   ├── Lato-Bold.ttf
│   │   │   ├── Lato-Regular.ttf
│   │   │   ├── RobotoSlab-Bold.ttf
│   │   │   └── RobotoSlab-Regular.ttf
│   │   ├── jquery-1.11.1.js
│   │   ├── jquery.js
│   │   ├── js
│   │   │   ├── modernizr.min.js
│   │   │   └── theme.js
│   │   ├── minus.png
│   │   ├── plus.png
│   │   ├── pygments.css
│   │   ├── searchtools.js
│   │   ├── underscore-1.3.1.js
│   │   ├── underscore.js
│   │   ├── up.png
│   │   ├── up-pressed.png
│   │   └── websupport.js
│   ├── step-1.html
│   ├── step-2.html
│   ├── step-3.html
│   └── useful-links.html
└── tutorial-setup.sh
15 directories, 75 files
dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx$
havent done anything else yet - will report back if this works .
EDIT --1-
Further manually altered the directory structure - now the tree is as below --
└── pycon-sphinx-tutorial
├── crawler
│   ├── docs
│   │   ├── _build
│   │   ├── conf.py
│   │   ├── index.rst
│   │   ├── make.bat
│   │   ├── Makefile
│   │   ├── _static
│   │   └── _templates
│   └── src
│   ├── crawler
│   │   ├── __init__.py
│   │   ├── main.py
│   │   └── utils.py
│   └── __init__.py
├── install.sh
├── README.rst
├── tutorial
│   ├── cheatsheet.html
│   ├── finish.html
│   ├── genindex.html
│   ├── glossary.html
│   ├── _images
│   │   ├── cheatsheet-back-full.png
│   │   └── cheatsheet-front-full.png
│   ├── index.html
│   ├── objects.inv
│   ├── py-modindex.html
│   ├── search.html
│   ├── searchindex.js
│   ├── _sources
│   │   ├── cheatsheet.txt
│   │   ├── finish.txt
│   │   ├── glossary.txt
│   │   ├── index.txt
│   │   ├── start.txt
│   │   ├── step-1.txt
│   │   ├── step-2.txt
│   │   ├── step-3.txt
│   │   └── useful-links.txt
│   ├── start.html
│   ├── _static
│   │   ├── ajax-loader.gif
│   │   ├── basic.css
│   │   ├── comment-bright.png
│   │   ├── comment-close.png
│   │   ├── comment.png
│   │   ├── css
│   │   │   ├── badge_only.css
│   │   │   ├── badge_only.css.map
│   │   │   ├── theme.css
│   │   │   └── theme.css.map
│   │   ├── doctools.js
│   │   ├── down.png
│   │   ├── down-pressed.png
│   │   ├── file.png
│   │   ├── fonts
│   │   │   ├── FontAwesome.otf
│   │   │   ├── fontawesome-webfont.eot
│   │   │   ├── fontawesome-webfont.svg
│   │   │   ├── fontawesome-webfont.ttf
│   │   │   ├── fontawesome-webfont.woff
│   │   │   ├── Inconsolata-Bold.ttf
│   │   │   ├── Inconsolata-Regular.ttf
│   │   │   ├── Inconsolata.ttf
│   │   │   ├── Lato-Bold.ttf
│   │   │   ├── Lato-Regular.ttf
│   │   │   ├── RobotoSlab-Bold.ttf
│   │   │   └── RobotoSlab-Regular.ttf
│   │   ├── jquery-1.11.1.js
│   │   ├── jquery.js
│   │   ├── js
│   │   │   ├── modernizr.min.js
│   │   │   └── theme.js
│   │   ├── minus.png
│   │   ├── plus.png
│   │   ├── pygments.css
│   │   ├── searchtools.js
│   │   ├── underscore-1.3.1.js
│   │   ├── underscore.js
│   │   ├── up.png
│   │   ├── up-pressed.png
│   │   └── websupport.js
│   ├── step-1.html
│   ├── step-2.html
│   ├── step-3.html
│   └── useful-links.html
└── tutorial-setup.sh
15 directories, 75 files
EDIT -2 ---
All seems to be fine now --- my initial question remains - How would i have correctly changed the path --- Selected root path: . , in place of the default path ?
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs$ make html
Running Sphinx v2.2.1
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
generating indices... genindexdone
writing additional pages... searchdone
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.
The HTML pages are in _build/html.
Am able to serve the basic page at http://localhost:8000/
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs$ cd _build/
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs/_build$ ls
doctrees html
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs/_build$ cd html
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs/_build/html$ ls
genindex.html index.html objects.inv search.html searchindex.js _sources _static
(demo_venv) dhankar#dhankar-VPCEB44EN:/media/dhankar/Dhankar_1/a5_test_sphinx/pycon-sphinx-tutorial/crawler/docs/_build/html$ python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/alabaster.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/pygments.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/documentation_options.js HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/underscore.js HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/custom.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/doctools.js HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/language_data.js HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:41] "GET /_static/basic.css HTTP/1.1" 200 -
127.0.0.1 - - [29/Oct/2019 22:31:42] code 404, message File not found
127.0.0.1 - - [29/Oct/2019 22:31:42] "GET /favicon.ico HTTP/1.1" 404 -

concatenate all imports into one scss file

I'm currently working on a SASS library which is a long list of partials imported into 1 file.
The file structure is as following:
css-directory
├── functions
│   ├── _px2em.scss
│   └── _unitless.scss
├── helpers
│   ├── _align.scss
│   ├── _clearfix.scss
│   ├── _float.scss
│   ├── _hidden.scss
│   ├── _invisible.scss
│   ├── _ir.scss
│   └── _visuallyhidden.scss
├── layout
│   ├── _blockquote.scss
│   ├── _button.scss
│   ├── _fixed-footer.scss
│   ├── _form.scss
│   ├── _list.scss
│   ├── _loading.scss
│   ├── _triangle.scss
│   └── _truncate.scss
├── modules
│   ├── _grid.scss
│   └── _normalize.scss
├── prefixes
│   ├── _animation-delay.scss
│   ├── _animation.scss
│   ├── _background-clip.scss
│   ├── _borderbox.scss
│   ├── _border-radius.scss
│   ├── _box-shadow.scss
│   ├── _box-sizing.scss
│   ├── _flex.scss
│   ├── _font-face.scss
│   ├── _gradient.scss
│   ├── _hyphens.scss
│   ├── _keyframes.scss
│   ├── _transform-origin.scss
│   ├── _transform.scss
│   ├── _transition.scss
│   └── _user-select.scss
└── _verepo.scss
and the _verepo.scss file imports all the other partials.
I'd like to be able to concatenate _verepo.scss and it's partials into 1 .scss file so that I can then distribute it easily.
Found a solution, by using grunt and grunt-contrib-concat.
Fixed it with the following code block inside of grunt's initConfig:
concat: {
options: {
banner: '/*! veRepo.scss v%VERSION% | MIT License | https://github.com/varemenos/verepo */\n\n'
},
dist: {
src: [
'src/functions/_**.scss',
'src/prefixes/_**.scss',
'src/helpers/_**.scss',
'src/layout/_**.scss',
'src/modules/_**.scss',
],
dest: '_verepo.scss'
}
}

Using Brunch.io together with Apache Maven in order to build a java webapp

I am trying to use Brunch.io in order to simplify my javascript life.
My app is a java web archive (.war) and I use Maven as a build tool.
I am planning to have a ./brunch directory at the same level as the ./src directory (see tree output below).
Before I switch to brunch, I have a few questions:
Can I specify public: '../src/main/webapp' as a path in config.coffee and safely use brunch without fear that it will delete content from src/main/webapp?
Can I leave my Thymeleaf templates in WEB-INF/web-templates?
Is there any other points to take into account?
Thanks in advance for your input.
Here is the output from the tree command:
./src/main/webapp/
├── fonts
│   ├── glyphicons-halflings-regular.eot
│   ├── glyphicons-halflings-regular.svg
│   ├── glyphicons-halflings-regular.ttf
│   └── glyphicons-halflings-regular.woff
├── js
│   ├── custom
│   │   ├── addressAutocomplete.js
│   │   ├── languageChooser.js
│   │   ├── messages.js
│   │   ├── postcodeChooser.js
│   │   ├── resendActivationEmail.js
│   │   ├── signup.js
│   │   ├── trainings.js
│   │   └── workExperiences.js
│   ├── libs
│   │   ├── angular.js
│   │   ├── bootstrap.js
│   │   ├── bootstrap.min.js
│   │   ├── jquery-1.10.2.js
│   │   └── jquery-ui-1.9.0.custom.js
│   └── plugins
│   ├── chosen.jquery.js
│   ├── chosen.jquery.min.js
│   ├── component.json
│   ├── jquery.maskedinput-1.3.js
│   ├── jquery.maskedinput-1.3.min.js
│   ├── select2.jquery.json
│   ├── select2.js
│   └── select2_locale_fr.js
├── media
│   ├── checked.png
│   ├── favicon.png
│   └── nav-active-arrow.png
├── styles
│   ├── bootstrap.css
│   ├── bootstrap.min.css
│   ├── bootstrap-theme.css
│   ├── bootstrap-theme.min.css
│   ├── chosen.css
│   ├── chosen-sprite.png
│   ├── select2.css
│   ├── select2-custom.css
│   ├── select2.png
│   ├── select2-spinner.gif
│   ├── select2x2.png
│   ├── signin.css
│   ├── sticky-footer-navbar.css
│   └── style.css
└── WEB-INF
├── spring
│   └── webmvc-config.xml
├── tiles-defs.xml
├── web-templates
│   ├── advertisement
│   │   ├── childminder
│   │   │   ├── edit.html
│   │   │   ├── edit.html.old
│   │   │   └── new.html
│   │   ├── family
│   │   │   ├── edit.html
│   │   │   └── new.html
│   │   └── views.xml
│   ├── common
│   │   ├── footer.html
│   │   ├── header.html
│   │   └── layout.html
│   ├── conditions
│   │   ├── cgv.html
│   │   └── views.xml
│   ├── curriculum
│   │   ├── edit.html
│   │   ├── main.html
│   │   ├── new.html
│   │   ├── trainings.html
│   │   ├── views.xml
│   │   └── work-experiences.html
│   ├── errors
│   │   ├── 403.html
│   │   ├── 404.html
│   │   ├── error.html
│   │   └── views.xml
│   ├── messages
│   │   ├── body.html
│   │   ├── messages.html
│   │   └── views.xml
│   ├── passwordReset
│   │   ├── passwordReset.html
│   │   ├── resetPassword.html
│   │   ├── sendPasswordResetInfo.html
│   │   └── views.xml
│   ├── preference
│   │   ├── address.html
│   │   ├── email.html
│   │   ├── password.html
│   │   ├── preferenceMenu.html
│   │   └── views.xml
│   ├── search
│   │   ├── advertisement.html
│   │   ├── body.html
│   │   ├── childminderAdvertisementSearchForm.html
│   │   ├── childminderAdvertisementSearchResults.html
│   │   ├── familyAdvertisementSearchForm.html
│   │   ├── familyAdvertisementSearchResults.html
│   │   ├── view.html
│   │   └── views.xml
│   ├── signin
│   │   ├── signin.html
│   │   ├── standardSignin.html
│   │   └── views.xml
│   └── signup
│   ├── signup.html
│   ├── standardSignup.html
│   └── views.xml
└── web.xml
23 directories, 92 files
Can I specify public: '../src/main/webapp' as a path in config.coffee and safely use brunch without fear that it will delete content from src/main/webapp?
yes
Can I leave my Thymeleaf templates in WEB-INF/web-templates?
yes
Is there any other points to take into account?
I would suggest making "webapp" 100% auto-generated so that you could delete it freely. Also, to not keep generated stuff in repository.
This can be accomplished by moving all your stuff to app/assets directory, for example. Things from assets directories are copied as-is to public directory. But it's up to you.

Resources